# Inhomogeneous linear equation-linear solver

1. Oct 8, 2007

### chirag

inhomogeneous linear equation--linear solver

Dear friends,

I am working on a system of coupled inhomogeneous equations of motion having form as follows.
$$i \frac{\partial}{\partial t }= \left(\frac{-1}{2\;m} \frac{\partial^{2}}{\partial x^{2}} + A(x,t)\;\frac{\partial}{\partial \;x}+B(x,t) \right) + Q(x,t)$$

I use the crank-nicolson algorithm to solve this equation (A.x=B). but the solution is not stable.

I tried to implement the scheme coined by H. G. Muller (Laser physics 9 (1999), 138) to increase space accuracy but the d/dx term gives rise to non-tridiagonal matrix. I have very little experience in solving tridiagonal equations.

Can any one suggest a linear solver that can solve A.X=B with A being a matrix with two upper diagonals and two lower diagonals ?

Any other way to solve such a system?

Last edited: Oct 9, 2007