# Parametric Surface Integral Boundary Code?

I am having trouble using MMA to calculate 2 parametrized surface integrals. I'd be grateful for any fixes people can offer.

I usually calculate surface integrals with the following code, which works, with me inputting the parameters for x, y, and z, the region in line 5, and the integrand in line 6:

x[u_, v_] := u + v;

y[u_, v_] := u - v;

z[u_, v_] := 1 + 2 u + v;

r[u_, v_] := {x[u, v], y[u, v], z[u, v]};

reg = ParametricRegion[r[u, v], {{u, 0, 2}, {v, 0, 1}}];

Integrate[x + y + z, {x, y, z} \[Element] reg]


But on the following problem this code unexpectedly doesn't work!

Integrand is y, with parameters as shown in the problem below and u from 0 to 1 and v from 0 to Pi.

Clear[u, v, x, y, z]
x[u_, v_] := u Cos[v];
y[u_, v_] := u Sin[v];
z[u_, v_] := v;
r[u_, v_] := {x[u, v], y[u, v], z[u, v]};
reg = ParametricRegion[r[u, v], {{u, 0, 1}, {v, 0, Pi}}];
NIntegrate[y, {x, y, z} \[Element] reg]


I have hand calculated this problem, and the correct answer (verified with teacher) is $$2 /3 (2 Sqrt(2) - 1)$$. I have tried Nintegrate and Integrate, but the latter returns gibberish and the former the wrong answer.

At the same time, this problem befuddles me. Using the exact same code as above, the usually works, I have a region where u and v don't go between numbers but are represented by $$u^2 + v^2 <=1$$. On my line where I enter the parametric region, I've always used bounded intervals, not an equation. So this code messes up. I would love help on how to rephrase the region for problems like this.

x[u_, v_] := 2 u v;
y[u_, v_] := u^3 - v^2;
z[u_, v_] := u^2 + v^2;
r[u_, v_] := {x[u, v], y[u, v], z[u, v]};
reg = ParametricRegion[{r[u, v], u^2 + v^2 <= 1}, {u, v}];
Integrate[x + y + z, {x, y, z} \[Element] reg]

• It seems that y[u_, v_] := u^3 - v^2; should be y[u_, v_] := u^2 - v^2; ? Jan 10, 2021 at 2:36
• Ah, yes, that is right! The answer is supposed to be Sqrt(2) * Pi. I can't seem to get that, even with your outstanding catch on my typo,,,,
– JDVC
Jan 10, 2021 at 2:46

Use the definition of surface integral.

x[u_, v_] = u Cos[v];
y[u_, v_] = u Sin[v];
z[u_, v_] = v;
r[u_, v_] = {x[u, v], y[u, v], z[u, v]};
Integrate[
y[u, v]*Norm@Cross[D[r[u, v], u], D[r[u, v], v]], {u, 0, 1}, {v,
0, π}]
(* Integrate[
y[u, v] Sqrt[# . #] &@Cross[D[r[u, v], u], D[r[u, v], v]], {u, 0,
1}, {v, 0, π}]*)


2/3 (-1 + 2 Sqrt[2])

I believe that $$y$$ should be $$u^2-v^2$$ since if $$y=u^3-v^2$$ then the region is not a simple surface and the integral became so complicated.

x[u_, v_] = 2 u*v;
y[u_, v_] = u^2 - v^2;
z[u_, v_] = u^2 + v^2;
r[u_, v_] = {x[u, v], y[u, v], z[u, v]};
Integrate[(x[u, v] + y[u, v] + z[u, v]) Sqrt[# . #] &@
Cross[D[r[u, v], u], D[r[u, v], v]], {u, v} ∈ Disk[]]


(4 Sqrt[2] π)/3

x[u_, v_] = 2 u v;
y[u_, v_] = u^2 - v^2;
z[u_, v_] = u^2 + v^2;
r[u_, v_] = {x[u, v], y[u, v], z[u, v]};
reg = ParametricRegion[{r[u, v], u^2 + v^2 <= 1}, {u, v}];
Integrate[x + y + z, {x, y, z} ∈ reg]


(2 Sqrt[2] π)/3

Clear[x, y, z, u, v, r, θ];
x = 2 u*v /. {u -> r*Cos[θ], v -> r*Sin[θ]};
y = u^2 - v^2 /. {u -> r*Cos[θ], v -> r*Sin[θ]};
z = u^2 + v^2 /. {u -> r*Cos[θ], v -> r*Sin[θ]};
Integrate[(x + y + z)*Sqrt[# . #] &@
Cross[D[{x, y, z}, r], D[{x, y, z}, θ]], {r, 0,
1}, {θ, 0, 2 π}]


(4 Sqrt[2] π)/3

x = 2 u*v;
y = u^2 - v^2;
z = u^2 + v^2;
z^2 == x^2 + y^2 // Simplify
(* True *)
Clear[x, y, z, reg]
reg = ImplicitRegion[
z == Sqrt[x^2 + y^2 ] && 0 <= z <= 1, {x, y, z}];
Integrate[x + y + z, {x, y, z} ∈ reg]


(2 Sqrt[2] π)/3

• Thanks so much! That makes sense. Really appreciated. Any thoughts on that second problem? Much obliged.
– JDVC
Jan 10, 2021 at 1:34
• @JDVC Yes, I will consider the second question,but why my previous correct answer without up vote or only one up vote. Jan 10, 2021 at 1:45
• Done. With answer check, too!
– JDVC
Jan 10, 2021 at 2:18
• The book says the answer here is 2pi on this second problem. So.....?
– JDVC
Jan 10, 2021 at 3:25
• ,thanks for your help on this. But the second piece of code gives me 2 Sqrt(2) pi/3. Your first and third pieces give the 4 Sqrt(2) pi/3. Hmmm
– JDVC
Jan 10, 2021 at 4:03