I am trying to numerically solve the initial value problem (see later discussion for ICs)
$$ x \frac{\partial f}{\partial t} = \frac{\partial}{\partial x} (1-x^2) \frac{\partial f}{\partial x} - f$$
for $$ f= f(x,t), \quad x \in X = [-1, 1] \quad \text{and} \quad t \in T = [0,1] $$ where $$ f(1, \ t), \ f(-1, \ t) \text{ are finite} \ \forall \ t \in T $$
and f is continuous for all x, t. Please note that my question only concerns solution using iterative methods, not a solution by eigenfunction expansion.
I attempted to solve this problem given an initial condition $$ \breve{f}(x, t = 0)$$ with a simple BTCS method. This leads to reverse diffusion for x < 0, hence the solution gets lost in oscillations. Question 1 - Is there any way to solve this problem this problem directly? How can I check the solution even exists?
I was recommended to solve reformulated problem, so that there are two piecewise initial conditions:
$$ \breve{f}_0(x_1, t = 0), \ x_1 \in [0, 1] \quad \breve{f}_1(x_0, t = 1), \ x_0 \in [-1, 0] $$
and march backwards in time for $x \in [-1, 0]$. I am however unsure how to deal with boundary conditions at $x = 0$. The solution is continuous for all $x, t$ which leads to the following requirement at the boundary
$$ \lim_{|x| \rightarrow 0} \frac{\frac{\partial ^ 2 f}{\partial x^2} - f}{x} \text { is finite } \forall \ t \in T $$
I cannot solve the both parts of X interval simultaneously however, which seems to prevent me from imposing this BC. Question 2 - How can I impose the boundary condition at $x = 0$ to ensure the final solution is continuous? Are there any restrictions on $\breve{f}_1(x_0, t = 1) \ \text{given} \ \breve{f}_0(x_1, t = 0)$ ?
Any other suggestions on solution are appreciated.
Thank you