Solutions to final exam

TrigId := {Cos[Pi*(n_)] -> (-1)^n, Sin[Pi*(n_)] -> 0, 
 
  (-1)^(2*m) -> 1, (-1)^(2*n) -> 1}

Solve the wave equation

	utt = 9 uxx, 0 < x < ∞, 0 < t < ∞

with boundary condition

	ux(t,0) = 0

and initial conditions

	u(0,x) = exp(-x2)

	ut(0,x) = sin(x)

ANSWER:

This problem calls for d'Alembert's method for solving the wave equation.  Notice that the characteristic speed is 3.

In order to use that method, we have to extend the initial conditions to the whole real axis, -∞ < x < ∞, in such a way as to preserve the boundary condition.  We do this with the even extension.  Since the function exp(-x2) is already even, it does not need to be modified.  The even extension of the other initial condition can be easily written as sin(|x|).


The solution at time t > 0 is:

(1/2)(Exp[-(x + 3 t)2] + Exp[-(x - 3 t)2] +         (1/6) Integrate[Sin[|s|], {s, x-3t, x+3t}].
 
 If 0 < t < x/3, we get
 
 (1/2)(exp(-(x + 3 t)2) + exp(-(x - 3 t)2) +       (1/6) (Cos[x-3t] - Cos[x+3t])
 
 wheres if 0 < x/3 < t, we get 
 
  (1/2)(exp(-(x + 3 t)2) + exp(-(x - 3 t)2) +       (1/6) (2 - Cos[x-3t] - Cos[x+3t])

2.  Suppose that a thin disk of radius 1 is insulated on its faces while the round edge is held at temperature 0.  The thermal properties of the disk are such that the heat equation reads:

	ut = 100 grad2 u

At time 0, the temperature distribution is:

	u(0,r,q) = r2 sin(2q)

What is the temperature at time t and position r, q ?

ANSWER:

We separate variables as in the text, to get a general solution

Sum[A[m,n]  Exp[-100 j[m,n]^2 t] BesselJ[|m|, j[m,n] r]  Cos[i m q]  ]   + 
      Sum[B[m,n]  Exp[-100 j[m,n]^2 t] BesselJ[|m|, j[m,n] r]  Sin[i m q]  ]

The coefficients A[m,n] and B[m,n] are the products of the Fourier series coefficients for Sin[2q] and Fourier-Bessel coefficients for r^2.  

Fortunately, Sin[2q] is its own Fourier series, so the solution simplifies to

Sum[B[2,n]  BesselJ[2, j[2,n] r]  Sin[2 q]  ].

The B[2,n] are the Fourier-Bessel coefficients for the function r^2, using the Bessel functions J2.  The appropriate series was given in the text:

r^2  = 2 Sum[(1/(j[2,n] BesselJ[3, j[2,n] ] ))  BesselJ[2, j[2,n] r] , {n,1,infinity}]

Hence the coefficients in the solution are:

	A[m,n]  = 0, all m, n
	B[m,n]  = 0, all m ≠ 2
	B[2,n] = 2/(j[2,n] BesselJ[3, j[2,n] ] )).

3.  Solve Laplace's equation (for the electric potential in the absence of charge) on the rectangle
	-1 < x < 1
	  0 < y < 1

with the following boundary conditions:

	u(x,0)   = 0, 
	u(x,1)   = 1, 
	u(-1,y)  = 0, 
	ux(1,y) = 1. 


What is the potential inside the rectangle?

ANSWER:

As in the text, we consider two somewhat simpler problems and sum the solutions.

The first of these problems has boundary conditions 

	u(x,0)   = 0, 
	u(x,1)   = 1, 
	u(-1,y)  = 0, 
	ux(1,y) = 0. 

The homogeneous pair of boundary conditions (x = -1,1) produces eigenfunctions of the form

     X[n,x] = Sin[(2 n +1) π (x+1)/4]

since X[n,-1] = 0 and X'[n,1] = 0.  The corresponding functions of y solve
Y'' = ((2 n + 1) π /4)^2 Y,  with Y[n,0] = 0, so we get multiples of:

   Y[n,0] = Sinh[(2 n +1) π y/4]

The solution for this subproblem is of the form

           u[x,y] = Sum[B[n] X[n,x] Y[n,y]], 

where the coefficients are the ones which make u[x,1] = 1, i.e., 

           1 = Sum[B[n] Sinh[(2 n + 1) π/4]  Sin[(2 n + 1) π (x+1)/4] ]

The Fourier coefficients here are B[n] Sinh[(2 n + 1) π/4], but despite their complicated expression, they are still given by the projection formula:

Coeff[n_] := (2/2) Integrate[Sin[(2 n + 1) Pi (x+1)/4],               {x,-1,1}] /. TrigId

Coeff[n]

Part1[x_,y_,infty_] = Sum[(4/((1 + 2 n) Pi))                 (Sinh[(2 n + 1) Pi y/4]/Sinh[(2 n + 1) Pi/4])             Sin[(2 n + 1) Pi (x+1)/4], {n, 0, infty}]

Plot3D[Part1[x,y,4], {x, -1,1}, {y, 0, 1}]

The second problem has boundary conditions 

	u(x,0)   = 0, 
	u(x,1)   = 0, 
	u(-1,y)  = 0, 
	ux(1,y) = 1. 

The homogeneous pair of boundary conditions (y=0,1) produces eigenfunctions of the usual form

     Y[n,x] = Sin[n π y].

The corresponding functions of x solve
X'' = (n π)^2 X,  with X[n,-1] = 0, so we get multiples of:

   X[n,0] = Sinh[n π (x+1)]

The solution for this subproblem is of the form

           u[x,y] = Sum[B[n] X[n,x] Y[n,y]], 

where the coefficients are the ones which make u[1,y] = 1, i.e., 

           1 = Sum[B[n]  Sinh[2 n π]  Sin[n π y]

The Fourier coefficients are ones we have calculated many times, except for the factor Sinh[2 n π], so

Part2[x_,y_,infty_] = Sum[(4/n Pi)                 (Sinh[(n Pi (x+1)]/Sinh[2 n Pi])             Sin[n Pi y], {n, 1, infty, 2}]

(This sum runs only over odd n.)  The solution to our original problem is the sum of parts 1 and 2