Exact Solutions to PDEs

This page states the exact solutions to the pure (control-free) PDEs used to validate the numerical solvers. They isolate the spatial discretization, time integrators, and boundary handling from any control or jump term. The stochastic-optimal-control closed forms — market making, Merton, and linear-quadratic regulator — are on the SOC page.

The problems split into two classes: parabolic problems, which march backward in time from terminal data, and elliptic problems, which have no time variable and are solved directly with boundary conditions.

Parabolic problems

1D heat equation

On \(x \in [0,1]\), with diffusion coefficient \(D\):

\[ \partial_t V + D\, V_{xx} = 0, \qquad V(T, x) = \cos(\pi x). \]

The cosine mode has zero derivative at both endpoints, so the terminal data is compatible with a zero-flux boundary. The exact solution is

\[ V(t, x) = \cos(\pi x)\exp\!\big(-D \pi^2 (T - t)\big). \]

2D separable heat equation

On \((x, y) \in [0,1]^2\) with a single diffusion coefficient \(D\):

\[ \partial_t V + D\,(V_{xx} + V_{yy}) = 0, \qquad V(T, x, y) = \cos(\pi x)\cos(\pi y). \]

Each cosine factor has zero derivative at both endpoints, so the problem is the separable product of two independent 1D heat modes. The exact solution is

\[ V(t, x, y) = \cos(\pi x)\cos(\pi y)\exp\!\big(-2D \pi^2 (T - t)\big). \]

The factor \(2\) in the exponent is the sum of the two identical per-dimension decay rates. Because the two directions share the same coefficient \(D\) and the same terminal mode, the solution is symmetric under the exchange \(x \leftrightarrow y\).

Black-Scholes European call

On \(S \in [0, S_{\max}]\), with risk-free rate \(r\) and volatility \(\sigma\):

\[ \partial_t V + r S\, V_S + \tfrac12 \sigma^2 S^2\, V_{SS} - r V = 0, \qquad V(T, S) = \max(S - K, 0). \]

The exact solution is the Black-Scholes call formula [@black1973pricing]:

\[ V(t, S) = S\,\Phi(d_1) - K e^{-r\tau}\Phi(d_2), \qquad d_1 = \frac{\ln(S/K) + (r + \tfrac12\sigma^2)\tau}{\sigma\sqrt{\tau}}, \qquad d_2 = d_1 - \sigma\sqrt{\tau}, \]

with \(\tau = T - t\). The value is homogeneous of degree one in \((S, K)\), \(V(\lambda S, \lambda K) = \lambda V(S, K)\): a scale symmetry of the Black-Scholes equation, so the delta \(\Phi(d_1)\) depends on \(S\) and \(K\) only through the ratio \(S/K\).

1D convection-diffusion

On the real line, with constant drift \(b\) and diffusion \(D\), the terminal data is a Gaussian centered at \(x_0\):

\[ \partial_t V + b\, V_x + D\, V_{xx} = 0, \qquad V(T, x) = \exp\!\Big(-\frac{(x - x_0)^2}{2 w^2}\Big). \]

The exact solution is

\[ V(t, x) = \left(\frac{w^2}{\operatorname{var}}\right)^{1/2} \exp\!\Big(-\frac{(x + b\tau - x_0)^2}{2\,\operatorname{var}}\Big), \qquad \operatorname{var} = w^2 + 2D\tau, \qquad \tau = T - t. \]

The constant coefficients make the equation translation invariant, so the terminal Gaussian is translated by \(-b\tau\) and its variance grows to \(w^2 + 2D\tau\).

Elliptic problems

Elliptic problems have no time variable; the solution is the direct solve of

\[ -\mathcal{T} u + \rho(x)\, u = f, \]

where \(\mathcal{T}\) is the transport operator and \(\rho\) the reaction coefficient. The boundary conditions are the problem.

1D Laplace equation (Dirichlet)

On \(x \in [0,1]\):

\[ u'' = 0, \qquad u(0) = 0, \qquad u(1) = 1, \]

with exact solution \(u(x) = x\).

1D Poisson equation

On \(x \in [0,1]\):

\[ -u'' = 1, \qquad u(0) = 0, \qquad u(1) = 0, \]

with exact solution \(u(x) = \tfrac12 x(1 - x)\).

2D Poisson equation with separable forcing

On \((x, y) \in [0,1]^2\):

\[ -u_{xx} - u_{yy} = 2\pi^2\sin(\pi x)\sin(\pi y), \qquad u = 0 \text{ on the boundary}, \]

with exact solution \(u(x, y) = \sin(\pi x)\sin(\pi y)\).

1D stationary reaction-diffusion

On \(x \in [0,1]\):

\[ -u'' + a u = 0, \qquad u(0) = 0, \qquad u(1) = \sinh(\sqrt{a}), \]

with exact solution \(u(x) = \sinh(\sqrt{a}\, x)\).

1D Laplace equation (Neumann lower boundary)

On \(x \in [0,1]\):

\[ -u'' = 0, \qquad u'(0) = 0, \qquad u(1) = 1, \]

with exact solution \(u(x) = 1\).

1D Laplace equation (Robin lower boundary)

On \(x \in [0,1]\):

\[ -u'' = 0, \qquad u(0) - u'(0) = 0, \qquad u(1) = 1, \]

with exact solution \(u(x) = \tfrac12(x + 1)\).

These six elliptic problems cover constant, polynomial, separable multi-dimensional, reaction-dominated, Neumann, and Robin boundary behaviour, verifying that the solver assembles the bare elliptic operator \(-\mathcal{T} u + \rho u = f\) rather than an identity-shifted one.