Consider the problem $$(P) \qquad \begin{cases} \min\{\partial_t u - \Delta u, u -\varphi \} = 0 & \text{ in } (0,T)\times \mathbb{R}^N \\ u(0,\cdot) = \varphi(0,\cdot) & \text{ in } \mathbb{R}^N, \end{cases}$$
which is of interest in mathematical finance.
We can take the space dimension $$N =1,2, 3$$
and, for example, as initial datum,
phi[t,x] = E^(t)*(1+E^(x))
It is known that it admits one and only one strong solution (that is, a continuous Sobolev function that solves the problem almost everywhere and takes the initial datum pointwise) in the class of functions $|u(t,x)| \le Ce^{\lambda |x|^2}$ ($C,\lambda>0$).
The key point is that such solution can be obtained as the limit (as $\epsilon \to 0$) of the solutions to $$(P)_\varepsilon \qquad \begin{cases} \partial_t u - \Delta u = \frac{1}{\varepsilon}(u-\phi)^+ & \text{ in } (0,T)\times \mathbb{R}^N \\ u(0,\cdot) = \varphi(0,\cdot) & \text{ in } \mathbb{R}^N, \end{cases}$$
where $(u-\phi)^+ = \max\{u-\phi, 0\}$ is the positive part function.
How can I write a Mathematica code that plots and animates such solution to problem $(P)$ (approximated by solutions of $(P)_\varepsilon$ for $\varepsilon$ small enough)?
If we need to (do we?), we can solve the problem on $[0,T]×[−L,L]^N$ and impose the boundary condition $u(t,\pm L)=\varphi(\pm L)$.
NDSolveon the PDE, andWhenEventto catch the points at whichu==phi? – Daniel Lichtblau Jul 29 '17 at 15:04DSolveis fine with your example butNDSolveclaims it is underdetermined.Sa,e with trying the different initial condition. – Daniel Lichtblau Jul 29 '17 at 15:31DSolveto find an analytic result for all such inputs. I meant that it handled your example above, withicas initial condition, whereasNDSolveclaims it is underdetermined and returns unevaluated. I realizeDSolvedoes not handle the variant with the desired initial condition in place ofic. – Daniel Lichtblau Jul 29 '17 at 15:43NDSolve, unless you really want a solution for ${\bf R}^n$, for an indeterminate $n$. – Michael E2 Sep 17 '17 at 00:24NDSolvebe acceptable (implicit in my previous comment0? If so, you don't need to find the limit, only approximate it. -- That said, I think it might be hard to get the strong solution withNDSolvewithout having some BC for $x = c$, for some $c$. – Michael E2 Sep 17 '17 at 13:13