I'm trying to solve the Fokker-Planck equation
$$\frac{\partial p}{\partial L}(L, \eta)= \frac{\partial}{\partial \eta}\left[\left(\eta^{2}-1\right) \frac{\partial p}{\partial \eta}(L, \eta)\right] = (\eta^2-1)\frac{\partial^2p}{\partial\eta^2}(L,\eta)+2\eta\frac{\partial p}{\partial\eta}(L,\eta), \quad \eta>1$$
with initial condition
$$p(L=0, \eta)=\delta(\eta-1).$$
Ignoring the initial condition my code is
FPE = D[P[L, eta],
L] == (1/Lloc)*((eta^2 - 1)*D[P[L, eta], {eta, 2}] +
2*eta*D[P[L, eta], eta])
s = NDSolve[{FPE, P[0, eta] == DiracDelta[eta-1]}, P, {L, 0, 30}, {eta, 1, 30}]
to which I get the error "Encountered non-numerical value for a derivative at L == 0." Is there something I have done wrong? I know this FPE has an analytical solution in terms of Legendre polynomials. Any help would be much appreciated. Thanks.
NDSolve
is a numerical solver: you also need information on the range forL
andeta
, and initial conditions. Everything should have a numerical value. If you want solutions depending on parameters, look atParametricNDSolve
. Perhaps start from the docs and try to reformulate your problem. $\endgroup$