Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to the main page for the first course APMA0330
Return to the main page for the second course APMA0340
Return to Part VI of the course APMA0340
Introduction to Linear Algebra

Preface


This tutorial was made solely for the purpose of education and it was designed for students taking Applied Math 0340. It is primarily for students who have some experience using Mathematica. If you have never used Mathematica before and would like to learn more of the basics for this computer algebra system, it is strongly recommended looking at the APMA 0330 tutorial. As a friendly reminder, don't forget to clear variables in use and/or the kernel. The Mathematica commands in this tutorial are all written in bold black font, while Mathematica output is in regular fonts.

Finally, you can copy and paste all commands into your Mathematica notebook, change the parameters, and run them because the tutorial is under the terms of the GNU General Public License (GPL). You, as the user, are free to use the scripts for your needs to learn the Mathematica program, and have the right to distribute and refer to this tutorial, as long as this tutorial is accredited appropriately. The tutorial accompanies the textbook Applied Differential Equations. The Primary Course by Vladimir Dobrushkin, CRC Press, 2015; http://www.crcpress.com/product/isbn/9781439851043

Poisson equation


Siméon Poisson

It is known that the electric field generated by a set of stationary charges can be written as the gradient of a scalar potential, so that E = -∇φ. This equation can be combined with the field equation to give a partial differential equation for the scalar potential: ∇²φ = -ρ/ε0. This is an example of a very famous type of partial differential equation known as Poisson's equation:

\[ \Delta u \equiv \nabla^2 u = f \qquad\mbox{or in general} \quad L[x,\texttt{D}]\,u = f , \]
where L is an elliptic differential operator and f is a given function. The equation is named after the French mathematician, geometer, and physicist Siméon Denis Poisson (1781--1840).

Example: Let us consider a classical Poisson problem

\[ \nabla^2 u(x,y) = -1 , \qquad (x,y) \in [-1,1] \times [-1, 1] , \]
subject to homogeneous Dirichlet conditions on all four sides of the domain. Strang and Fix showed that u(x, y) has singularities of the form
\[ u = r^2 \ln r + \mbox{less singular terms} \]
on each corner where r is the radius of a local polar coordinate centered on the corner. ■

Example:

Example:

Example: Let Ω be a bounded domain in Euclidean N-space with a sufficiently smooth boundary ∂Ω and let r denote the distance from fixed point in Ω taken to the origin. We consider the standard Dirichlet or Neumann problems for the Laplace operator in spherical coordinates in N dimensions that depends only of the distance from the origin

\[ \Delta u \equiv \frac{1}{r^{N-1}} \,\frac{\partial}{\partial r} \left( r^{N-1} \frac{\partial u}{\partial r} \right) = f(r) \]
subject to the boundary conditions
\[ u = c_1 \qquad \mbox{or} \qquad \frac{\partial u}{\partial r} = c_2 \quad \mbox{on} \quad \partial \Omega . \]
Then multiplication by rN-1 and integration of the Poisson equation results in
\[ u(r) = \frac{1}{N-2} \,\int_0^r \left( \rho - \frac{\rho^{N-1}}{r^{N-2}} \right) f(\rho )\,{\text d}\rho + k_1 , \]
where k1 is a constant of integration. For N = 2, we have
\[ u(r) = \int_0^r \rho\,\ln \frac{r}{\rho}\, f(\rho )\,{\text d}\rho + k_1 . \]
Note that the above formulas correspond to the interior problem. Finally, the constant of integration should be chosen so that the boundary conditions are valid. Assuming that Ω is an N-dimensional ball of radius a, we have for the Dirichlet porblem the equation
\[ \frac{1}{N-2} \,\int_0^a \left( \rho - \frac{\rho^{N-1}}{r^{N-2}} \right) f(\rho )\,{\text d}\rho + k_1 = c_1 . \]

Example: Consider the previously considered problem for the biLaplacian:

\[ \Delta^2 u = f(r) \]
subject to the conditions
\[ u = c_1 , \qquad \frac{\partial u}{\partial r} = c_2 \quad \mbox{on} \quad \partial \Omega \]
Its solution is obtained by next integration of the above solution:
\[ u(r) = \frac{1}{2N(N-2)} \,\int_0^r \left[ \rho\, r^2 - \frac{\rho^{N+1}}{r^{N-2}} + \frac{N}{N-4} \left( \frac{\rho^{N-1}}{r^{N-4}} - \rho^3 \right) \right] f(\rho )\,{\text d}\rho + k_1\,\frac{r^2}{2N} + k_2 , \]
where k1 and k2 are constants of integrations. Clearly, the cases N = 2 and N = 4 must be treated separately. For N = 2, we have
\[ u(r) = \frac{1}{4} \,\int_0^r \left[ \rho \left( r^2 + \rho^2 \right) \ln \frac{r}{\rho} + \rho \left( \rho^2 - r^2 \right) \right] f(\rho )\, {\text d}\rho + k_1\,r^2 + k_2 . \]
For N = 4, we have
\[ u(r) = \frac{1}{16} \,\int_0^r \left[ r^2 - \frac{\rho^4}{r^2} - 4 \rho^2 \ln \frac{r}{\rho} \right] \rho\,f(\rho )\, {\text d}\rho + k_1\,r^2 + k_2 . \]

 

  1. Strang, G. and Fix, G.J., An Analysis of the Finire Element Method, Prentice-Hall, New York, 1971, Chapter 8.

 

Return to Mathematica page
Return to the main page (APMA0340)
Return to the Part 1 Matrix Algebra
Return to the Part 2 Linear Systems of Ordinary Differential Equations
Return to the Part 3 Non-linear Systems of Ordinary Differential Equations
Return to the Part 4 Numerical Methods
Return to the Part 5 Fourier Series
Return to the Part 6 Partial Differential Equations
Return to the Part 7 Special Functions