MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Q: error in Mathematica Book formulae for surface area of ellipsoid?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14376] Re: Q: error in Mathematica Book formulae for surface area of ellipsoid?
  • From: mtrott (Michael Trott)
  • Date: Thu, 15 Oct 1998 00:29:14 -0400
  • Organization: Wolfram Research, Inc.
  • References: <6vurhp$8lh@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <6vurhp$8lh at smc.vnet.net> wacb at aplcomm.jhuapl.edu (wacb)  
writes:
> I've not been successful calculating the surface area of an ellipsoid,
> based on formulae given in the 3rd edition of the Mathematica Book (pg.
> 938). I have tried to verify that these formulae give value that
> correspond to a sphere and spheroids (both oblate and prolate). The
> values I get do not correspond to those I derive using other texts. For
> example, Mathematica calculates a value for a sphere of only 2 Pi.
> 
> I believe the error is due to an incomplete definition for theta: the
> expression given in the book has a trailing "/", which suggests to me
> that something is missing. Can anyone confirm this error or give a
> corrected expression?
> 
> Thanks.
> 
> Bill Christens-Barry


In comp.soft-sys.math.mathematica article <6vurhp$8lh at smc.vnet.net> you  
wrote:
> I've not been successful calculating the surface area of an ellipsoid,
> based on formulae given in the 3rd edition of the Mathematica Book (pg.
> 938). I have tried to verify that these formulae give value that
> correspond to a sphere and spheroids (both oblate and prolate). The
> values I get do not correspond to those I derive using other texts. For
> example, Mathematica calculates a value for a sphere of only 2 Pi.
> 
> I believe the error is due to an incomplete definition for theta: the
> expression given in the book has a trailing "/", which suggests to me
> that something is missing. Can anyone confirm this error or give a
> corrected expression?
> 
> Thanks.
> 
> Bill Christens-Barry


The formula for theta has indeed a typo, a square root is missing.
Thanks   for catching this. The corrrect formula is:

\[Theta] = ArcSin[Sqrt[1 - c^2/a^2]]

Whith this definition for theta the formula is correct. Let us check
this   numerically.

A parametrization of the ellipsoid.

In[1]:=
x=a Cos[\[Phi]] Sin[\[Theta]];
y=b Sin[\[Phi]] Sin[\[Theta]];
z=c Cos[\[Theta]];

Gauss's surface forms

In[2]:=
e=D[{x,y,z},\[Phi]].D[{x,y,z},\[Phi]]

Out[2]=
\!\(b\^2\ Cos[\[Phi]]\^2\ Sin[\[Theta]]\^2 +
    a\^2\ Sin[\[Theta]]\^2\ Sin[\[Phi]]\^2\)

In[3]:=
g=D[{x,y,z},\[Theta]].D[{x,y,z},\[Theta]]

Out[3]=
\!\(a\^2\ Cos[\[Theta]]\^2\ Cos[\[Phi]]\^2 + c\^2\ Sin[\[Theta]]\^2 +
    b\^2\ Cos[\[Theta]]\^2\ Sin[\[Phi]]\^2\)

In[4]:=
f=D[{x,y,z},\[Phi]].D[{x,y,z},\[Theta]]

Out[4]=
\!\(\(-a\^2\)\ Cos[\[Theta]]\ Cos[\[Phi]]\ Sin[\[Theta]]\ Sin[\[Phi]] +
    b\^2\ Cos[\[Theta]]\ Cos[\[Phi]]\ Sin[\[Theta]]\ Sin[\[Phi]]\)

The resulting numerical integral.


In[5]:=
\!\(ANumerical[{a_, b_, c_}] :=
    NIntegrate[
      Sin[\[Theta]]
        \ at \(a\^2\ b\^2\ Cos[\[Theta]]\^2 +
            b\^2\ c\^2\ Cos[\[Phi]]\^2\ Sin[\[Theta]]\^2 +
            a\^2\ c\^2\ Sin[\[Theta]]\^2\ Sin[\[Phi]]\^2\), \n
      \t\t{\[Phi], 0, 2  \[Pi]}, {\[Theta], 0, \[Pi]}]\)

The corrected symbolic formula.

In[6]:=
ASymbolic[{a_, b_, c_}] :=
  With[{m = (a^2 (b^2 - c^2))/(b^2 (a^2 - c^2)),
        \[Theta] = ArcSin[Sqrt[1 - c^2/a^2]]},
   2 Pi (c^2 + (b c^2 EllipticF[\[Theta], m])/Sqrt[a^2 - c^2] +
         b Sqrt[a^2 - c^2] EllipticE[\[Theta], m])]

A numerical check.

In[7]:=
ANumerical[{3.,2.,1.}]

Out[7]=
48.882

In[8]:=
ASymbolic[{3.,2.,1.}]

Out[8]=
48.882


For a nearly sphere we obtain 4 Pi:

In[9]:=
ASymbolic[{1. + 10^-8,1. + 10^-8,1. + 10^-10}]

Out[9]=
12.5664

In[10]:=
N[4 Pi]

Out[10]=
12.5664

Be aware that the formula requires a very careful limit for a sphere  
because the module of the incomplete elliptic integrals go to 1 in case
of   a sphere. The resulting singularities cancel the square root
singularities   in ASymbolic.  For a safe numerical evaluation one
should have  a > b > c.


--
Michael Trott
Wolfram Research, Inc.


  • Prev by Date: Re: Range Kutta 4 with variable steps
  • Next by Date: Re: Sigh...anyone care to explain this?
  • Previous by thread: Q: error in Mathematica Book formulae for surface area of ellipsoid?
  • Next by thread: Help With PlotLegend, please.