15 Laplace PDE in Spherical coordinates

15.1 Laplace in a sphere

____________________________________________________________________________________

15.1 Laplace in a sphere

problem number 123

Taken from Maple pdsolve help pages

Solve for \(u\left ( r,\theta ,\phi \right ) \)

\begin {align*} \frac {\partial }{\partial r} \left (r^2 \frac {\partial u}{\partial r} \right ) + \frac {1}{\sin \theta } \frac {\partial }{\partial \theta } \left (\sin \theta \frac {\partial u}{\partial \theta } \right ) + \frac {1}{\sin ^2\theta } \frac {\partial ^2 u}{\partial \phi ^2}=0 \end {align*}

Mathematica

ClearAll[u, \[Theta], \[Phi], r]; 
 ClearAll[u, r, \[Theta], \[Phi]]; 
 lap = Laplacian[f[r, \[Theta], \[Phi]], {r, \[Theta], \[Phi]}, "Spherical"]; 
 sol = AbsoluteTiming[TimeConstrained[DSolve[lap == 0, f[r, \[Theta], \[Phi]], {r, \[Theta], \[Phi]}, Assumptions -> 0 <= \[Theta] <= Pi], 60*10]];
 

\[ \text {Failed} \]

Maple

 
r:='r'; theta:='theta'; phi:='phi'; r:='r'; 
PDE := Diff(r^2*diff(F(r,theta,phi),r),r) 
          + 1/sin(theta)*Diff(sin(theta)*diff(F(r,theta,phi),theta),theta) 
          + 1/sin(theta)^2*diff(F(r,theta,phi),phi,phi) = 0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(PDE,F(r,theta,phi),'build')  assuming 0 <= theta, theta <= Pi),output='realtime')); 
sol:=simplify(sol,size);
 

\[ F \left ( r,\theta ,\phi \right ) ={\frac { \left ( \sin \left ( \theta \right ) \right ) ^{\sqrt {{\it \_c}_{{2}}}}\sqrt {2} \left ( -1 \right ) ^{1/2\,\sqrt {{\it \_c}_{{2}}}} \left ( {\it \_C5}\,\sin \left ( \sqrt {{\it \_c}_{{2}}}\phi \right ) +{\it \_C6}\,\cos \left ( \sqrt {{\it \_c}_{{2}}}\phi \right ) \right ) \left ( {\it \_C1}\,{r}^{1/2\,\sqrt {1+4\,{\it \_c}_{{1}}}}+{\it \_C2}\,{r}^{-1/2\,\sqrt {1+4\,{\it \_c}_{{1}}}} \right ) \left ( \cos \left ( \theta \right ) {\mbox {$_2$F$_1$}(1/2\,\sqrt {{\it \_c}_{{2}}}+1/4\,\sqrt {1+4\,{\it \_c}_{{1}}}+3/4,1/2\,\sqrt {{\it \_c}_{{2}}}-1/4\,\sqrt {1+4\,{\it \_c}_{{1}}}+3/4;\,3/2;\,1/2\,\cos \left ( 2\,\theta \right ) +1/2)}{\it \_C3}+{\it \_C4}\,{\mbox {$_2$F$_1$}(1/2\,\sqrt {{\it \_c}_{{2}}}+1/4\,\sqrt {1+4\,{\it \_c}_{{1}}}+1/4,1/2\,\sqrt {{\it \_c}_{{2}}}-1/4\,\sqrt {1+4\,{\it \_c}_{{1}}}+1/4;\,1/2;\,1/2\,\cos \left ( 2\,\theta \right ) +1/2)} \right ) }{\sqrt {r}}} \]