Surface integral with a parameter Consider $r >0$. Calculate the surface area of the part of the sphere $x^2+y^2+z^2=r^2$ inside $x^2+y^2+z^2=3rz-\frac54r^2$.
So second surface can be rewritten: $x^2+y^2+(z-\frac32 r) ^2=r^2$. Then, parameterizing: $x=R\cos t, \, y=R\sin t$, with $R$ varying between $0$ and $r$. What do I set $z$ equal to? Do I have to look at the first surface or at the second one?
Thanks. 
 A: First of all, you are calculating the surface area of part of a sphere of radius $r$. This is a $2$-D surface. This means that $r$ is a constant, not a variable. The best way to solve these kinds of problems is to find some math plotter to help you visualize the problem. Here I have used this website to produce the image below.

Now it is clear that you are only interested in the part of the sphere that lies above a certain $z$ value which, using your factored equation, is $z=\frac{3}{2}r$. This works out to be a $\phi$-restriction; we have the equation 
$$\cos(\phi)=\frac{z}{r}$$
which means 
$$\phi=\arctan\left(\frac{3}{2r}\right)$$
is the maximum $\phi$ value in this problem, and $\phi=0$ is the minimum $\phi$ value. $r$ does not vary, and $\theta$ runs from $0$ to $2\pi$. You then have 
$$\begin{cases}x = r\cos(\theta)\sin(\phi) \\
y = r\sin(\theta)\sin(\phi) \\
z = r\cos(\phi) \end{cases} \qquad \begin{cases}0\leq\theta<2\pi \\
0\leq \phi < \arctan\left(\frac{3}{2r}\right) \end{cases}$$
and, if $A$ is area, your integral is
$$A=r^2\int_0^{2\pi}\int_0^{\arctan\left(\frac{3}{2r}\right)}\sin(\phi)\text{d}\phi\text{d}\theta$$
