Gravitational force inside a uniform solid ball - evaluation of the integral in spherical coordinates - mistake I have been reading this PDF document: www.math.udel.edu/~lazebnik/BallPoint.pdf
While trying Case A I found a small error (a $2$ was missing) but I was able to follow the argumentation and got to the solution.
My problem is Case 2:
After substituting $u=\sqrt{a^2 \cos^2 \phi + R^2 - a^2}$
$$2\pi G\delta m(\int_0^\pi a \cos^2 \phi \sin \phi \, d\phi + \int_0^\pi \sqrt{a^2 \cos^2 \phi + R^2 - a^2} \cos\phi \sin \phi \, d\phi)$$
should evaluate to $$Gm\frac{4}{3}\pi a^3 \delta \cdot \frac{1}{a^2}$$ 
How do I get to that?
I have tried: 
Evaluating the first integral, I get $$\int_0^\pi a \cos^2 \phi \sin \phi \, d\phi = \frac{2}{3}a.$$
Evaluating the second integral, I get $$\int_0^\pi \sqrt{a^2 \cos^2 \phi + R^2 - a^2} \cos\phi \sin \phi \, d\phi$$ $$\int \sqrt{a^2 \cos^2 \phi + R^2 - a^2} \cos\phi \sin \phi \, d\phi=-\frac{u^3}{3 a^2}+ C$$ Now I have to change the limits: If $\phi=0$ then $u=R$. I already used this in Case A. But if $\phi = \pi$ then $u=R$, so the second integral is zero $$\int_0^\pi \sqrt{a^2 \cos^2 \phi + R^2 - a^2} \cos\phi \sin \phi \, d\phi= 0$$
Summing the two parts I would get
$$2\pi G\delta m(\int_0^\pi a \cos^2 \phi \sin \phi \, d\phi + \int_0^\pi \sqrt{a^2 \cos^2 \phi + R^2 - a^2} \cos\phi \sin \phi \, d\phi)=2\pi G\delta m \cdot \frac{2}{3}a$$ which is obviously wrong. 
Where is my mistake?

By symmetry,
$$
\int_{0}^{\pi} \sqrt{a^{2}\cos^{2} \phi + R^{2} - a^{2}} \cos\phi \sin\phi\, d\phi = 0.
$$
Loosely, the radical and $\sin\phi$ are "even-symmetric" on $[0, \pi]$, while $\cos\phi$ is "odd-symmetric". That is, substituting $\psi = \phi - \frac{\pi}{2}$ gives
$$
\int_{0}^{\pi} \sqrt{a^{2}\cos^{2} \phi + R^{2} - a^{2}} \cos\phi \sin\phi\, d\phi
  = -\int_{-\pi/2}^{\pi/2} \sqrt{a^{2}\sin^{2} \psi + R^{2} - a^{2}} \cos\psi \sin\psi\, d\psi,
$$
the integral of an odd function over a symmetric interval.
The rest of your calculation is correct; that is,
$$
2\pi G\delta m \int_{0}^{\pi} a\cos^{2}\phi \sin\phi\, d\phi
  = 2\pi G\delta m \cdot \frac{2}{3} a
  = Gm \frac{4}{3} \pi a^{3} \delta \cdot \frac{1}{a^{2}},
$$
as desired.
