Exercise: double integral of a surface

Comparison between double Simpson and Gauss-Legendre for an integral derived from the hemisphere x2+y2+f2=9x^2+y^2+f^2=9.

Building the integrand

ExampleHemisphere on the unit square

Let f(x,y)=9x2y2f(x,y)=\sqrt{9-x^2-y^2} and R=[0,1]×[0,1]R=[0,1]\times[0,1]. Compute the integral of fx2+fy2\sqrt{f_x^2+f_y^2} with Simpson n=m=8n=m=8 and Gauss-Legendre n=4n=4.

  1. The partial derivatives are:

    fx=x9x2y2,fy=y9x2y2\frac{\partial f}{\partial x}=-\frac{x}{\sqrt{9-x^2-y^2}},\qquad \frac{\partial f}{\partial y}=-\frac{y}{\sqrt{9-x^2-y^2}}
  2. Therefore, the integrand simplifies to:

    (fx)2+(fy)2=x2+y29x2y2\sqrt{\left(\frac{\partial f}{\partial x}\right)^2+\left(\frac{\partial f}{\partial y}\right)^2}=\sqrt{\frac{x^2+y^2}{9-x^2-y^2}}
  3. With double Simpson and n=m=8, one obtains:

    IS=0.267814255559730I_S=0.267814255559730
  4. With Gauss-Legendre n=4n=4, after transforming x=u+12x=\frac{u+1}{2} and y=v+12y=\frac{v+1}{2}, one obtains:

    IG=0.267770529696778I_G=0.267770529696778

The two values are very close; Gauss-Legendre uses far fewer points because it chooses non-equally spaced nodes with optimal weights.