# Solving a system of equations that vary in time and space implicitly

I am writing a code for a system of equations for which the variables vary in time and space. I have written an implicit code to solve a system of equations before but in that case I could write the equations in matrix form and used Newton Raphson's method to solve the equations. This time I am just using for loops and I'm not assembling the matrices. Would it be possible to use Newton Raphson's method and Implicit Euler for this case. I mean I was having problems in terms of calculating the Jacobian (the gradients of the function). Any hints would be appreciated.

## 1 Answer

It is difficult to use the Newton-Raphson method without assembling the matrix. The reason is that Newton-Raphson requires you to solve a matrix equation with the Jacobian, and the standard method for solving matrix equations is Gaussian elimination / LU-factorization, and for that you do need to assemble the matrix. There are methods for solving matrix equations that do not require you to assemble the matrix but these are more advanced.

If you cannot calculate the Jacobian (your question is a bit vague here), then you cannot use Newton-Raphson.

Assuming that you want to solve your equation without using any built-in solver, perhaps you should first try fixed-point iteration to solve the nonlinear equation in the implicit Euler method as this is the easiest method. There is a very short description on Wikipedia at http://en.wikipedia.org/wiki/Backward_Euler_method . However, fixed-point iteration destroys the stability of the implicit Euler method and that is probably the reason why you are using an implicit method in the first place.

• Thanks very much for your help. – Hooman May 15 '12 at 12:54