I'm having a bit of trouble finding a good numerical form for this modified version of the heat/diffusion equation and I was just wondering if I am tackling this question the correct way. Firstly, I have a type of heat equation defined by the equation:
$\frac{\partial V}{\partial t} + \frac{\sigma^2}{2} \gamma = 0$
where $\gamma = S^2 \frac{\partial^2 u}{\partial S^2} $
For this type of equation it is fairly straightforward to find a numerical scheme. However, I now have a modified version of this equation as follows:
$\frac{\partial V}{\partial t} + \frac{\sigma^2}{2} \frac{\gamma}{1-\lambda\gamma} = 0$
where $\lambda\gamma < 1$ and $1 - \lambda\gamma > 0$.
When I try finding a numerical form of this equation I now run into quite a bit of trouble. I am trying to create a numerical implicit scheme and I am following the method outlined on page 9 of this document: http://www.math.uaic.ro/~annalsmath/pdf-uri%20anale/F1(2010)/Mosneagu.pdf and on page 24 of this document: http://www.ehu.eus/aitor/irakas/fin/apuntes/pde.pdf
Following these methods, the different values in the equation above have numerical forms as follows:
$\frac{\partial V}{\partial t} = \frac{v^{m+1}_{n} - v^{m+1}_{n}}{\Delta t}$
$(\Delta S)^2\frac{\partial V^2}{\partial S^2} = \frac{v^{m+1}_{n+1} - 2v^{m+1}_{n} + v^{m+1}_{n-1}}{(\Delta S)^2}$
When I now plug these terms into equation above and solve for $v^{m}_{n}$ I get:
$v^{m}_{n} = v^{m+1}_{n} + \frac{\sigma^2\Delta t}{2}\large[\frac{v^{m+1}_{n+1} - 2v^{m+1}_{n} + v^{m+1}_{n-1}}{1-\lambda(v^{m+1}_{n+1} - 2v^{m+1}_{n} + v^{m+1}_{n-1})}\large]$
The problem I find however is that I don't know how to put this into a matrix equation to solve for all the terms - each time I've tried to rearrange the equation suitably I can't seem to isolate each $v$ term. In fact, the only 'good' way to solve this equation numerically which I can think of is to instead observe that in the equation $\frac{\partial V}{\partial t} + \frac{\sigma^2}{2} \frac{\gamma}{1-\lambda\gamma} = 0$
we treat the $1-\lambda\gamma$ denominator as a 'constant' type of value and write the $\gamma$ in the numerator as $\gamma = (\Delta S)^2\frac{\partial V^2}{\partial S^2} = \frac{v^{m+1}_{n+1} - 2v^{m+1}_{n} + v^{m+1}_{n-1}}{(\Delta S)^2} $ so that we can solve it in a similar numerical manner as the first equation mentioned. I'm quite new to computational mathematics so I know this might be easy, but if someone can help me out with this I'd really appreciate it, thanks in advance.
Edit: I should also note that I've tried to modify the fraction into a 'neater' form (such as through partial fractions or something) but it didn't work out naturally since the terms are in the denominator.