0
$\begingroup$

I have a problem and I hope someone of you can help me. I want to solve a rather complicated PDE via NDSolve but it keeps telling me NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 1.`.

I can't relly figure out why. Maybe someone of you can help me.

I tried the following code:

ClearAll["Global`*"]
T = 1;
sigma = 1;
K = 10;
rho = 0.5;
gamma = 1;
mu = 1;
a = 1;

sol = NDSolve[{D[p[t,y,s],t] + 0.5 * sigma^2 * y * s^2 * D[p[t,y,s],{s,2}]+ a*D[p[t,y,s],y] + 0.5 * D[p[t,y,s],{y,2}]* y + sigma * y * rho * s * D[p[t,y,s],y,s] - ((1-rho^2) * y * D[p[t,y,s],y] + (mu * rho) / sigma) * D[p[t,y,s],y] + 0.5 * gamma*(1-rho^2) * y * D[p[t,y,s],y]^2 == 0, p[T,y,s] == Max(s-K)}, p , {t, 0 , 1}, {y,0.1,10}, {s, 10, 100} ]

Thank you very much for your help.

$\endgroup$
3
  • 3
    $\begingroup$ What exactly were you trying to do with Max(s-K)? $\endgroup$ Commented Oct 31, 2017 at 10:44
  • $\begingroup$ Do you have any initial conditions in there? $\endgroup$ Commented Oct 31, 2017 at 10:53
  • $\begingroup$ Oh, damn. That's embarrassing. I meant Max[s-K,0]. It seems to work now if I add some more boundary conditions. Thank you very much for pointing that out! $\endgroup$
    – Mokel
    Commented Oct 31, 2017 at 10:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.