Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to computing page for the fourth course APMA0360
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to Mathematica tutorial for the fourth course APMA0360
Return to the main page for the
first course APMA0330
Return to the main page for the
second course APMA0340
Return to the main page for the
fourth course APMA0360
Return to Part VII of the course APMA0340
Introduction to Linear Algebra with Mathematica
Let us introduce in ℝ³ spherical coordinates (0 ≤ ρ, 0 ≤ θ < π, 0 ≤ ϕ < 2π):
\[
\begin{split}
x &= \rho\,\cos \phi\,\sin\theta , \\
y &= \rho\,\sin \phi\,\sin\theta , \\
z &= \rho\,\cos\theta ;
\end{split} \qquad \Longrightarrow \qquad \phi = \begin{cases}
\arctan \left( y/x \right) , & \ \mbox{ if} \quad x > 0 , \\
\arctan \left( y/x \right) + \pi , & \ \mbox{ if} \quad x < 0 \mbox{ and } y \ge 0, \\
\arctan \left( y/x \right) - \pi , & \ \mbox{ if} \quad x < 0 \mbox{ and } y < 0, \\
+\frac{\pi}{2} , & \ \mbox{ if} \quad x = 0 \mbox{ and } y > 0, \\
-\frac{\pi}{2} , & \ \mbox{ if} \quad x = 0 \mbox{ and } y < 0, \\
\mbox{undefined}, & \ \mbox{ if} \quad x = 0 \mbox{ and } y=0.
\end{cases} .
\]
As usual, the location of a point (x, y, z) is specified by the distance ρ of the point from the origin, the angle ϕ between the position vector and the z-axis, the polar angle measured down from the north pole, and the azimuthal angleq θ from the x-axis to the projection of the position vector onto the xy plane, analogous to longitude in earth measuring coordinates:
\[
\rho = \sqrt{x^2 + y^2 + z^2} \ge 0 \qquad\mbox{and} \qquad \theta = \mbox{arccos} \frac{z}{\rho} = \begin{cases}
\arctan \frac{\sqrt{x^2 + y^2}}{z} , & \mbox{ if } z > 0, \\
\pi + \arctan \frac{\sqrt{x^2 + y^2}}{z} , & \mbox{ if } z < 0, \\
+ \frac{\pi}{2} , & \mbox{ if } z = 0 \mbox{ and } xy \ne 0 , \\
\mbox{undefined} , & \mbox{ i } x=y=z=0 .
\end{cases}
\]
The first term in the left-hand side does not depend on angles (θ, ϕ). Therefore, the equation is valid only when every term is a constant:
where Pn,m(x), also denoted by Pnm(x), are the associated Legendre polynomials.
With this in hand, we determine eigenvalues and eigenfunctions for equation
\eqref{EqSphere.3}:
with some constants An and Bn. So partial nontrivial solutions of Laplace's equation are products of the radial solutions and spherical functions: \( \displaystyle u_{n,m} (\rho , \theta , \phi ) = R_n (\rho )\, Y_{n,m} (\theta , \phi ) . \) Since Laplace's equation is homogeneous, any sum of these partial solutions will be also solutions of Laplace's equation. Hence, we seek the solution of
Laplace's equation as infinte sum:
According to separation of variables method, we seek for partial nontrivial solutions of Eq.\eqref{EqSphere.7} in te form u(ρ, ϕ) = R(ρ)Φ(ϕ). Upon substiting this form into Eq.\eqref{EqSphere.7}, we obtain
A function of one independent variable (ρ) can be equal to another function of independent avriable ϕ only when both functions are constant. This yields two equations containing a parameter λ:
Sturm--Liouville problem \eqref{EqSphere.8} is a particular case of \eqref{EqSphere.3}; so we conclude that λ = n(n +1) , n = 0, 1, 2, …, are its eigenvalues and the corresponding eigenfunctions are
Clenshaw, C.W., Norton, H.J.: The solution of nonlinear ordinary differential equations in chebyshev series. The Computer Journal, 1963, {\bf 6}, Issue 1, 88–92; https://doi.org/10.1093
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