# Two Cylinders to Worry About

## Problem

Find the surface area of the portion of the cylinder

> y^2+z^2 = 9;

```                                   2    2
y  + z  = 9```
 that lies inside the cylinder

> x^2+z^2 = 9;

```                                   2    2
x  + z  = 9```

### Solution

 The part of the surface S above the xy plane is characterized by z = sqrt(9-y^2) with -3 < y < 3 and -|y| < x < |y|

> with(linalg): i := vector([1,0,0]): j:=vector([0,1,0]): k:=vector([0,0,1]):
> r = x*i + y*j + sqrt(9-y^2)*k;

```                                               2 1/2
r = x i + y j + (9 - y )    k```
 The element of surface area (sans dxdy) is given by

> z := sqrt(9-y^2): dS := sqrt(1+diff(z,x)^2+diff(z,y)^2);

```                                   /       2  \1/2
|      y   |
dS := |1 + ------|
|         2|
\    9 - y /```
 the total area is then,

> 2*int(int(dS,x=-abs(y)..abs(y)),y=-3..3);

``` Answer :=

3    abs(y)                             3
/      /    /       2  \1/2             /
|      |     |      y   |               |    /      1   \1/2
2  |      |     |1 + ------|    dx dy = 2  |  6 |- --------|    abs(y) dy
|      |     |         2|               |    |         2|
/      /      \    9 - y /              /     \  - 9 + y /
-3  - abs(y)                            -3```
 and this evaluates to:

> evalf(rhs("));

`                                  72.00000000`

Link to the commands in this file
Carlos Rodriguez <carlos@math.albany.edu>