Exercise 4

Find the Laplacian of the following in spherical coordinates:
u=r
u=r^2
u=sin(phi)
u=r^2sin(theta)

Do any solve Laplace's Equation?

In[80]:=

  Clear[r,theta,phi,x,y,z]

In[81]:=

  x[r_,t_,p_]:=r Cos[t] Sin[p]
  y[r_,t_,p_]:=r Sin[t] Sin[p]
  z[r_,t_,p_]:=r Cos[p]

In[82]:=

  x[r,theta,phi]
  y[r,theta,phi]
  z[r,theta,phi]

Out[82]=

  r Cos[theta] Sin[phi]

Out[83]=

  r Sin[phi] Sin[theta]

Out[84]=

  r Cos[phi]

In[85]:=

  Clear[a,b,c]
  {a,b,c}=Simplify[scalefactors[x,y,z][r,theta,phi]]

Out[85]=

            2         2         2
  {1, Sqrt[r  Sin[phi] ], Sqrt[r ]}

In[86]:=

  Clear[u1,u2,u3,u4]
  u1[r_,t_,p_]:=r
  u2[r_,t_,p_]:=r^2
  u3[r_,t_,p_]:=Sin[p]
  u4[r_,t_,p_]:=r^2 Sin[t]

In[87]:=

  u1[r,theta,phi]
  u2[r,theta,phi]
  u3[r,theta,phi]
  u4[r,theta,phi]

Out[87]=

  r

Out[88]=

   2
  r

Out[89]=

  Sin[phi]

Out[90]=

   2
  r  Sin[theta]

In[91]:=

  newLaplacian[u1][r,theta,phi]

Out[91]=

          2          2           2         2
  r Sqrt[r ] Sin[phi]    r Sqrt[r  Sin[phi] ]
  -------------------- + --------------------
         2         2                 2
   Sqrt[r  Sin[phi] ]          Sqrt[r ]
  -------------------------------------------
                2        2         2
          Sqrt[r ] Sqrt[r  Sin[phi] ]

In[92]:=

  Simplify[%]

Out[92]=

  2
  -
  r

In[93]:=

  newLaplacian[u2][r,theta,phi]

Out[93]=

      2       2          2      2       2         2
   2 r  Sqrt[r ] Sin[phi]    2 r  Sqrt[r  Sin[phi] ]
  (----------------------- + ----------------------- + 
           2         2                    2
     Sqrt[r  Sin[phi] ]             Sqrt[r ]
   
              2        2         2
      2 Sqrt[r ] Sqrt[r  Sin[phi] ]) / 
   
           2        2         2
    (Sqrt[r ] Sqrt[r  Sin[phi] ])

In[94]:=

  Simplify[%]

Out[94]=

  6

In[95]:=

  newLaplacian[u3][r,theta,phi]

Out[95]=

      2         2                              2         2
     r  Cos[phi]  Sin[phi]      Sin[phi] Sqrt[r  Sin[phi] ]
  --------------------------- - ---------------------------
        2        2         2                   2
  Sqrt[r ] Sqrt[r  Sin[phi] ]            Sqrt[r ]
  ---------------------------------------------------------
                       2        2         2
                 Sqrt[r ] Sqrt[r  Sin[phi] ]

In[96]:=

  Simplify[%]

Out[96]=

  Cos[2 phi] Csc[phi]
  -------------------
           2
          r

In[97]:=

  newLaplacian[u4][r,theta,phi]

Out[97]=

      2       2
     r  Sqrt[r ] Sin[theta]
  (-(----------------------) + 
             2         2
       Sqrt[r  Sin[phi] ]
   
         2       2          2
      2 r  Sqrt[r ] Sin[phi]  Sin[theta]
      ---------------------------------- + 
                    2         2
              Sqrt[r  Sin[phi] ]
   
         2       2         2
      2 r  Sqrt[r  Sin[phi] ] Sin[theta]
      ---------------------------------- + 
                         2
                   Sqrt[r ]
   
              2        2         2
      2 Sqrt[r ] Sqrt[r  Sin[phi] ] Sin[theta]) / 
   
           2        2         2
    (Sqrt[r ] Sqrt[r  Sin[phi] ])

In[98]:=

  Simplify[%]

Out[98]=

                             2
  (2 - 3 Cos[2 phi]) Csc[phi]  Sin[theta]

Up to Exercises