# Triple/Double integral over outer side of a cylinder

$$\underset{S}{\iint} (yz\text{dx}\text{dy}+xy\text{dxdz}+xz\text{dydz})$$

Where S is the outer side of a part of a cylinder: $x^2+y^2 = r^2 ; x\le0,\ y\ge0, \ 0\le z\le H$

The problem about that is - I have tried parsing this in few different ways through Wolfram Mathematica 10, like converting [x,y,z] to cylindrical and pasting it instead of (x , z) , but then ouput was just a volume of cylinder formula followed with the expression above in altered form. I am kinda new to the app, to be honest.

CoordinateTransform["Cylindrical" -> "Cartesian" , {x, y, z}]
{x Cos[y], x Sin[y], z}
f[x_ y_ z_] := (y*z/dz) + (x*y/dy) + (z*x/dx)
integrate[f[x Cos[y], x Sin[y], z] , {y, 0, 2*pi} , {z, 0, H}]

Output: integrate[f[x Cos[y], x Sin[y], z], {y, 0, 2 pi}, {z, 0, H}]


Weird? Well, at least for me, I might be bad at Mathematica language. Then, I tried to rather not struggle around making a definition of f(x_ y_ z_) and be more straightforward. (Pasting a screenshot due to troubles copying that) Next I have found out Integrate is written with capital and tried first way again.

f[x_ y_ z_] := (y*z/dz) + (x*y/dy) +(z*x/dx)
Integrate[f[x Cos[y],x Sin[y],z] , {y,0,2*pi} , {z,0,H}]


Out: $$\int _0^{2 \text{pi}}\int _0^Hf(x \cos (y),x \sin (y),z)dzdy$$ Then:

Integrate[f[x Cos[y], x Sin[y], z] , {x, 0, r}, {y, 0, 2*pi} , {z, 0, H}]


Out: $$\int _0^r\int _0^{2 \text{pi}}\int _0^Hf(x \cos (y),x \sin (y),z)dzdydx$$

BUT... As you see, no result at all... I have been thinking about integrating over Boole (but deleted that .nb) , integrating the initial expression, putting limits like

Integrate[expr , {x,y,z} \[Element] Cylinder[{{0,0,0},{0,0,h}},r] ]


And I have no out due to deleted .nb so simply put - I got the same expression, all put up as fraction of their sum by ddx ddy ddz . BUT multiplied by volume of Cylinder (very smart) As suggested, fixed definition of f:

f[x_, y_, z_] := (y*z/dz) + (x*y/dy) + (z*x/dx)
integrate[f[x Cos[y], x Sin[y], z] ,{x,0,r}, {y, 0, 2*pi} , {z, 0, H}]


Out: $$\frac{H r^2 \sin (\text{pi}) \left(3 \text{dx} \text{dy} H \sin (\text{pi})+4 \text{dx} \text{dz} r \sin (\text{pi}) \cos ^2(\text{pi})+3 \text{dy} \text{dz} H \cos (\text{pi})\right)}{6 \text{dx} \text{dy} \text{dz}}$$

So basically, I can't really find what I want with the expressions above

//I am kind of sorry for being bad at mathematica language :(

• Show us what you have tried so far, and we'll go from there. – MarcoB Dec 8 '15 at 14:13
• Edited OP. Check this out! – Pavlo Protasenya Dec 8 '15 at 14:44
• The correct definition of function is f[x_, y_, z_] := ... – ybeltukov Dec 8 '15 at 15:14
• For starters, the function integrate is case sensitive, so you need it to be Integrate[f[...], ...] instead of integrate[...]. Second, you use dx, dy, and dz as variables in your function f[...], but dx, dy, and dz are variables with those names and not the same as partial-derivative notation. If you want to enter in the partial derivatives, type esc-d-d-esc in the Mathematica front-end. – nben Dec 8 '15 at 20:40
• ... you also don't define x anywhere, so the x you pass to f[...] in the integral is just a symbol, and not any particular value. Also, Pi is case sensitive in Mathematica --- 'pi' is just a symbol, Pi is the actual value. It seems that what you want to do is to use a parametric integral, Integrate[f[theta, z], {theta, 0, 2*Pi}, {z, 0, H}] where f[theta, z] needs to be defined for theta and z (rather than x, y, z). – nben Dec 8 '15 at 20:44

A surface integral is often written in this form: where dx[i] ^ dx[j] = - dx[j] ^ dx[i] (antikommutative)

We have to translate your integral:

v1 = x z;
v2 = -x y;
v3 = y z;
v = {v1, v2, v3};


With GAUSS we can do

div = Div[v, {x, y, z}]
-x + y + z


and with the region we obtain

reg = ImplicitRegion[
x^2 + y^2 <= r && 0 <= z <= H && x <= 0 && y >= 0, {x, y, z}];
Integrate[ div, {x, y, z} \[Element] reg, Assumptions -> r > 0 && H > 0]
1/24 H (3 H \[Pi] + 16 Sqrt[r]) r

• Thanks! It took me a while to figure out how to interpret it in mathematica... I'll try this later and give feedback. – Pavlo Protasenya Dec 11 '15 at 7:32