4620 Homework 4

You can use any programing language or tool that you want.  The Laplacian of a radially symmetric function in cylindrical coordinates is shown below.

Needs["VectorAnalysis`"]
Laplacian[u[r], Cylindrical[r,θ,z]]//Simplify

1) Use a symetric differences in r (for the first and second derivatives) discretize

({{({{Δu, =, f}}),     , u(Subscript[|, r=4]), =, 1,        , u(Subscript[|, r=2]), =, 2}})

for a radially symmetric f and u on the domain 2<r<4 shown (Ignore the colors I am just playing) below.  You should be able to use any number n of subdivisions.

RegionPlot[4<(x^2)+(y^2)<16,{x,-4,4},{y,-4,4},
Mesh->40,
MeshShading->{{Automatic,Pink},{LightBlue,Automatic}}, ColorFunction->"DarkRainbow"]

2) Rewrite the radial Laplacian as  (1/r)((r u'[r]))'=f[r], multiply the equation by r and then use the discretization (Subscript[∇, +h])((r (Subscript[∇, -h])𝒰))'=r f[r] to repeat problem 1.

3) Compare your solutions from (1) and (2) to each other and the exact solution (given below) for the following f.  Use a couple of values of n to show both converge. Are the two techniques the same?  Is one better than the other?

f[r_]= r;
DSolve[
{
((u'[r])/r)+u''[r]==f[r],
u[2]==2,
u[4]==1
},
u[r],
r
]//Simplify