# Black Scholes to Heat Equation - Substitution

Sorry as really basic question. Chapter 8 of Wilmott introduces Q Finance the BS equation is transformed into the heat equation. Firstly by using $$V(S,t) \rightarrow \mathrm{e}^{-r(T - t)}U(S,t)$$ and then $$\tau = T - t$$

Resulting in: $$\frac{\partial U}{\partial \tau} = \frac{1}{2}\sigma^2\frac{\partial^2U}{\partial \xi^2} + (r - \frac{1}{2}\sigma^2)\frac{\partial U}{\partial \xi}$$

The final change of variables used is $$x = \xi + (r - \frac{1}{2}\sigma^2)\tau$$ which results in the heat equation in terms of $$x$$ and $$\tau$$.

Could someone please tell me how exactly this variable change reduces the above equation to the heat equation? I seem to be getting $$\frac{1}{2}\sigma^2\frac{\partial^2 U}{\partial x^2} = 0$$. After applying the chain rule for each of the terms.

• You are missing one change of variable at least. You need to take the log of S to make the equation with constant coefficients – Ezy Dec 31 '18 at 11:22
• Sorry I should have said $\xi = log(S)$ so that part has been done. It's just the last step. – bjp93 Dec 31 '18 at 11:41
• This is just chain rule – Ezy Dec 31 '18 at 12:01
• Yeah think I've not had enough sleep haha. But wouldn't $\frac{\partial U}{\partial \tau} = \frac{\partial U}{\partial x} \frac{\partial x}{\partial \tau} = (r - \frac{\sigma^2}{2}) \frac{\partial U}{\partial x}$ ?? Which then gives the second derivative of x as being equal to zero? – bjp93 Dec 31 '18 at 12:49
• you mixed yourself up. Just write it as a new function $V(\tau,x):=U(\tau,x-(...)\tau)$ and take the $\tau$ derivative on both sides to get the heat equation for $V$ – Ezy Dec 31 '18 at 13:37

The starting formulation of the Black-Scholes equation as found in the OP question:

$$\frac{\partial U}{\partial \tau} = \frac{1}{2} \sigma^2 \frac{\partial^2 U}{\partial \xi^2} + \left(r - \frac{1}{2} \sigma^2 \right) \frac{\partial U}{\partial \xi}$$

This will be proven to be equivalent to the heat equation (the parabolic PDE) after a change of coordinates $$(\xi, \tau) \rightarrow (x, \tau)$$ defined as:

\begin{align} x &= \xi + \left( r - \frac{1}{2} \sigma^2 \right) \tau\\ \tau &= \tau \end{align}

Use of the chain rule clarifies how first derivatives change when passing from a set of coordinates to the other:

\begin{align} \frac{\partial}{\partial \xi (x, \tau)} (*) &= \overbrace{\frac{\partial x}{\partial \xi}}^{= 1} \frac{\partial}{\partial x} (*) + \overbrace{\frac{\partial \tau}{\partial \xi}}^{= 0} \frac{\partial}{\partial \tau} (*)\\ \frac{\partial}{\partial \tau (x, \tau)} (*) &= \underbrace{\frac{\partial x}{\partial \tau}}_{= r - \frac{1}{2} \sigma^2} \frac{\partial}{\partial x} (*) + \underbrace{\frac{\partial \tau}{\partial \tau}}_{= 1} \frac{\partial}{\partial \tau} (*) \end{align}

The second order derivative $$\frac{\partial^2}{\partial \xi^2 (x, \tau)}$$ needs also to be evaluated. Seen from above that $$\frac{\partial}{\partial \xi (x, \tau)} = \frac{\partial}{\partial x}$$, this is easily:

$$\frac{\partial^2}{\partial \xi^2 (x, \tau)} (*) = \frac{\partial}{\partial \xi} \left( \frac{\partial}{\partial \xi} (*) \right) = \frac{\partial^2}{\partial x^2} (*)$$

Applying the above reformulations of $$\frac{\partial}{\partial \xi (x, \tau)}$$, $$\frac{\partial}{\partial \tau (x, \tau)}$$ and $$\frac{\partial^2}{\partial \xi^2 (x, \tau)}$$ to the Black-Scholes equation eliminates the first order derivative term and yields the classic heat equation:

\begin{align} \require{cancel}\cancel{\left( r - \frac{1}{2} \sigma^2 \right) \frac{\partial U}{\partial x}} + \frac{\partial U}{\partial \tau} &= \frac{1}{2} \sigma^2 \frac{\partial^2 U}{\partial x^2} + \cancel{\left(r - \frac{1}{2} \sigma^2 \right) \frac{\partial U}{\partial x}} \qquad \qquad \Longrightarrow\\ \Longrightarrow \qquad \qquad \frac{\partial U}{\partial \tau} &= \frac{1}{2} \sigma^2 \frac{\partial^2 U}{\partial x^2} \end{align}