# NDSolve causing my PC to crash

I'm trying to integrate a complicated Fokker-Planck PDE

$$\frac{dP}{\partial L}(L,g,h,q) = \frac{A_3^2}{2}q^2\frac{\partial^2P}{\partial g^2}+A_3^2gq\frac{\partial^2P}{\partial g\partial q} + (A_1^2+A_2^2+A_3^2\frac{q^2}{g^2})\frac{\partial^2P}{\partial h^2} + A_3^2g^2\frac{\partial^2P}{\partial q^2}+(\frac{A_3^2}{2}-A_4)g\frac{\partial P}{\partial g} + (\frac{A_3^2}{2}+A_4)q\frac{\partial P}{\partial q}-A_5\frac{\partial P}{\partial h}$$

with initial condition

$$P(L=0,g,h,q) = \delta(g)\delta(h)\delta(q-1),$$

approximated via hyperbolic tan functions. My code is

A1 = .05;
A2 = 2;
A3 = .3;
A4 = .5;
A5 = .9;
n = 10;
FPE = D[P[LL, g, h, q], LL] - (.5*A3^2*q^2)*
D[P[LL, g, h, q], {g, 2}] - (A3^2*q*g)*
D[P[LL, g, h, q], g] - (A1^2 + A2^2 + A3^2*(q/g)^2)*
D[P[LL, g, h, q], {h, 2}] - (A3^2*g^2)*
D[P[LL, g, h, q], {q, 2}] - (.5*A3^2 - A4)*g*
D[P[LL, g, h, q], g] - (.5*A3^2 + A4)*q*D[P[LL, g, h, q], q] +
A5*D[P[LL, g, h, q], h]

s = NDSolve[{FPE == 0,
P[0, g, h, q] ==
D[Tanh[n (q - 1)], q]*D[Tanh[n *g], g]*D[Tanh[n *h], h]},
P, {LL, 0.01, 5}, {g, 0.01, 5}, {h, 0.1, 5}, {q, 1, 5}]


anyone got ideas? It crashes my whole system.

• It didn't crash mine in half an hour, but didn't produce an answer either. Then again, it's a four-dimensional problem, so I imagine it might be tough. Commented Apr 21, 2020 at 14:16
• Interesting. Thanks for taking the time to run it. What do you mean you don't get an answer? It just times out? Commented Apr 21, 2020 at 14:45
• No, I needed my CPU power for something else so I just quit the kernel. Commented Apr 21, 2020 at 15:08
• Is it possible to reduce the precision or something so I get an interpolating polynomial, at the cost of it having large error? @ChrisK Commented Apr 21, 2020 at 15:13
• Boundary conditions? Commented Apr 22, 2020 at 19:12