5.1.2 Polar coordinates

5.1.2.1 [307] Laplace PDE inside quarter disk, Neumann BC at edge
5.1.2.2 [308] r=4 and u=x4 at boundary of disk
5.1.2.3 [309] r=1 and ur=x at boundary of disk
5.1.2.4 [310] Laplace inside disk. General solution
5.1.2.5 [311] Laplace inside disk. Specific boundary conditions
5.1.2.6 [312] Haberman 2.5.5 (c)
5.1.2.7 [313] semi-circle
5.1.2.8 [314] Haberman 2.5.8 (b)
5.1.2.9 [315] Circular annulus
5.1.2.10 [316] Outside a disk
5.1.2.11 [317] Outside a disk

5.1.2.1 [307] Laplace PDE inside quarter disk, Neumann BC at edge

problem number 307

Added December 20, 2018.

Example 20, Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve Laplace equation in polar coordinates inside quarter disk with 0<r<1 and 0<θ<π2

Solve for u(r,θ) urr+1rur+1r2uθθ=0

Boundary conditions

u(r,0)=0u(r,π2)=0ur(1,θ)=f(θ)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[r, theta], {r, 2}] + (1*D[u[r, theta], r])/r + (1*D[u[r, theta], {theta, 2}])/r^2 == 0; 
 bcOnR = {Derivative[1, 0][u][1, theta] == f[theta]}; 
 bcOnTheta = {u[r, 0] == 0, u[r, Pi/2] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bcOnR, bcOnTheta}, u[r, theta], {r, theta}, Assumptions -> {r > 0, r < 1, theta > 0, theta < Pi/2}], 60*10]];
 

{{u(r,θ)K[1]=1r2K[1](0π22f(θ)sin(2θK[1])πdθ)sin(2θK[1])πK[1]}}

Maple

restart; 
pde := diff(u(r, theta), r$2)+1/r* diff(u(r, theta), r)+1/r^2* diff(u(r, theta), theta$2)= 0; 
bc_on_theta:=u(r, 0) = 0, u(r,Pi/2) = 0; 
bc_on_r:= eval( diff(u(r,theta),r),r=1)=f(theta); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc_on_theta,bc_on_r], u(r, theta), HINT = boundedseries(r = [0])) assuming theta>0, theta < (1/2)*Pi, r>0, r < 1),output='realtime'));
 

u(r,θ)=n=12r2n(0π2f(θ)sin(2nθ)dθ)sin(2nθ)πn

____________________________________________________________________________________

5.1.2.2 [308] r=4 and u=x4 at boundary of disk

problem number 308

Added Nov 10, 2019.

Problem 4.3.25 part c. Peter J. Olver, Introduction to Partial Differential Equations, 2014 edition.

Solve Laplace equation in polar coordinates inside a disk

Solve 2u=0 with x2+y2<4 and boundary conditions u=x4,x2+y2=4.

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[r, theta], {r, 2}] + (D[u[r, theta], r])/r + (D[u[r, theta], {theta, 2}])/r^2 == 0; 
bc  = u[4, theta] == (4*Cos[theta])^4; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}], 60*10]]; 
sol =  sol /. K[1] -> n;
 

{{u(r,θ)18r4cos(4θ)+8r2cos(2θ)+96}}

Maple

restart; 
pde := diff(u(r, theta), r$2) + diff(u(r, theta), r)/r + diff(u(r, theta), theta$2)/r^2 = 0; 
bc  := u(4, theta) = (4*cos(theta))^4, u(r, -Pi) = u(r, Pi), (D[2](u))(r, -Pi) = (D[2](u))(r, Pi); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], u(r, theta))),output='realtime'));
 

u(r,θ)=r4cos(4θ)8+8r2cos(2θ)+96

Hand solution

Solve the following boundary value problems 2u=0,x2+y2<4,u=x4,x2+y2=4

Solution

In polar coordinates, where x=rcosθ,y=rsinθ, we need to solve for u(r,θ) inside disk of radius r0=4. The Laplace PDE in polar coordinates isurr+1rur+1r2uθθ=00<r<r0,π<θ<πu(r0,θ)=f(θ)=(r0cosθ)4u(π)=u(π)uθ(π)=uθ(π)

Let the solution beu(r,θ)=R(r)Θ(θ) Substituting this assumed solution back into the (A) givesr2RΘ+rRΘ+RΘ=0 Dividing the above by RΘ givesr2RR+rRR+ΘΘ=0r2RR+rRR=ΘΘ

Since each side depends on different independent variable and they are equal, they must be equal to the same constant. say λ. r2RR+rRR=ΘΘ=λ This results in the following two ODE’s. The boundaries conditions in original PDE are transferred to each ODE which results in(1)Θ+λΘ=0Θ(π)=Θ(π)Θ(π)=Θ(π)

And(2)r2R+rRλR=0 Starting with ODE (1) with periodic boundary conditions.

Case λ<0 The solution isΘ(θ)=Acosh(|λ|θ)+Bsinh(|λ|θ) First B.C. givesΘ(π)=Θ(π)Acosh(|λ|π)+Bsinh(|λ|π)=Acosh(|λ|π)+Bsinh(|λ|π)Acosh(|λ|π)Bsinh(|λ|π)=Acosh(|λ|π)+Bsinh(|λ|π)2Bsinh(|λ|π)=0

But sinh=0 only at zero and λ0, hence B=0 and the solution becomesΘ(θ)=Acosh(|λ|θ)Θ(θ)=Aλcosh(|λ|θ)

Applying the second B.C. givesΘ(π)=Θ(π)A|λ|cosh(|λ|π)=A|λ|cosh(|λ|π)A|λ|cosh(|λ|π)=A|λ|cosh(|λ|π)2A|λ|cosh(|λ|π)=0

But cosh is never zero, hence A=0. Therefore trivial solution and λ<0 is not an eigenvalue.

Case λ=0 The solution is Θ=Aθ+B. Applying the first B.C. givesΘ(π)=Θ(π)Aπ+B=πA+B2πA=0A=0

And the solution becomes Θ=B0. A constant. Hence λ=0 is an eigenvalue.

Case λ>0

The solution becomesΘ=Acos(λθ)+Bsin(λθ)Θ=Aλsin(λθ)+Bλcos(λθ)

Applying first B.C. givesΘ(π)=Θ(π)Acos(λπ)+Bsin(λπ)=Acos(λπ)+Bsin(λπ)Acos(λπ)Bsin(λπ)=Acos(λπ)+Bsin(λπ)(3)2Bsin(λπ)=0

Applying second B.C. givesΘ(π)=Θ(π)Aλsin(λπ)+Bλcos(λπ)=Aλsin(λπ)+Bλcos(λπ)Aλsin(λπ)+Bλcos(λπ)=Aλsin(λπ)+Bλcos(λπ)Aλsin(λπ)=Aλsin(λπ)(4)2Asin(λπ)=0

Equations (3,4) can be both zero only if A=B=0 which gives trivial solution, or when sin(λπ)=0. Therefore taking sin(λπ)=0 gives a non-trivial solution. Henceλπ=nπn=1,2,3,λn=n2n=1,2,3,

Hence the eigenfunctions are (5){1,cos(nθ),sin(nθ)}n=1,2,3, Now the R equation is solved

The case for λ=0 gives from (2)r2R+rR=0R+1rR=0r0

The solution to this isR0(r)=Alnr+C Since u is bounded at r=0 we want A=0. Hence R0(r) is just a constant.

Case λ>0 The ODE (2) becomesr2R+rRn2R=0n=1,2,3, Let R=rp, the above becomesr2p(p1)rp2+rprp1n2rp=0p(p1)rp+prpn2rp=0p(p1)+pn2=0p2=n2p=±n

Hence the solution isRn(r)=Cnrn+Dn1rnn=1,2,3, Since u is bounded at r=0 we want D=0. Hence Rn(r)=Cnrn.

The complete solution for R(r) is(6)R(r)=C0+n=1Cnrn Using (5),(6)  givesun(r,θ)=RnΘnu(r,θ)=(C0+n=1Cnrn)(A0+n=1Ancos(nθ)+Bnsin(nθ))

Combining constants to simplify things gives(7)u(r,θ)=a02+n=1rn(Ancos(nθ)+Bnsin(nθ)) When r=r0 the above becomesf(θ)=a02+n=1r0n(Ancos(nθ)+Bnsin(nθ)) Hence a0=1πππf(θ)dθr0nAn=1πππf(θ)cos(nθ)dθAn=1πr0nππf(θ)cos(nθ)dθ

Andr0nBn=1πππf(θ)sin(nθ)dθBn=1πr0nππf(θ)sin(nθ)dθ

Hence (7) becomes(8)u(r,θ)=12πππf(θ)dθ+1πn=1(rr0)n(cos(nθ)ππf(θ)cos(nθ)dθ+sin(nθ)ππf(θ)sin(nθ)dθ) In this problem f(θ)=(r0cosθ)4 where r0=4, henceA0=1πππ256cos4θdθ=256πππcos4θdθ=256π(3θ8+14sin(2θ)+132sin(4θ))ππ=256π(3π8+3π8)=256π(3π4)=192

AndAn=1πππ256cos4(θ)cos(nθ)dθ=256πππcos4(θ)cos(nθ)dθ

To evaluate the above integral, we will start by using the identity cos4(θ)=38+18cos(4θ)+12cos(2θ) Therefore the integral now becomesAn=256πππ(38+18cos(4θ)+12cos(2θ))cos(nθ)dθ(1)=256π[38ππcos(nθ)dθ+18ππcos(4θ)cos(nθ)dθ+12ππcos(2θ)cos(nθ)dθ]

But ππcos(nθ)dθ=0 and ππcos(4θ)cos(nθ)dθ is not zero, only for n=4 by orthogonality of cosine functions. Hence ππcos(4θ)cos(nθ)dθ=ππcos2(4θ)dθ=π

And similarly, ππcos(2θ)cos(nθ)dθ is not zero, only for n=2 by orthogonality of cosine functions. Henceππcos(2θ)cos(nθ)dθ=ππcos2(2θ)dθ=π

Using these results in (1) gives, for n=2A2=256π[12ππcos2(2θ)dθ]=256π(π2)=128

And for n=4A4=256π[18ππcos2(4θ)dθ]=256π(π8)=32

And all other An are zero. Now that we found all An, and since Bn=0 for all n (because f(θ) is even function) then the solution (8) becomesu(r,θ)=1922+a2(r4)2cos(2θ)+a4(r4)4cos(4θ)=96+128(r216)cos(2θ)+32r4256cos(4θ)

Thereforeu(r,θ)=96+8r2cos(2θ)+18r4cos(4θ) Here is plot of the above solution.

____________________________________________________________________________________

5.1.2.3 [309] r=1 and ur=x at boundary of disk

problem number 309

Added January 8, 2020.

Problem 4.3.25 part d, Peter J. Olver, Introduction to Partial Differential Equations, 2014 edition.

Solve Laplace equation in polar coordinates inside a disk of radius 1.

Solve 2u=0 and boundary conditions un=x.

Mathematica

ClearAll["Global`*"]; 
pde = Laplacian[u[r, theta], {r, theta}, "Polar"] == 0; 
bc = {Derivative[1, 0][u][1, theta] == Cos[theta], u[r, -Pi] == u[r, Pi], Derivative[0, 1][u][r, -Pi] == Derivative[0, 1][u][r, Pi]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}], 60*10]];
 

Failed

Maple

restart; 
pde:=VectorCalculus:-Laplacian(u(r,theta),'polar'[r,theta])=0; 
bc  := D[1](u)(1, theta) = cos(theta), u(r, -Pi) = u(r, Pi), (D[2](u))(r, -Pi) = (D[2](u))(r, Pi); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], u(r, theta))),output='realtime'));
 

sol=()

Hand solution

In polar coordinates, where x=rcosθ,y=rsinθ, we need to solve for u(r,θ) inside disk of radius r0=1. The Laplace PDE in polar coordinates isurr+1rur+1r2uθθ=00<r<1,π<θ<πur(1,θ)=f(θ)=cosθu(π)=u(π)uθ(π)=uθ(π)

Using separation of variables, let u(r,θ)=R(r)Θ(θ) the solution is given by(1)u(r,θ)=a02+n=1anrncos(nθ)+bnrnsin(nθ) At r=r0=1 we have that u(r,θ)r=cosθ (since x=rcosθ but r=1 at boundary). The above becomescosθ=n=1nanrn1cos(nθ)+nbnrn1sin(nθ) Therefore n=1 is only term that survives in the sum. Hence a1=1 and all others are zero. The solution (1) becomesu(r,θ)=a02+rcos(θ) The solution is not unique as there is a0 arbitrary constant.

____________________________________________________________________________________

5.1.2.4 [310] Laplace inside disk. General solution

problem number 310

Solve Laplace equation in polar coordinates inside a disk

Solve for u(r,θ) urr+1rur+1r2uθθ=0

With 0ra,0<θ2π Boundary conditions u(a,θ)=f(θ)|u(0,θ)|<u(r,0)=u(r,2π)uθ(r,0)=uθ(r,2π)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[r, theta], {r, 2}] + (1*D[u[r, theta], r])/r + (1*D[u[r, theta], {theta, 2}])/r^2 == 0; 
bc  = u[a, theta] == f[theta]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}, Assumptions -> a < r && a > 0 && Inequality[0, Less, theta, LessEqual, 2*Pi]], 60*10]]; 
sol =  sol /. K[1] -> n;
 

{{u(r,θ)n=1(ra)n(cos(nθ)ππcos(nθ)f(θ)dθ+(ππf(θ)sin(nθ)dθ)sin(nθ))π+ππf(θ)dθ2π}}

Maple

restart; 
interface(showassumed=0); 
pde := (diff(r*(diff(u(r, theta), r)), r))/r +(diff(u(r, theta), theta, theta))/r^2 = 0; 
bc  := u(a, theta) = f(theta), 
      u(r, -Pi) = u(r, Pi), 
      (D[2](u))(r, -Pi) = (D[2](u))(r, Pi); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], u(r, theta), HINT = boundedseries(r=0))),output='realtime'));
 

u(r,θ)=ππf(θ)dθ+2π(n=1((ππcos(nθ)f(θ)dθ)cos(nθ)+(ππf(θ)sin(nθ)dθ)sin(nθ))(ar)nπ)2π

____________________________________________________________________________________

5.1.2.5 [311] Laplace inside disk. Specific boundary conditions

problem number 311

Added January 12, 2020

Solve uxx+uyy=0 on disk x2+y2<1 with boundary condition xy2 when x2+y2=a. Where a=1 in this problem. Express solution in x,y

The first step is to convert the boundary condition to polar coordinates. Since x=rcosθ,y=rsinθ, then at the boundary u(r,θ)=rcosθ(rsinθ)2. But r=1 (the radius). Hence at the boundary, u(1,θ)=f(θ) where f(θ)=cosθsin2θ=cosθ(1cos2θ)=cosθcos3θ

But cos3θ=34cosθ+14cos3θ. Therefore the above becomesf(θ)=cosθ(34cosθ+14cos3θ)(1)=14cosθ14cos3θ

The above is also seen as the Fourier series of f(θ). The PDE in polar coordinates isurr+1rur+1r2uθθ=0

Mathematica

ClearAll["Global`*"]; 
a = 1; 
pde = Laplacian[u[r, theta], {r, theta}, "Polar"] == 0; 
f[theta_] := 1/4*(Cos[theta] - Cos[3*theta]); 
bc = {u[a, theta] == f[theta], u[r, -Pi] == u[r, Pi], Derivative[0, 1][u][r, -Pi] == Derivative[0, 1][u][r, Pi]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}], 60*10]];
 

{{u(r,θ)14(rcos(θ)r3cos(3θ))}}

Maple

restart; 
f:=theta-> 1/4*(cos(theta) - cos(3*theta)); 
a:=1; 
pde := VectorCalculus:-Laplacian(u(r,theta),'polar'[r,theta]); 
bc := u(a, theta) = f(theta),u(r, -Pi) = u(r, Pi),(D[2](u))(r, -Pi) = (D[2](u))(r, Pi); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], u(r, theta), HINT = boundedseries(r=0))),output='realtime')); 
sol:=simplify(subs(cos(theta)^3=trigsubs(cos(theta)^3)[2],sol),size);
 

u(r,θ)=(r2cos(3θ)cos(θ))r4

Hand solution

Solve uxx+uyy=0 on disk x2+y2<1 with boundary condition xy2 when x2+y2=a. Where a=1 in this problem. Express solution in x,y

The first step is to convert the boundary condition to polar coordinates. Since x=rcosθ,y=rsinθ, then at the boundary u(r,θ)=rcosθ(rsinθ)2. But r=1 (the radius). Hence at the boundary, u(1,θ)=f(θ) where f(θ)=cosθsin2θ=cosθ(1cos2θ)=cosθcos3θ

But cos3θ=34cosθ+14cos3θ. Therefore the above becomesf(θ)=cosθ(34cosθ+14cos3θ)(1)=14cosθ14cos3θ

The above is also seen as the Fourier series of f(θ). The PDE in polar coordinates isurr+1rur+1r2uθθ=0 The solution is known to be(2)u(r,θ)=c02+n=1rn(cncos(nθ)+knsin(nθ)) Since the above solution is the same as f(θ) when r=1, then equating (2) when r=1 to (1) gives14cosθ14cos3θ=c02+n=1(cncos(nθ)+knsin(nθ)) By comparing terms on both sides, this shows by inspection thatc0=0c1=14c3=14

And all other cn,kn are zero. Using the above result back in (2) gives the solution as(3)u(r,θ)=r4cosθr34cos3θ This solution is now converted to xy using the formularncosnθ=k=0evenn(nk)xnk(1)k2yk=k=0evennn!k!(nk)!xnk(1)k2yk

For n=1 the above givesrcosθ=1!0!(10)!x10(1)0y0(4)=x

And for n=3r3cos3θ=3!0!(30)!x30(1)0y0+3!2!(32)!x32(1)1y2(5)=x33xy2

Using (4,5) in (3) gives the solution in x,y(6)u(x,y)=14x14(x33xy2) This is now verified that is satisfies the PDE uxx+uyy=0.ux=1414(3x23y2)2ux2=64x

Anduy=64xy2uy2=64x

Therefore 2ux2+2uy2=0.

Now the boundary conditions u(x,y)=xy2 are also verified. This condition applies when x2+y2=1 or y2=1x2. Substituting this into (6) givesu(x,y)@D=14x14(x33x(1x2)y2) Simplifying givesu(x,y)@D=14x14(x3(3x3x3))=14x14x3+14(3x3x3)=14x14x3+34x34x3=xx3=x(1x2)=xy2

Verified. This is 3D plot of the solution

pict

This is a contour plot

pict

____________________________________________________________________________________

5.1.2.6 [312] Haberman 2.5.5 (c)

problem number 312

This is problem 2.5.5 part (c) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation urr+1rur+1r2uθθ=0 Inside quarter circle of radius 1 with 0θπ2 and 0r1, with following boundary conditions u(r,0)=0u(r,π2)=0ur(1,θ)=f(θ)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[r, theta], {r, 2}] + (1*D[u[r, theta], r]*1*D[u[r, theta], {theta, 2}])/(r*r^2) == 0; 
bc  = {Derivative[1, 0][u][1, theta] == f[theta], u[r, Pi/2] == 0, u[r, 0] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}, Assumptions -> {0 <= r <= 1 && 0 <= theta <= Pi/2}], 60*10]];
 

Failed

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(r,theta),r$2)+ 1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0; 
bc  := u(r,0)=0,u(r,Pi/2)=0,D[1](u)(1,theta)=f(theta); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(r,theta),HINT=boundedseries(r=0)) assuming 0<=theta,theta<=Pi/2,0<=r,r<=1),output='realtime'));
 

u(r,θ)=n=12r2n(0π2f(θ)sin(2nθ)dθ)sin(2nθ)πn

Hand solution

The Laplace PDE in polar coordinates is  (A)r22ur2+rur+2uθ2=0 With boundary conditions u(r,0)=0(B)u(r,π2)=0u(1,θ)=f(θ)

Assuming the solution can be written as u(r,θ)=R(r)Θ(θ) And substituting this assumed solution back into the (A) givesr2RΘ+rRΘ+RΘ=0 Dividing the above by RΘ0 givesr2RR+rRR+ΘΘ=0r2RR+rRR=ΘΘ

Since each side depends on different independent variable and they are equal, they must be equal to same constant. say λ. r2RR+rRR=ΘΘ=λ This results in the following two ODE’s. The boundaries conditions in (B) are also transferred to each ODE. This givesΘ+λΘ=0(1)Θ(0)=0Θ(π2)=0

And(2)r2R+rRλR=0|R(0)|<

Starting with (1). Consider the Case λ<0. The solution in this case will be Θ=Acosh(λθ)+Bsinh(λθ) Applying first B.C. gives A=0. The solution becomes Θ=Bsinh(λθ). Applying second B.C. gives 0=Bsinh(λπ2) But sinh is zero only when λπ2=0 which is not the case here. Therefore B=0 and hence trivial solution. Hence λ<0 is not an eigenvalue.

Case λ=0 The ODE becomes Θ=0 with solution Θ=Aθ+B. First B.C. gives 0=B. The solution becomes Θ=Aθ. Second B.C. gives 0=Aπ2, hence A=0 and trivial solution. Therefore λ=0 is not an eigenvalue.

Case λ>0 The ODE becomes Θ+λΘ=0 with solution Θ=Acos(λθ)+Bsin(λθ) The first B.C. gives 0=A. The solution becomes Θ=Bsin(λθ) And the second B.C. gives 0=Bsin(λπ2) For non-trivial solution sin(λπ2)=0 or λπ2=nπ for n=1,2,3,. Hence the eigenvalues areλn=2nλn=4n2n=1,2,3,

And the eigenfunctions are (3)Θn(θ)=Bnsin(2nθ)n=1,2,3, Now the R ODE is solved. There is one case to consider, which is λ>0 based on the above. The ODE isr2R+rRλnR=0r2R+rR4n2R=0n=1,2,3,

This is Euler ODE. Let R(r)=rp. Then R=prp1 and R=p(p1)rp2. This givesr2(p(p1)rp2)+r(prp1)4n2rp=0((p2p)rp)+prp4n2rp=0rpp2prp+prp4n2rp=0p24n2=0p=±2n

Hence the solution isR(r)=Cr2n+D1r2n Applying the condition that |R(0)|< implies D=0, and the solution becomes(4)Rn(r)=Cnr2nn=1,2,3, Using (3,4) the solution un(r,θ) isun(r,θ)=RnΘn=Cnr2nBnsin(2nθ)=Bnr2nsin(2nθ)

Where CnBn was combined into one constant Bn. (No need to introduce new symbol). The final solution isu(r,θ)=n=1un(r,θ)=n=1Bnr2nsin(2nθ)

Now the nonhomogeneous condition is applied to find Bn.ru(r,θ)=n=1Bn(2n)r2n1sin(2nθ) Hence ru(1,θ)=f(θ) becomesf(θ)=n=12Bnnsin(2nθ) Multiplying by sin(2mθ) and integrating gives0π2f(θ)sin(2mθ)dθ=0π2sin(2mθ)n=12Bnnsin(2nθ)dθ(5)=n=12nBn0π2sin(2mθ)sin(2nθ)dθ

When n=m then0π2sin(2mθ)sin(2nθ)dθ=0π2sin2(2nθ)dθ=0π2(1212cos4nθ)dθ=12[θ]0π212[sin4nθ4n]0π2=π4(18n(sin4n2π)sin(0))

And since n is integer, then sin4n2π=sin2nπ=0 and the above becomes π4.

Now for the case when nm using sinAsinB=12(cos(AB)cos(A+B)) then0π2sin(2mθ)sin(2nθ)dθ=0π212(cos(2mθ2nθ)cos(2mθ+2nθ))dθ=120π2cos(2mθ2nθ)dθ120π2cos(2mθ+2nθ)dθ=120π2cos((2m2n)θ)dθ120π2cos((2m+2n)θ)dθ=12[sin((2m2n)θ)(2m2n)]0π212[sin((2m+2n)θ)(2m+2n)]0π2=14(mn)[sin((2m2n)θ)]0π214(m+n)[sin((2m+2n)θ)]0π2=14(mn)[sin((2m2n)π2)0]14(m+n)[sin((2m+2n)π2)0]

Since 2m2nπ2=π(mn) which is integer multiple of π and also (2m+2n)π2 is integer multiple of π then the whole term above becomes zero. Therefore (5) becomes0π2f(θ)sin(2mθ)dθ=2mBmπ4 HenceBn=2πn0π2f(θ)sin(2nθ)dθ Summary: the final solution isu(r,θ)=2πn=11n[0π2f(θ)sin(2nθ)dθ](r2nsin(2nθ))

____________________________________________________________________________________

5.1.2.7 [313] semi-circle

problem number 313

Solve Laplace equation urr+1rur+1r2uθθ=0 Inside semi-circle of radius 1 with 0θπ and 0r1, with following boundary conditions u(r,0)=0u(r,π)=0u(1,θ)=f(θ)

Mathematica

ClearAll["Global`*"]; 
pde = D[u[r, theta], {r, 2}] + (1/r) D[u[r, theta], r] + 1/r^2*D[u[r, theta], {theta, 2}] == 0; 
bc  = {u[r, 0] == 0, u[r, Pi] == 0, u[1, theta] == f[theta]}; 
sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}, Assumptions -> {0 < r <= 1 && 0 < theta < Pi}], 60*10]];
 

{{u(r,θ)K[1]=12πrK[1](0π2πf(θ)sin(θK[1])dθ)sin(θK[1])}}

Maple

restart; 
pde := diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0; 
bc  := u(r,0)=0,u(r,Pi)=0,u(1,theta)=f(theta); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(r,theta),HINT=boundedseries) assuming 0<r,r<1,0<theta,theta<Pi),output='realtime'));
 

u(r,θ)=n=12rn(0πf(θ)sin(nθ)dθ)sin(nθ)π

____________________________________________________________________________________

5.1.2.8 [314] Haberman 2.5.8 (b)

problem number 314

This is problem 2.5.8 part (b) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation 2u(r,θ)=0 or urr+1rur+1r2uθθ=0 Inside circular annulus a<r<b subject to the following boundary conditions ur(a,θ)=0u(b,θ)=g(θ)

Mathematica

ClearAll["Global`*"]; 
pde = D[u[r, theta], {r, 2}] + 1/r*D[u[r, theta], r] + 1/r^2*D[u[r, theta], {theta, 2}] == 0; 
bc  = {Derivative[1, 0][u][a, theta] == 0, u[b, theta] == g[theta]}; 
sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}, Assumptions -> a < r < b], 60*10]];
 

{{u(r,θ){02πg(K[2])dK[2]2π+K[1]=1(cos(θK[1])(a2K[1]bK[1](02πcos(K[1]K[2])g(K[2])πdK[2])rK[1]a2K[1]+b2K[1]+bK[1](02πcos(K[1]K[2])g(K[2])πdK[2])rK[1]a2K[1]+b2K[1])+(a2K[1]bK[1](02πg(K[2])sin(K[1]K[2])πdK[2])rK[1]a2K[1]+b2K[1]+bK[1](02πg(K[2])sin(K[1]K[2])πdK[2])rK[1]a2K[1]+b2K[1])sin(θK[1]))arbIndeterminateTrue}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0; 
bc:=D[1](u)(a,theta)=0,u(b,theta)=g(theta); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(r,theta)) assuming a<r,r<b),output='realtime'));
 

u(r,θ)=g(θ)F1(asbsF(g(θ),θ,s)asbs+asbs,s,θ)+F1(asrsF(g(θ),θ,s)asbs+asbs,s,θ)F1(asbsF(g(θ),θ,s)asbs+asbs,s,θ)+F1(asrsF(g(θ),θ,s)asbs+asbs,s,θ)

Hand solution

The Laplace PDE in polar coordinates is  (A)r22ur2+rur+2uθ2=0 Withur(a,θ)=0(B)u(b,θ)=g(θ)

Assuming the solution can be written as u(r,θ)=R(r)Θ(θ) And substituting this assumed solution back into the (A) givesr2RΘ+rRΘ+RΘ=0 Dividing the above by RΘ givesr2RR+rRR+ΘΘ=0r2RR+rRR=ΘΘ

Since each side depends on different independent variable and they are equal, they must be equal to same constant. say λ. r2RR+rRR=ΘΘ=λ This results in the following two ODE’s. The boundaries conditions in (B) are also transferred to each ODE. This results in(1)Θ+λΘ=0Θ(π)=Θ(π)Θ(π)=Θ(π)

And(2)r2R+rRλR=0R(a)=0

Starting with (1)

Case λ<0 The solution isΘ(θ)=Acosh(|λ|θ)+Bsinh(|λ|θ) First B.C. givesΘ(π)=Θ(π)Acosh(|λ|π)+Bsinh(|λ|π)=Acosh(|λ|π)+Bsinh(|λ|π)Acosh(|λ|π)Bsinh(|λ|π)=Acosh(|λ|π)+Bsinh(|λ|π)2Bsinh(|λ|π)=0

But sinh=0 only at zero and λ0, hence B=0 and the solution becomesΘ(θ)=Acosh(|λ|θ)Θ(θ)=Aλcosh(|λ|θ)

Applying the second B.C. givesΘ(π)=Θ(π)A|λ|cosh(|λ|π)=A|λ|cosh(|λ|π)A|λ|cosh(|λ|π)=A|λ|cosh(|λ|π)2A|λ|cosh(|λ|π)=0

But cosh is never zero, hence A=0. Therefore trivial solution and λ<0 is not an eigenvalue.

Case λ=0 The solution is Θ=Aθ+B. Applying the first B.C. givesΘ(π)=Θ(π)Aπ+B=πA+B2πA=0A=0

And the solution becomes Θ=B0. A constant. Hence λ=0 is an eigenvalue.

Case λ>0

The solution becomesΘ=Acos(λθ)+Bsin(λθ)Θ=Aλsin(λθ)+Bλcos(λθ)

Applying first B.C. givesΘ(π)=Θ(π)Acos(λπ)+Bsin(λπ)=Acos(λπ)+Bsin(λπ)Acos(λπ)Bsin(λπ)=Acos(λπ)+Bsin(λπ)(3)2Bsin(λπ)=0

Applying second B.C. givesΘ(π)=Θ(π)Aλsin(λπ)+Bλcos(λπ)=Aλsin(λπ)+Bλcos(λπ)Aλsin(λπ)+Bλcos(λπ)=Aλsin(λπ)+Bλcos(λπ)Aλsin(λπ)=Aλsin(λπ)(4)2Asin(λπ)=0

Equations (3,4) can be both zero only if A=B=0 which gives trivial solution, or when sin(λπ)=0. Therefore taking sin(λπ)=0 gives a non-trivial solution. Henceλπ=nπn=1,2,3,λn=n2n=1,2,3,

Hence the solution for Θ is(5)Θ=A0+n=1Ancos(nθ)+Bnsin(nθ) Now the R equation is solved

The case for λ=0 givesr2R+rR=0R+1rR=0r0

As was done in last problem, the solution to this isR(r)=Aln|r|+C Since r>0 no need to keep worrying about |r| and is removed for simplicity. Applying the B.C. givesR=A1r Evaluating at r=a gives0=A1a Hence A=0, and the solution becomesR(r)=C0 Which is a constant.

Case λ>0 The ODE in this case is r2R+rRn2R=0n=1,2,3, Let R=rp, the above becomesr2p(p1)rp2+rprp1n2rp=0p(p1)rp+prpn2rp=0p(p1)+pn2=0p2=n2p=±n

Hence the solution isRn(r)=Crn+D1rnn=1,2,3, Applying the boundary condition R(a)=0 givesRn(r)=nCnrn1nDn1rn+10=Rn(a)=nCnan1nDn1an+1=nCna2nnDn=Cna2nDnDn=Cna2n

The solution becomesRn(r)=Cnrn+Cna2n1rnn=1,2,3,=Cn(rn+a2nrn)

Hence the complete solution for R(r) is(6)R(r)=C0+n=1Cn(rn+a2nrn) Using (5),(6)  givesun(r,θ)=RnΘnu(r,θ)=[C0+n=1Cn(rn+a2nrn)][A0+n=1Ancos(nθ)+Bnsin(nθ)]=D0+n=1Ancos(nθ)Cn(rn+a2nrn)+n=1Bnsin(nθ)Cn(rn+a2nrn)

Where D0=C0A0. To simplify more, AnCn is combined to An and BnCn is combined to Bn. The full solution isu(r,θ)=D0+n=1An(rn+a2nrn)cos(nθ)+n=1Bn(rn+a2nrn)sin(nθ) The final nonhomogeneous B.C. is applied.u(b,θ)=g(θ)g(θ)=D0+n=1An(bn+a2nbn)cos(nθ)+n=1Bn(bn+a2nbn)sin(nθ)

For n=0, integrating both sides giveππg(θ)dθ=ππD0dθD0=12πππg(θ)dθ

For n>0, multiplying both sides by cos(mθ) and integrating givesππg(θ)cos(mθ)dθ=ππD0cos(mθ)dθ+ππn=1An(bn+a2nbn)cos(mθ)cos(nθ)dθ+ππn=1Bn(bn+a2nbn)cos(mθ)sin(nθ)dθ

Henceππg(θ)cos(mθ)dθ=ππD0cos(mθ)dθ+n=1An(bn+a2nbn)ππcos(mθ)cos(nθ)dθ(7)+n=1Bn(bn+a2nbn)ππcos(mθ)sin(nθ)dθ

But ππcos(mθ)cos(nθ)dθ=πn=m0ππcos(mθ)cos(nθ)dθ=0nm

Andππcos(mθ)sin(nθ)dθ=0 AndππD0cos(mθ)dθ=0 Then (7) becomesππg(θ)cos(nθ)dθ=πAn(bn+a2nbn)(8)An=1πππg(θ)cos(nθ)dθbn+a2nbn

Again, multiplying both sides by sin(mθ) and integrating givesππg(θ)sin(mθ)dθ=ππD0sin(mθ)dθ+ππn=1An(bn+a2nbn)sin(mθ)cos(nθ)dθ+ππn=1Bn(bn+a2nbn)sin(mθ)sin(nθ)dθ

Henceππg(θ)sin(mθ)dθ=ππD0sin(mθ)dθ+n=1An(bn+a2nbn)ππsin(mθ)cos(nθ)dθ(9)+n=1Bn(bn+a2nbn)ππsin(mθ)sin(nθ)dθ

But ππsin(mθ)sin(nθ)dθ=πn=m0ππsin(mθ)sin(nθ)dθ=0nm

Andππsin(mθ)cos(nθ)dθ=0 AndππD0sin(mθ)dθ=0 Then (9) becomesππg(θ)sin(nθ)dθ=πBn(bn+a2nbn)Bn=1πππg(θ)sin(nθ)dθbn+a2nbn

This complete the solution. Summaryu(r,θ)=D0+n=1An(rn+a2nrn)cos(nθ)+n=1Bn(rn+a2nrn)sin(nθ)D0=12πππg(θ)dθAn=1πππg(θ)cos(nθ)dθbn+a2nbnBn=1πππg(θ)sin(nθ)dθbn+a2nbn

____________________________________________________________________________________

5.1.2.9 [315] Circular annulus

problem number 315

Solve Laplace equation urr+1rur+1r2uθθ=0

Inside circular annulus 1<r<2 subject to the following boundary conditions u(1,θ)=0u(2,θ)=sinθ

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[r, theta], {r, 2}] + (1*D[u[r, theta], r])/r + (1*D[u[r, theta], {theta, 2}])/r^2 == 0; 
bc  = {u[1, theta] == 0, u[2, theta] == Sin[theta]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}], 60*10]];
 

{{u(r,θ){2(r21)sin(θ)3r1r2IndeterminateTrue}}

Maple

restart; 
pde := diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0; 
bc  := u(1,theta)=0,u(2,theta)=sin(theta); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(r,theta))),output='realtime'));
 

u(r,θ)=2(r21)sin(θ)3r

____________________________________________________________________________________

5.1.2.10 [316] Outside a disk

problem number 316

Solve Laplace equation in polar coordinates outside a disk

Solve for u(r,θ) urr+1rur+1r2uθθ=0ar0<θ2π

Boundary conditions u(a,θ)=f(θ)|u(0,θ)|<u(r,0)=u(r,2π)uθ(r,0)=uθ(r,2π)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[r, theta], {r, 2}] + 1/r*D[u[r, theta], r] + 1/r^2*D[u[r, theta], {theta, 2}] == 0; 
bc  = {u[a, theta] == f[theta], u[r, -Pi] == u[r, Pi], Derivative[0, 1][u][r, -Pi] == Derivative[0, 1][u][r, Pi]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}, Assumptions -> {a > 0, r > a}], 60*10]];
 

{{u(r,θ)K[1]=1aK[1]rK[1](cos(θK[1])ππcos(θK[1])f(θ)πdθ+(ππf(θ)sin(θK[1])πdθ)sin(θK[1]))π+ππf(θ)2πdθ2π}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(r, theta), r$2) + 1/r* diff(u(r,theta),r) + 1/r^2* diff(u(r, theta), theta$2) = 0; 
bc  := u(a, theta) = f(theta), u(r, -Pi) = u(r, Pi), (D[2](u))(r, -Pi) = (D[2](u))(r, Pi); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], u(r, theta), HINT = boundedseries(r=infinity))),output='realtime'));
 

u(r,θ)=ππf(θ)dθ+2π(n=1((ππcos(nθ)f(θ)dθ)cos(nθ)+(ππf(θ)sin(nθ)dθ)sin(nθ))(ra)nπ)2π

____________________________________________________________________________________

5.1.2.11 [317] Outside a disk

problem number 317

Added January 13, 2020

Laplace PDE in polar coordinates outside a disk

Solve uxx+uyy=0 outside disk x2+y2>1 with boundary condition xy2 when x2+y2=a. Where a=1 in this problem. Express solution in x,y

The first step is to convert the boundary condition to polar coordinates. Since x=rcosθ,y=rsinθ, then at the boundary u(r,θ)=rcosθ(rsinθ)2. But r=1 (the radius). Hence at the boundary, u(1,θ)=f(θ) where f(θ)=cosθsin2θ=cosθ(1cos2θ)=cosθcos3θ

But cos3θ=34cosθ+14cos3θ. Therefore the above becomesf(θ)=cosθ(34cosθ+14cos3θ)(1)=14cosθ14cos3θ

The above is also seen as the Fourier series of f(θ). The PDE in polar coordinates isurr+1rur+1r2uθθ=0

Mathematica

ClearAll["Global`*"]; 
a=1; 
pde = Laplacian[u[r, theta], {r, theta}, "Polar"] == 0; 
f[theta_] := 1/4*(Cos[theta] - Cos[3*theta]); 
bc = {u[a, theta] == f[theta], u[r, -Pi] == u[r, Pi], Derivative[0, 1][u][r, -Pi] == Derivative[0, 1][u][r, Pi]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[r, theta], {r, theta}, Assumptions -> r > a], 60*10]];
 

{{u(r,θ)14(rcos(θ)r3cos(3θ))}}

Maple

restart; 
f:=theta-> 1/4*(cos(theta) - cos(3*theta)); 
a:=1; 
pde := VectorCalculus:-Laplacian(u(r,theta),'polar'[r,theta]); 
bc := u(a, theta) = f(theta),u(r, -Pi) = u(r, Pi),(D[2](u))(r, -Pi) = (D[2](u))(r, Pi); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], u(r, theta), HINT = boundedseries(r=infinity))),output='realtime')); 
sol:=simplify(subs(cos(theta)^3=trigsubs(cos(theta)^3)[2],expand(sol)),size);
 

u(r,θ)=r2cos(θ)cos(3θ)4r3

Hand solution

The first step is to convert the boundary condition to polar coordinates. Since x=rcosθ,y=rsinθ, then at the boundary u(r,θ)=rcosθ(rsinθ)2. But r=1 (the radius). Hence at the boundary, u(1,θ)=f(θ) where f(θ)=cosθsin2θ=cosθ(1cos2θ)=cosθcos3θ

But cos3θ=34cosθ+14cos3θ. Therefore the above becomesf(θ)=cosθ(34cosθ+14cos3θ)(1)=14cosθ14cos3θ

The above is also seen as the Fourier series of f(θ). The PDE in polar coordinates isurr+1rur+1r2uθθ=0 The solution is known to be(2)u(r,θ)=c02+n=1rn(cncos(nθ)+knsin(nθ)) Since the above solution is the same as f(θ) when r=1, then equating (2) when r=1 to (1) gives14cosθ14cos3θ=c02+n=1(cncos(nθ)+knsin(nθ)) By comparing terms on both sides, this shows by inspection thatc0=0c1=14c3=14

And all other cn,kn are zero. Using the above result back in (2) gives the solution as u(r,θ)=r14cosθr34cos3θ(3)=r2cos(θ)cos(3θ)4r3

This is 3D plot of the solution

pict

This is a contour plot

pict