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
Solve for
Boundary conditions
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]];
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'));
____________________________________________________________________________________
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
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;
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'));
Hand solution
Solve the following boundary value problems
Solution
In polar coordinates, where
Let the solution be
Since each side depends on different independent variable and they are equal, they must be
equal to the same constant. say
And
Case
But
Applying the second B.C. gives
But
Case
And the solution becomes
Case
The solution becomes
Applying first B.C. gives
Applying second B.C. gives
Equations (3,4) can be both zero only if
Hence the eigenfunctions are
The case for
The solution to this is
Case
Hence the solution is
The complete solution for
Combining constants to simplify things gives
And
Hence (7) becomes
And
To evaluate the above integral, we will start by using the identity
But
And similarly,
Using these results in (1) gives, for
And for
And all other
Therefore
____________________________________________________________________________________
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
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
Using separation of variables, let
____________________________________________________________________________________
Solve Laplace equation in polar coordinates inside a disk
Solve for
With
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;
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'));
____________________________________________________________________________________
Added January 12, 2020
Solve
The first step is to convert the boundary condition to polar coordinates. Since
But
The above is also seen as the Fourier series of
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]];
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);
Hand solution
Solve
The first step is to convert the boundary condition to polar coordinates. Since
But
The above is also seen as the Fourier series of
And all other
For
And for
Using (4,5) in (3) gives the solution in
And
Therefore
Now the boundary conditions
Verified. This is 3D plot of the solution
This is a contour plot
____________________________________________________________________________________
This is problem 2.5.5 part (c) from Richard Haberman applied partial differential equations, 5th edition
Solve Laplace equation
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'));
Hand solution
The Laplace PDE in polar coordinates is
Assuming the solution can be written as
Since each side depends on different independent variable and they are equal, they must be
equal to same constant. say
And
Starting with (1). Consider the Case
Case
Case
And the eigenfunctions are
This is Euler ODE. Let
Hence the solution is
Where
Now the nonhomogeneous condition is applied to find
When
And since
Now for the case when
Since
____________________________________________________________________________________
Solve Laplace equation
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]];
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'));
____________________________________________________________________________________
This is problem 2.5.8 part (b) from Richard Haberman applied partial differential equations, 5th edition
Solve Laplace equation
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]];
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'));
Hand solution
The Laplace PDE in polar coordinates is
Assuming the solution can be written as
Since each side depends on different independent variable and they are equal, they
must be equal to same constant. say
And
Starting with (1)
Case
But
Applying the second B.C. gives
But
Case
And the solution becomes
Case
The solution becomes
Applying first B.C. gives
Applying second B.C. gives
Equations (3,4) can be both zero only if
Hence the solution for
The case for
As was done in last problem, the solution to this is
Case
Hence the solution is
The solution becomes
Hence the complete solution for
Where
For
For
Hence
But
And
Again, multiplying both sides by
Hence
But
And
This complete the solution. Summary
____________________________________________________________________________________
Solve Laplace equation
Inside circular annulus
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]];
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'));
____________________________________________________________________________________
Solve Laplace equation in polar coordinates outside a disk
Solve for
Boundary conditions
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]];
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'));
____________________________________________________________________________________
Added January 13, 2020
Laplace PDE in polar coordinates outside a disk
Solve
The first step is to convert the boundary condition to polar coordinates. Since
But
The above is also seen as the Fourier series of
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]];
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);
Hand solution
The first step is to convert the boundary condition to polar coordinates. Since
But
The above is also seen as the Fourier series of
And all other
This is 3D plot of the solution
This is a contour plot