19.1.1.1 Solution gf1d-a

Question:

Solve the Poisson equation

\begin{displaymath}
u_{xx} = - 2 \frac{\sinh x}{\cosh^3 x}
\end{displaymath}

numerically using Green’s functions. Experiment with numerical parameters and show convergence.

Include your code.

Answer:

The different right hand side does not change the Green’s function of the one-di­men­sion­al Poisson equation. However, the exact solution $u$ is of course different; you find it is $\tanh{x}$.

To numerically find that solution, you might consider adapting the program used to produce the example in the text. That program consisted of the matlab or octave files gf1d_run.m, gf1d_f.m, gf1d_sumgf.m, and gf1d_u_exa.m.

You may want to experiment with the size of the interval outside of which you can ignore the right hand side in your Poisson equation. However, the right hand side does fortunately become negligible quickly.

Another thing you could try is evaluate $\int_{\rm {spike}}f(\xi '){ \rm d}\xi '$ exactly, rather than approximate it as $f(\xi)\Delta\xi $. I suspect that this will give much better results when using small numbers of wide spikes.