Moment of inertia of uniform solid sphere 
I have derived moment of inertia of solid sphere along diameter but my textbook says that moment of inertia is:
$$\frac{2MR^2}{5}$$
What is the mistake in my derivation? 
 A: The mistake is in the second line, in the calculation of the differential mass element. The differential mass element in this case is a disc, of radius $r$  where $r = R \cos\theta$ as you have correctly used. 
However, the thickness of this differential disc is NOT $ R d\theta$ but $Rd\theta cos\theta$. Try to wrap your head around this. $Rd\theta$ is the length of a tiny, tiny arc of radius $R$ and angle $d\theta$ and in the infinitesimal limit it can be approximated to a straight line, that is, a chord but notice that this chord is still not along the z axis (id est, the vertical axis). So, the shape that you have described is not a disc at all. It is a conical frustum instead. (You can verify this by trying to calculate the volume of the sphere using your formula. You'd see that it doesn't come to $\frac{4}{3}\pi R^3 $.) And the moment of inertia for a frustrum is not $\frac{mr^2}{2}$.
What you need to do is take the vertical projection of this chord, and that is where the $cos\theta$ comes in. Try the integration again with this new differential element and you will have landed at correct moment of inertia, $\frac{2}{5} MR^2$. 
A: I can't really follow your work, but here's one way to do it.
Take the axis to be the $z$ axis. The distance of a point $\left(r,\theta,\phi\right)$ in the sphere from the $z$ axis is $r \sin \theta$, so
$$
\begin{eqnarray}
I &=& \int dV \rho \left(r \sin \theta\right)^2 \\
&=& \rho \int_0^{2\pi} d\phi \int_0^\pi  d\theta \int_0^R dr \ r^2 \sin \theta \ \left(r \sin \theta\right)^2 \\
&=& 2 \pi \rho \int_0^\pi d\theta \ \sin^3 \theta \int_0^R dr \ r^4  
\end{eqnarray}
$$
You can take it from here.
