Exercise 3

Show that ln r and 1/Sqrt[r^2+z^2] satisfy Laplace's equation in cylindrical coordinates.

In[69]:=

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

In[70]:=

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

In[71]:=

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

Out[71]=

  r Cos[theta]

Out[72]=

  r Sin[theta]

Out[73]=

  z

In[74]:=

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

Out[74]=

            2
  {1, Sqrt[r ], 1}

In[75]:=

  Clear[u1,u2]
  u1[r_,t_,z_]:=Log[r]
  u2[r_,t_,z_]:=1/Sqrt[r^2+z^2]

In[76]:=

  newLaplacian[u1][r,theta,z]

Out[76]=

                   2
     1       Sqrt[r ]
  -------- - --------
        2        2
  Sqrt[r ]      r
  -------------------
             2
       Sqrt[r ]

In[77]:=

  Simplify[%]

Out[77]=

  0

In[78]:=

  newLaplacian[u2][r,theta,z]

Out[78]=

      2       2            2   2             2
   3 r  Sqrt[r ]   3 Sqrt[r ] z             r
  (------------- + ------------- - --------------------- - 
     2    2 5/2      2    2 5/2          2    2    2 3/2
   (r  + z )       (r  + z )       Sqrt[r ] (r  + z )
   
               2
       2 Sqrt[r ]           2
      ------------) / Sqrt[r ]
        2    2 3/2
      (r  + z )

In[79]:=

  Simplify[%]

Out[79]=

  0

Up to Exercises