3
$\begingroup$

I was trying to come up a some numerical solution to the following PDE system, but it failed for a good reason. Is there a way that we can get around it?

r = 0.1; σ = 0.2; K = 40; n = 20; T = 1; q = 0.05;
sol2 = NDSolve[{Min[-D[c[S, t], t] - 
      1/2 σ^2 S^2 D[c[S, t], {S, 2}] - 
      D[c[S, t], S] (r - q) S + r c[S, t], c[S, t] - (S - K)] == 0,

   c[0, t] == 0, 
   c[S, T] == (S - K) Boole[S > K],
   c[3 K, t] == 3 K - K E^(-r (T - t))


   }, c, {t, 0, T}, {S, 0, 120}

  ]
$\endgroup$
5
  • $\begingroup$ Side issue: Avoid capital single-letter variables. For instance, K is used as a dummy variable in solutions expressed in terms of sums and integrals. Probably not an issue here, but it's a good habit. $\endgroup$
    – Michael E2
    May 16, 2017 at 20:42
  • $\begingroup$ I feel there should be some form of a trapezoidal differentiation to avoid calculating the derivative directly. $\endgroup$
    – Al Guy
    May 16, 2017 at 22:03
  • $\begingroup$ Have you seen the tutorial on the Method of Lines? I doubt NDSolve can handle this directly as a PDE, but maybe it could with a system of ODEs, for which more robust discontinuity processing is available. $\endgroup$
    – Michael E2
    May 16, 2017 at 22:32
  • $\begingroup$ @MichaelE2 I think the Min will still not allow it. $\endgroup$
    – Al Guy
    May 17, 2017 at 0:47
  • 1
    $\begingroup$ I'm afraid even if there's no Min, NDSolve will have trouble in solving the problem, because part of the equation is inverse problem for parabolic equation (the i.c. is given at T, while you're solving the equation from T to 0), which is a well-known ill-posed problem. $\endgroup$
    – xzczd
    May 17, 2017 at 3:19

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.