I have the following equation for the price of Black Scholes Euro option -
(1) $$-\frac{\delta C}{\delta t} = -\alpha\frac{\delta^2 C}{\delta x^2} + [r - \delta + \frac{\sigma^2}{2}]\frac{\delta C}{\delta x} - \gamma C$$
I'm wondering how this can be written in a finite-difference scheme of the form
(2) $$C_{i \ j} = aC_{i+1 \ j+1} + bC_{i+1 \ j} + cC_{i+1 \ j-1}$$
where $a, b$ and $c$ are to be determined. The time derivatives are approximated with forward differences, and the spatial derivatives are calculated with central differences.
I have done $1$ dimensional finite difference methods but I have no experience with $2$ dimensional ones. I've no experience with second order terms in FD methods either but I've looked them up and am satisfied with how they are approximated.
So does anyone know the procedure for transforming the analytic BS equation in (1) into the FD form in (2) and determining $a, b$ and $c$? I figure once I see it done out once I can figure it out myself for other BS related calculations/variables.
If you're using FTCS (forward in time, centered in space), then
$$\frac{\partial f}{\partial t} \approx \frac{f_{i+1,j}-f_{i,j}}{\Delta t} \\ \frac{\partial f}{\partial x} \approx \frac{f_{i,j+1}-f_{i,j-1}}{2 \Delta t} \\ \frac{\partial^2 f}{\partial x^2} \approx \frac{f_{i,j+1}-2f_{i,j}+f_{i,j-1}}{\Delta x^2}.$$
This is second order accurate in space and first order accurate in time. Note that if you (unlike the above) approximate the first spatial derivative like you approximate the time derivative, the result will only be first order accurate in space, which is a large loss for essentially no gain. You can derive these formulae with Taylor approximation.
A warning: this scheme can be quite unstable if $\Delta t$ is not very small relative to $\Delta x$.