Exercise 2

Show that r^ncos(n theta) and r^n sin(n theta) are solutions to Laplace's Equation in cylindrical coordinates.

In[56]:=

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

In[57]:=

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

In[58]:=

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

Out[58]=

  r Cos[theta]

Out[59]=

  r Sin[theta]

Out[60]=

  z

In[61]:=

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

Out[61]=

            2
  {1, Sqrt[r ], 1}

In[62]:=

  Clear[f,g]
  f[r_,t_,z_]:=r^n Cos[n t]
  g[r_,t_,z_]:=r^n Sin[n t]

In[63]:=

  f[r,theta,z]
  g[r,theta,z]

Out[63]=

   n
  r  Cos[n theta]

Out[64]=

   n
  r  Sin[n theta]

In[65]:=

  newLaplacian[g][r,theta,z]

Out[65]=

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

In[66]:=

  Simplify[%]

Out[66]=

  0

In[67]:=

  newLaplacian[f][r,theta,z]

Out[67]=

      n                 2  n
   n r  Cos[n theta]   n  r  Cos[n theta]
  (----------------- - ------------------ + 
             2                    2
       Sqrt[r ]             Sqrt[r ]
   
                  -2 + n       2                        2
      (-1 + n) n r       Sqrt[r ] Cos[n theta]) / Sqrt[r ]

In[68]:=

  Simplify[%]

Out[68]=

  0

Up to Exercises