3

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}

  ]
Al Guy
  • 1,610
  • 1
  • 10
  • 15
  • 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. – Michael E2 May 16 '17 at 20:42
  • I feel there should be some form of a trapezoidal differentiation to avoid calculating the derivative directly. – Al Guy May 16 '17 at 22:03
  • 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. – Michael E2 May 16 '17 at 22:32
  • @MichaelE2 I think the Min will still not allow it. – Al Guy May 17 '17 at 00:47
  • 1
    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. – xzczd May 17 '17 at 03:19

0 Answers0