Solving a parabolic PDE

180 Views Asked by At

I've been tasked with solving a parabolic PDE (in the form of the Black-Scholes equation), first I need to discretise the problem (which I have done) and then solve to form a vector of approximations at time t=n+1.

This is the discretised problem:

$$ v^{n} = v_i^{n+1} - \frac{t}{h^2} \left(v_{i-1}^{n+1} - 2v_i^{n+1} + v_{i+1}^{n+1}\right) - \frac{rx}{h} \left(v_{i+1}^{n+1} - v_{i-1}^{n+1}\right) $$

Where $r$ is the interest rate (=0.1), $t$ is the time step and $h$ is the step size.)

Which forms a linear system along the format of $Av = f$, used to solve $v$ at $t=n+1$.

My question is, how do I form the tridiagonal $A$ matrix in this case, given the complexity of the discretised problem?

(I will then use backsolve to find the approximations)

Thanks in advance for any help.

1

There are 1 best solutions below

2
On

Why do you need a tridiagonal $A$? Not sure there is a simple way to get it. You can try solving the system by Gaussian elimination or, since you have a repeated problem for many right-hand sides $f$, you can consider something like the Cholesky decomposition to decompose $A = LL^T$.