I have an iterative finite difference scheme for the Poisson equation

$$ \nabla^2 u=-\rho $$ It's the Jacobi method, which has the form (for 1D systems) $$ u^{n+1}_{i} = \frac{1}{2}(u^n_{i+1} + u^n_{i-1} + \rho_i~h^2) $$ Is there a similar scheme for the nonlinear equation $$ \nabla^2u = -\rho ~e^{u-v} $$ I tried the following $$ u^{n+1}_{i} = \frac{1}{2}(u^n_{i+1} + u^n_{i-1} + \rho_i~e^{u^n_i-v_i}~h^2) $$ but couldn't get a converged answer.

Above, I have given a 1D example. I am solving the 3D version, over a cube. The front and back of the cube have Von Neumann boundary conditions ( equal to 0), and the top, bottom, left, and right have Dirichlet boundary conditions ( also equal to 0 ). My initial guess is $u = 0$ everywhere.

  • $\begingroup$ Could you add the initial and binary conditions you used? $\endgroup$
    – Kyle Kanos
    Commented Nov 27, 2016 at 21:15
  • $\begingroup$ Ok, I'll edit my question. Can I infer from your comment that, with appropriate conditions and initial guess, my attempt should work? $\endgroup$
    – DJames
    Commented Nov 27, 2016 at 21:20
  • 1
    $\begingroup$ What is $v$ in your equation? $\endgroup$
    – nicoguaro
    Commented Nov 28, 2016 at 17:35
  • 3
    $\begingroup$ Have you tried damping your iteration? The Jacobi iteration does not unconditionally converge. You may have to limit the size of your steps. $\endgroup$ Commented Nov 28, 2016 at 18:21
  • 1
    $\begingroup$ Taking $v=0$, and using homogeneous Dirichlet BC in 1D, $x\in [0, 1]$ I obtain convergence for both cases. For 100 points it takes about 10000 iterations to reach a relative error of $10^{-6}$. $\endgroup$
    – nicoguaro
    Commented Nov 28, 2016 at 20:15

1 Answer 1


The Jaocbi iteration assumes that the right hand size is a constant with iteration. Here's how the error analysis is done.

$Ax = b$

$A = A_1 - A_2$

$A_1 x^{k+1} = A_2x^k +b$

$[A_1 x^{k+1} = A_2x^k +b] - [Ax = b]$

$A_1\epsilon^{k+1} = A_2\epsilon^k$

$\epsilon^{k+1} = (A_1^{-1}A_2)\epsilon^k$

$\epsilon^{k+1} = (A_1^{-1}A_2)^k\epsilon^0$

So, as you can see that b has to be constant between iterations for the error analysis to be valid. In addition Jacobi is a slow method because the max eigenvalue for a central scheme like yours is close to 1.

So, Jacobi MAY or MAY NOT work for a right hand side that depends on the solution as in your case and worse will converge very slowly, if it does at all. Your best bet right now, I think, is to use a method with better convergence. Maybe try SOR or even the newer Krylov subspace methods such as Bi Conjugate Gradient Stabilized.

  • $\begingroup$ Thanks. I've read up on the BICGSTAB method, and found some templates. I'll give it a try. Would I be right in assuming, convergence issues aside, that there is no inherent problem with using these methods for my semilinear equation? I.e. If these method successfully find a self-consistent solution, I can trust it as much as I can trust found solutions for linear equations. $\endgroup$
    – DJames
    Commented Nov 30, 2016 at 2:54
  • $\begingroup$ Its difficult to predict, but if you had an analytic solution you could validate against it. On the other hand, if the iterations converge then LHS and RHS should be equal within some tolerance. Try using it on the 1D problem and see what comes out. Also I see that you have Neumann boundary conditions. That means a straight Jacobi like you showed would not be true at the Neumann boundary. $\endgroup$
    – Vikram
    Commented Nov 30, 2016 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.