# How to apply the chain rule for partial derivatives to transformations?

I'm currently working to solve the Black-Scholes model partial differential equation (it's a model for a.o. stock option prices). The Black-Scholes equation for a calloption C(S,t) is given by

$\frac{∂C}{∂t}+\frac{1}{2} σ^2 S^2 \frac{∂^2 C}{∂S^2}+rS \frac{∂C}{∂S}-rC=0$

S is the stock price and t is time to expiration.

I am solving the equation by transforming it to the heat equation. I am having a little trouble with the first few transformation. The transformations are:

1. $x=\ln⁡(\frac{S}{K})$ which gives $S=Ke^x$
2. $τ=\frac{σ^2}{2} (T-t)$ which gives $t=T-\frac{2τ}{σ^2}$

The function becomes:

1. $U(x,τ)= \frac{1}{K} C(S,t)=\frac{1}{K} C(Ke^x,T- \frac{2τ}{σ^2})$

These transformation applied to the partial differential equation above gives the following outcomes for the different terms. I found the following solution on the internet, my problem is that I don't really understand what they do here:

$\frac{∂C}{∂t}=K \frac{∂U}{∂τ} \frac{∂τ}{∂t}=\frac{-Kσ^2}{2} \frac{∂U}{∂τ},$

$\frac{∂C}{∂S}=K \frac{∂U}{∂x} \frac{∂x}{∂S}=\frac{K}{S} \frac{∂U}{∂x}=e^{-x} \frac{∂U}{∂x},$

$\frac{∂^2 C}{∂S^2}=\frac{-K}{S^2} \frac{∂U}{\partial x}+\frac{K}{S} \frac{∂}{∂S} (\frac{∂U}{∂x})$ $=\frac{-K}{S^2} \frac{∂U}{∂x}+\frac{K}{S} \frac{∂}{∂x} (\frac{∂U}{∂x}) \frac{∂x}{∂S}$ $=\frac{-K}{S^2} \frac{∂U}{∂x}+\frac{K}{S^2} \frac{∂^2 U}{∂x^2}$ $=\frac{e^{-2x}}{K} (\frac{∂^2 U}{∂x^2} \frac{-∂U}{∂x}$)

Can someone help me out? I would really appreciate it!!!!

• So I figured out $\frac{∂C}{∂t}$ and $\frac{∂C}{∂S}$ . I just don't get the second derivative of C with respect to S ($\frac{∂^2C}{∂S^2}$). (I accidentally wrote $\frac{∂^2C}{∂C^2}$ in the question :s) Can someone help me with that one? Feb 7 '15 at 15:36