# Checking the solution to a PDE

Show that $f(s,t) = s-Ke^{-r(T-t)}$ solves the PDE $rf(s,t)=f_1(s,t)sr + f_2(s,t) + \frac{1}{2}f_{11}(s,t)s^2\sigma^2$ where $s>0$ and $0<t<T$.

Doing a bit of computation, I found that $f_{1}(s,t)=1$, $f_{2}(s,t)=-TK^{-r(T-t)}$, $f_{11}(s,t)=0$. However, $r[f_1(s,t)Sr + f_2(s,t) + \frac{1}{2}f_{11}(s,t)s^2\sigma^2]=r[s-TK^{-r(T-t)}]\neq r[s-Ke^{-r(T-t)}].$ Did I mess up my calculations?

-
You should be more careful computing $f_2(s,t)$. –  Giuseppe Tortorella May 26 '12 at 22:51
Emir, be careful: $\frac{\partial}{\partial t} e^{-r(T-t)} = r e^{-r(T-t)}$ –  tentaclenorm May 26 '12 at 23:38

$$f(s,t)=s-Ke^{-rT+rt}\Longrightarrow f_2(s,t)=-rKe^{-rT+rt}$$ and now you can check.