# Finding the volume inside an elyptical cylinder and a sphere

I'm trying to find the volume bounded by a sphere and an elyptical cylinder. The sphere is given by $x^2+y^2+z^2=1$ and the elyptical cylinder by $2x^2+y^2-2x=0$.

My first attempt with spherical coordinates didn't go well, now I did some work with cylindrical coordinates but I'm not sure if I have the right answer.

Playing with the equation for the cylinder I found the canonical form of the ellipse: $\displaystyle\frac{\left(x-\frac{1}{2}\right)^2}{\left(\frac{1}{2}\right)^2}+ \displaystyle\frac{y^2}{\left(\frac{1}{\sqrt{2}}\right)^2}=1$.

And this can be se clearer setting $z=0$ and looking the ellipse drawn on the $xy$-plane

Which seems to involve some kind of ugly looking function if I were to describe the ellipse in polar coordinates, which in some way I have to.

Now to find the volume I changed to cylindrical coordinates $$x=\rho\cos\theta, y=\rho\sin\theta,z=z$$

The equation for the ellipse states $x^2+y^2-2x=0$ then $2\rho^2\cos^2\theta+\rho^2\sin^2\theta-\rho\cos\theta$ from which I have $\rho^2(2\cos^2\theta+\sin^2\theta)-\rho\cos\theta\implies \rho(\theta)=\displaystyle\frac{\cos\theta}{2\cos^2\theta+\sin^2\theta} = \displaystyle\frac{\cos\theta}{1+\cos^2\theta}$ with $0\leq\theta\leq\pi$.

Now, for $z$ considering the sphere $x^2+y^2+z^2=1$ follows $\rho^2+z^2=1\implies -\sqrt{1-\rho^2}\leq z \leq \sqrt{1-\rho^2}$.

The volume seems to be given by $\displaystyle\int_0^{\pi}\displaystyle\int_0^{\frac{\cos\theta}{1+\cos^2\theta}}\rho\displaystyle\int_{-\sqrt{1-\rho^2}}^{\sqrt{1-\rho^2}}\;dzd\rho d\theta$.

For me here is when this become tricky, I'm going to calculate this integrals one at a time.

(1)$\displaystyle\int_{-\sqrt{1-\rho^2}}^{\sqrt{1-\rho^2}}\;dz = 2\sqrt{1-\rho^2}$

(2)$\displaystyle\int_0^{\frac{\cos\theta}{1+\cos^2\theta}}\rho (2\sqrt{1-\rho^2})d\rho = \displaystyle\int_0^{\frac{\cos\theta}{1+\cos^2\theta}}2\rho\sqrt{1-\rho^2} d\rho = -\displaystyle\frac{2}{3}(1-\rho^2)^{3/2}|_{\rho=0}^{\rho=\frac{\cos\theta}{1+\cos^2\theta}} = \left[1-\left(\displaystyle\frac{\cos\theta}{1+\cos^2\theta}\right)^2\right]^{3/2} + \displaystyle\frac{2}{3}$ $=\left[\displaystyle\frac{\cos^2\theta}{1+2\cos^2\theta+\cos^2\theta}\right]^{3/2} + \displaystyle\frac{2}{3}$

(3) Stuck. I don't know what could I do to integrate $\left[1-\left(\displaystyle\frac{\cos\theta}{1+\cos^2\theta}\right)^2\right]^{3/2}$

For the term $\left[1-\left(\displaystyle\frac{\cos\theta}{1+\cos^2\theta}\right)^2\right]$ I considered using partial fractions as follows: $\left(\displaystyle\frac{\cos\theta}{1+\cos^2\theta}\right)^2 =\displaystyle\frac{1+\cos^2\theta+\cos^4\theta}{(1+\cos^2\theta)^2} = 1 + \displaystyle\frac{1}{(1+\cos^2\theta)^2} + \displaystyle\frac{1}{1+\cos^2\theta}$

But this would make the last integral harder because I'd have to integrate $\displaystyle\int_0^{\pi} \left[1 + \displaystyle\frac{1}{(1+\cos^2\theta)^2} + \displaystyle\frac{1}{1+\cos^2\theta}\right]^{3/2}\;d\theta$

Any ideas?.

• Do you know the Viviani's dome? Jan 26, 2014 at 19:49
• I don't, this is the first time I heard of such thing. I googled it and I found what it seems to be this same problem, I'm reading about it right know but it seems that other solutions take a different approach or I several mistakes. I found a solution that uses spherical coordinates instead of cylindrical as I tried to.
– Cure
Jan 26, 2014 at 19:57

The equation for the ellipse states $x^2+y^2-2x=0$ (...) from which I have $\rho(\theta)= \displaystyle\frac{\cos\theta}{1+\cos^2\theta}$ with $0\leq\theta\leq\pi$.

The equation of the ellipse is \begin{equation*} 2x^{2}+y^{2}-2x=0 \end{equation*} from which I've obtained \begin{equation*} \rho (\theta)=\frac{2\cos \theta }{\cos ^{2}\theta +1},\qquad \text{with }-\pi/2 \leq \theta <\pi/2, \end{equation*}

because the tangent to the ellipse at $(x,y)=(0,0)$ is the vertical line $x=0$. With these corrections the volume integral becomes

\begin{eqnarray*} V &=&\int_{-\pi /2}^{\pi /2}\left( \int_{0}^{\frac{2\cos \theta }{\cos ^{2}\theta +1}}2\rho \sqrt{1-\rho ^{2}}d\rho \right) \,d\theta \\ &=&-\frac{2}{3}\int_{-\pi /2}^{\pi /2}\left. \left( 1-\rho ^{2}\right) ^{3/2}\right\vert _{0}^{\frac{2\cos \theta }{\cos ^{2}\theta +1}}\,d\theta \\ &=&-\frac{2}{3}\int_{-\pi /2}^{\pi /2}\left( 1-\left( \frac{2\cos \theta }{ \cos ^{2}\theta +1}\right) ^{2}\right) ^{3/2}-1\,\ d\theta \end{eqnarray*} Simplifying, we have that

\begin{eqnarray*} V &=&\frac{2}{3}\pi -\frac{2}{3}\int_{-\pi /2}^{\pi /2}\left( \left( \frac{ \sin ^{2}\theta }{\cos ^{2}\theta +1}\right) ^{2}\right) ^{3/2}\,d\theta \\ &=&\frac{2}{3}\pi -\frac{2}{3}\int_{-\pi /2}^{\pi /2}\left( \frac{\sin ^{2}\theta }{\cos ^{2}\theta +1}\right) ^{3}\,d\theta \\ &=&\frac{2}{3}\pi -\frac{4}{3}\int_{0}^{\pi /2}\left( \frac{\sin ^{2}\theta }{\cos ^{2}\theta +1}\right) ^{3}\,d\theta , \end{eqnarray*} because the integrand is an even function. The remaining integral can be converted into a rational function of $t=\tan \frac{\theta }{2}$ by the Weirstrass substitution $t=\tan \frac{ \theta }{2}$, which I then evaluated in SWP (Scientific Work Place):

\begin{eqnarray*} V &=&\frac{2}{3}\pi -\frac{4}{3}\int_{0}^{\pi /2}\left( \frac{\sin ^{2}\theta }{\cos ^{2}\theta +1}\right) ^{3}\,d\theta ,\qquad t=\tan \frac{ \theta }{2} \\ &=&\frac{2}{3}\pi -\frac{64}{3}\int_{0}^{1}\frac{t^{6}}{\left( 1+t^{4}\right) ^{3}\left( 1+t^{2}\right) }\,dt \\ &=&\cdots \\ &=&\frac{4}{3}\pi -\frac{7}{12}\sqrt{2}\pi =\frac{16-7\sqrt{2}}{12}\pi . \end{eqnarray*}

ADDED. The integrand in $t$ can be expanded into partial fractions as follows

\begin{equation*} \frac{t^{6}}{\left( 1+t^{4}\right) ^{3}\left( 1+t^{2}\right) }=\frac{1}{8} \frac{t^{2}-1}{1+t^{4}}+\frac{1}{4}\frac{3+t^{2}}{\left( 1+t^{4}\right) ^{2}} -\frac{1}{2}\frac{1+t^{2}}{\left( 1+t^{4}\right) ^{3}}-\frac{1}{8\left( 1+t^{2}\right) }. \end{equation*}

ADDED 2. WolframAlpha computation of $V =\frac{2}{3}\pi -\frac{4}{3}\int_{0}^{\pi /2}\left( \frac{\sin^{2}\theta }{\cos ^{2}\theta +1}\right) ^{3}\,d\theta$ confirms the result above.

• @Fantini Thanks! Jan 28, 2014 at 3:56
• @Fantini I've changed my answer with respect to the limits of integration of $\theta$. Jan 28, 2014 at 5:08
• Thanks a lot, it was a lot harder than I thought!. I guess I had several mistakes, not only having the proper expression for $\rho$ but also determining the limits of $\theta$. With the limits I set before I had also a negative radius when $\pi/2\leq\theta \leq \pi$, right?.
– Cure
Jan 28, 2014 at 15:37
• @Dante You are welcome. That's right. In the first version of this answer I made a similar mistake. Jan 28, 2014 at 15:46