I am having difficulty deriving the weak formulation of the Black-Scholes Equation.
I have multiplied it with a test function phi and integrated over Omega. But results on the internet suggest integration by parts are used on the second integral, and then some calculations are skipped, and I don't obtain the same result as rest of the world apparently.
Remark: I'm aware, it is a backward parabolic partial differential equation.
Edit: Here is what I got so far;
Black-Scholes Equation:
$\frac{\partial V}{\partial t} + \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + rS \frac{\partial V}{\partial S} - rV = 0$
Variational / weak form:
$\int_\Omega \left(\frac{\partial V}{\partial t} + \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + rS \frac{\partial V}{\partial S} - rV \right)\phi dx$
< = >
(**) $\int_\Omega \frac{\partial V}{\partial t} \phi dx + \int_\Omega \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} \phi dx - \int_\Omega rS \frac{\partial V}{\partial S} \phi dx- \int_\Omega rV \phi dx$
Then I found sources saying that by integration by parts on the second integral in the above equation, we will obtain the following:
(*) $\int_\Omega \frac{1}{2} \sigma^2 S^2 \frac{\partial^2}{\partial S^2} \phi dx = -\int_\Omega \frac{1}{2} \sigma^2 S^2 \frac{\partial V}{\partial S} \frac{\partial \phi}{\partial S} dx - \int_\Omega \sigma^2 S \frac{\partial V}{ \partial S} \phi dx$
That I simply don't understand. If I use partial integration on the right hand side of the equation above I get the following:
$\int_\Omega \frac{1}{2} \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} \phi dx = \frac{1}{2} \sigma^2 S^2 \left(\frac{\partial^2 V}{\partial S^2} \frac{\partial \phi}{\partial S} - \int_\Omega \frac{\partial V}{\partial S} \frac{\partial \phi}{\partial S} dx\right)$
Question 1: What else is happening in (*) besides integrations by parts?
Considering (*) again, we can substitute the left hand side into (**):
$\int_\Omega \frac{\partial V}{\partial t} \phi dx -\int_\Omega \frac{1}{2} \sigma^2 S^2 \frac{\partial V}{\partial S} \frac{\partial \phi}{\partial S} dx - \int_\Omega \sigma^2 S \frac{\partial V}{\partial S} \phi dx + \int_\Omega rS \frac{\partial V}{\partial S} - rV \phi dx$
Reducing:
(***) $\int_\Omega \frac{\partial V}{\partial t} \phi dx -\int_\Omega \frac{1}{2} \sigma^2 S^2 \frac{\partial V}{\partial S}\frac{\partial \phi}{\partial S} dx - \int_\Omega (\sigma^2-r) S \frac{\partial V}{\partial S} \phi dx - \int_\Omega rS \frac{\partial V}{\partial S} - rV \phi dx$
question 2:
Is the equation (***) the correct variational form of the Black-Scholes equation? I ask since I found various sources giving different variational forms after applying integrations by parts (in neither of them I'm abble to dublicate since I end in a situation as above, where I'm missing a step in the integration by parts).
Afterwards I would switch the sign by replacing t by tau=T-t, and obtain the variational form of the forward in time parabolic equation.
Thank you in advance for your suggestions, and spelling correction.