A question of finding the volume between two curves I have a question of finding the volume under the spherical surface 
$$x^2+y^2+z^2=a^2$$
& over the lemniscate
$$r^2=a^2cos2\theta$$
While solving i know the limits of $z$ are taken from    $0$ to $\sqrt(a^2-x^2-y^2)$
then we find 
$$V = \iiint_{z=0}^{ \sqrt(a^2-x^2-y^2)}dxdydz$$
Clearly the region of above double integration is given by projection of the volume on $xy$ plane as follows(in polar form)
 
But after then i am little confused for the limits of $r$ & $\theta$.
Can one help me in finding limits and volume .If one give an explanation also it will be so much helpful 
Thanks.
 A: You first have to first realize that one of your equations is in cylindrical while the other in Cartesian. To continue solving the problem you need to change the spherical surface equation to cylindrical so that it should be in the form of $\iiint dzdrd\theta$
So, your spherical surface has a cylindrical equation,
$$z^2=a^2-r^2 \implies z=\sqrt{a^2-r^2} \ \ \ \text{or} \ \  z=-\sqrt{a^2-r^2}$$
You noted that the limits of $z$ start from zero. That is incorrect if you don't consider symmetry. In reality, the limits of $z$ are 
$$\int \int \int_{-\sqrt{a^2-r^2}}^{\sqrt{a^2-r^2}} dz dr d\theta$$
We can make use of symmetry and start by zero but multiply by two. This would make integration easier. But, for now I will go about it the normal way. Now, we look at the limits of $r$ and $\theta$ which are,
$$4\int_{0}^{\pi/4} \int_{0}^{\sqrt{a^2 \cos(2\theta)}} \int_{-\sqrt{a^2-r^2}}^{\sqrt{a^2-r^2}} dz dr d\theta=8\int_{0}^{\pi/4} \int_{0}^{\sqrt{a^2 \cos(2\theta)}} \int_{0}^{\sqrt{a^2-r^2}} dz dr d\theta$$
This assumes we are finding the volume is bounded by the sphere and inside the lemniscate. Your question is unclear in this matter. Note that I multiplied by four because of the symmetry. If $z$ started at zero, we would multiply by $2$ to give $8$.
To find the volume inside the sphere but outside the lemniscate, the $r$ and $z$ limits change. You draw a ray from the center to find the limits of $r$, we want the outside so it meets the lemniscate at $r=a\sqrt{\cos(2\theta)}$ and finishes at $r=a$. The angle is from $0$ to $\frac{\pi}{2}$. So, we have
$$8\int_{0}^{\pi/2} \int_{a\sqrt{\cos(2\theta)}}^{a} \int_{0}^{\sqrt{a^2-r^2}} dz dr d\theta$$
Why $8$? For the symmetry on all three axes so $2^3$.
To sum up the solution take a look below the 3D figure of the two surfaces,

Notice how "over" doesn't make sense.
