# Preface

This section concerns about Laplace's equation in spherical coordinates.

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 with *Mathematica*

## Glossary

*r*and φ but not on θ, the Laplace equation is reduced to

**Example: **
Consider the outer Dirichlet's problem

Indeed, the following one-parameter family of functions satisfies all conditions of the given Dirichlet's problem:

*v*

_{λ}is neither bounded nor tends to zero at infinity. ■

*n*-dimensional space, for

*n*≥ 3, the uniqueness of the exterior problem does not valid even in the class of smooth functions bounded outside the given closed domain.

**Example: **
Consider teh harmonic function

*n*-dimensional Eucledian space ℝ

^{n}, defined by the equation

*z*) is the gamma function of Euler.

*u*=

*u*(

**x**),

**x**= (

*x*

_{1},

*x*

_{2}, … ,

*x*

_{n}) is a regular harmonic function in a domain

*G*of

**x**-space with boundary ∂

*G*, then the function

*u*= 0 and is regular in the region

*G*

^{*}obtained from

*G*by inversion with respect to the unit sphere \( \| {\bf x} \| = 1 . \)

**regular in the exterior region**

*G*

^{*}. That is, we define regularity in a domain

*G*including the infinity as follows: we invert

*G*with respect to sphere \( \| {\bf x} \| = 1 , \) transfering it into a bounded domain

*G*'.

**x**↦

**x**

^{*}, where

**inversion**of ℝ

^{n}∪ {∞} relative to the unit sphere.

**x**≠ {0, {∞}, then

**x**

^{*}lies on the ray from the origin determined by

**x**.

# Temperatures in a Sphere

The steady temperature distribution *u(x)* inside the sphere *r = a*, in spherical polar coordinates, satisﬁes \( \nabla^2 u =0 . \) If we heat the surface of the sphere so that \( u = f(\theta ) \) on *r = a* for some given function \( f(\theta ) , \) what is the temperature distribution within the sphere?

The equation and boundary conditions do not depend on φ, so we know that *u* is of the form

*A*

_{n}and

*B*

_{n}. Furthermore we expect

*u*to be ﬁnite at

*r = 0*so that \( B_n =0 . \) We ﬁnd the coeﬃcients

*A*

_{n}by evaluating the sum at

*r =a*:

*A*

_{n}using the orthogonality of the Legendre polynomials. However, the integration is done with respect to

*x*but not \( \cos ( \theta ) . \) Setting \( x= \cos ( \theta ) , \) we get \( {\text d}x= - \sin ( \theta ) \,{\text d} \theta . \) The interval of integration [-1,1] becomes \( [-\pi , 0 ] . \) Multiply through by \( -\sin ( \theta ) \,P_m (\cos \theta ) \) and integrate in θ to obtain

**Example:** Consider Laplace's equation exterior to a sphere of radius *a*, subject to some boundary condition on the sphere. The full problem statement is given below

*r*may be used in this region exterior to a sphere. We superpose all of those solutions to get

**Example:** As our final example, we consider the region between two concentric spheres, with radii \( a \mbox{ and } b , \quad b > a. \) We solve the Laplace equation in the region between the spheres, subject to a boundary condition on each sphere. The problem statement is given below.

*g*and

*h*in Legendre polynomials. That will make our task easier

*c*

_{n}and

*d*

_{n}are known from the known boundary functions

*g*and

*h*. The separated solutions are \( r^n P_n \left( \cos\,\phi \right) \) and \( r^{-n-1} P_n \left( \cos\,\phi \right) . \) The domain of the present problem, \( r \in (a, b ) , \) does not include either the origin or the point at infinity. Thus there are no grounds for discarding any of the solutions and we keep them all. The solution for Φ is then obtained by superposition:

*a*

_{n}and

*b*

_{n}, which we solve with the aid of

*Mathematica*:

*a*

_{n}and

*b*

_{n}are expressed in terms of known quantities and the solution is complete.

We look at a specific example. We take the functions given below for *g* and *h*:

*H*is the Heaviside function. Now we calculate coefficients:

*n = 1*into array

**coef2**:

*k*th partial sum of the Legendre expansion and assigns it to legsum2:

b[n_] := a^(n+1)*b^(2*n+1) coeff[n]/(b^(2*n+1) - a^(2*n+1))

*k*th partial sum of the solution Φ:

*r = a*and

*r = b*. We assign numerical values to the parameters:

*k*th partial sum to construct a plot of potential versus φ on the sphere of radius

*r*:

*r*-increments from

*r = a*to

*r = b*.

*r*varying in equal increments from the inner to the outer boundary.

Do[rarg = a + ((b-a)/20)*i; mangraph[i] = grapher[rarg, 10], {i,0,20,1}];

Manupulate[mangraph[i], {i,0,20,1}]]

- Axler, S., Bourdon, P., Harmonic Function Theory, Second edition, 2000.

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