I'm working on a short script that I can repeatedly use to solve parametric surface integrals. There is a post on this elsewhere on MSE, but it is a complicated doublecontourintegral function. It is impossible to parse for a newcomer like me, and it seems possible to create something more simple.
Here's an example problem:
Find the surface integral of $(x + y + s)dS$, where S is the parallelogram with parametric equations $x = u + v$; $y = u - v$; $z = 1 + 2u + v$; and $0 \leq u \leq 2$, $0 \leq v \leq 1$.
So I wanted to write a script that I can just type in the non-parametrized equation, i.e., $(x + y + s)$ in this example. Then I'd enter in the parameters for x, y, and z (given in this problem).
Next, I'd take the partial derivatives with respect to u an v of the parametrized equation.
Next, I'd cross product those two partial derivatives and find its magnitude, using Norm.
Next, I'd re-parametrize $(x + y + s)$.
Finally, I'd integrate the re-paremetrized surface, multiplied by the magnitude of the partials, over the region, given in this problem as $0 \leq u \leq 2$, $0 \leq v \leq 1$.
I am new to Mathematica, and I started this sequence with the following code, but it doesn't seem to work. I'd welcome any help.
Clear[x, y, u, v]
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_]}
UPDATE: This code works well on problems I've tried. But I'm having trouble with another problem. The book answer is 1/(10sqrt(2)). I'm attaching as a picture its worked example. But both of your methods give 1/5sqrt(2). Did I miss something? Is the book in error? Here's the code I used, and the book's answer.
x[u_, v_] := u Cos[v];
y[u_, v_] := u Sin[v];
z[u_, v_] := u;
r[u_, v_] := {x[u, v], y[u, v], z[u, v]};
reg = ParametricRegion[r[u, v], {{u, 0, 1}, {v, 0, Pi/2}}];
Integrate[x y z, {x, y, z} \[Element] reg]
And here's is the book answer, which is Problem 6:
1/(5 Sqrt[2]) == Sqrt[2]/10
$\endgroup$