Next: 2-d problem with Dirichlet
Up: Poisson's equation
Previous: An example 1-d Poisson
Let us now solve Poisson's equation in one dimension, with mixed boundary conditions,
using the finite difference technique discussed above. We seek the
solution of
![\begin{displaymath}
\frac{d^2 u(x)}{dx^2} = v(x),
\end{displaymath}](img637.png) |
(142) |
in the region
, with
. The boundary conditions
at
and
take the mixed form specified in Eqs. (132) and
(133). Of course, we can solve this problem analytically. In fact,
![\begin{displaymath}
u(x) = g + h\,x + \frac{x^2}{2} - \frac{x^4}{6},
\end{displaymath}](img722.png) |
(143) |
where
Figure 62 shows a comparison between the analytic and finite difference
solutions for
. It can be seen that the finite difference solution mirrors
the analytic solution almost exactly.
Figure 62:
Solution of Poisson's equation in one dimension with
,
,
,
,
,
, and
. The dotted curve (obscured)
shows the analytic solution, whereas the open triangles show the finite difference
solution for
.
![\begin{figure}
\epsfysize =3in
\centerline{\epsffile{p1d.eps}}
\end{figure}](img727.png) |
Next: 2-d problem with Dirichlet
Up: Poisson's equation
Previous: An example 1-d Poisson
Richard Fitzpatrick
2006-03-29