7
$\begingroup$

I'm trying to compute the integral $$\int_S x^2+z^2\,{\rm d}S,$$where $S$ is the surface $$S\colon~ \frac{x^2}{2} + \frac{y^2}{3} + \frac{z^2}{2} = 1, \quad y \geq 0.$$

One possible parametrization is: $${\bf x}(u,v) = (\sqrt{2} \cos u \cos v, \sqrt{3} \cos u \sin v, \sqrt{2}\sin u),$$ with $-\frac \pi 2 \leq u \leq \frac \pi 2, 0 \leq v \leq \pi$. Then I make:

X[u_,v_] :=  {Sqrt[2] Cos[u] Cos[v], Sqrt[3] Cos[u] Sin[v], Sqrt[2] Sin[u]}

f[{x_, y_, z_}] := x^2 + z^2

Integrate[f[X[u, v]] Norm[Cross[D[X[u, v], u], D[X[u, v], v]]], {u, -π/2, π/2}, {v, 0 , π}]

but Mathematica just won't compute it (keeps running on and on). What is an efficient way to do this? Thanks.

$\endgroup$
3
  • $\begingroup$ What if you replace Norm with (Sqrt[#.#] &)? $\endgroup$ Jul 14, 2015 at 13:59
  • $\begingroup$ Shows the integral but doesn't compute it.. $\endgroup$
    – Ivo Terek
    Jul 14, 2015 at 14:21
  • 3
    $\begingroup$ This isn't so much a Mathematica problem as it is a parametrization problem. I got the integral to evaluate using the parametrization $\mathbf{x} = (\sqrt{2} \cos u \cos v, \sqrt{3} \sin u, \sqrt{2} \cos u \sin v)$. Note that this exploits the symmetry between $x$ and $z$ more effectively. $\endgroup$ Jul 14, 2015 at 14:35

2 Answers 2

10
$\begingroup$

Solution with NIntegrate

NIntegrate[f[X[u, v]] Norm[Cross[D[X[u, v], u], D[X[u, v], v]]], {u, -π/2, π/2}, {v, 0, π}]
(* 19.8097 *)

An alternative approach to the problem is

s = ImplicitRegion[{x^2/2 + y^2/3 + z^2/2 == 1 && y > 0}, {x, y, z}];
Chop[NIntegrate[x^2 + z^2, {x, y, z} ∈ s], 10^-7]

which, of course, yields the same answer.

Added: Solution with Integrate

Consider the calculation in cylindrical coordinates with the axis along y. Integrating about the axis of symmetry then leaves the integral of 2 π r^3 over the 1D region,

s1 = ImplicitRegion[{r^2/2 + y^2/3 == 1 && r > 0 && y > 0}, {r, y}];
2 π Integrate[r^3, {r, y} ∈ s1]
(* 1/2 π (10 + 3 Sqrt[2] ArcCot[Sqrt[2]]) *)

with the numerical value given earlier.

$\endgroup$
2
$\begingroup$

In v13.3 SurfaceIntegrate is introduced, and the problem can be solved as follows:

reg = 
  ParametricRegion[{Sqrt[2] Sin[u] Cos[v], Sqrt[3] Sin[u] Sin[v], 
    Sqrt[2] Cos[u]}, {{u, 0, Pi}, {v, 0, Pi}}];

SurfaceIntegrate[x^2 + z^2, {x, y, z} ∈ reg]
(* π (5 + (3 ArcCsc[Sqrt[3]])/Sqrt[2]) *)

Well, actually SurfaceIntegrate isn't necessary in this case, we can directly use Integrate:

Integrate[x^2 + z^2, {x, y, z} ∈ reg]
(* π (5 + (3 ArcCsc[Sqrt[3]])/Sqrt[2]) *)

Sadly the followings don't give correct result for the moment:

SurfaceIntegrate[
 x^2 + z^2, {x, y, z} ∈ 
  ImplicitRegion[x^2/2 + y^2/3 + z^2/2 == 1 && y > 0, {x, y, z}]]
(* 0 <- Incorrect! *)

Integrate[
 x^2 + z^2, {x, y, z} ∈ 
  ImplicitRegion[x^2/2 + y^2/3 + z^2/2 == 1 && y > 0, {x, y, z}]]
(* 0 <- Incorrect! *)
$\endgroup$
2
  • 1
    $\begingroup$ Am I missing something - 13.3 isn't out yet - is it? $\endgroup$
    – 1729taxi
    Jun 27, 2023 at 18:31
  • 1
    $\begingroup$ @1729taxi, it is already out in Wolfram Cloud :) $\endgroup$
    – Domen
    Jun 27, 2023 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.