# The volume of sphere using integrals

In spherical coordinate system I have the volume element $$dV=r^{2}\sin(\theta)\ d\theta\ d\varphi\ dr$$ I want to calculate the volume for the radius equal to $R$. I calculate the integral: $$\int_{0}^{R} \int_{0}^{2\pi} \int_{0}^{\pi} r^{2}\sin(\theta)\ d\theta\ d\varphi\ dr = \left [-\frac{1}{3}r^{3}\cos(\theta) \right ]_{0,0,0}^{r=R,\varphi=2\pi,\theta=\pi}=\frac{2}{3}\pi R^{3}$$

What did I do wrong?

• @Salahamam_Fatima What is so bad in this question? – Karol Borkowski Aug 11 '17 at 15:30
• Technically, one computes the volume of a ball in 3D, or the volume enclosed by a 2D sphere in three dimensions. Thus "area of a circle" and "volume of a sphere" are ill-defined. – DanielC Aug 11 '17 at 15:47

## 4 Answers

When you evaluate your integral it should be $$-\frac{1}{3}r^3[\cos(\pi)-\cos(0)].$$

• How can you upvote this incorrect response. – hamam_Abdallah Aug 11 '17 at 15:23
• @Salahamam_Fatima There's nothing incorrect about it – JohnColtraneisJC Aug 11 '17 at 15:24

It often helps to write out all of the computation in excruciating detail. It is harder to make errors that way, and easier to spot them. \begin{align} \int_{0}^{R}\int_{0}^{2\pi}\int_{0}^{\pi} r^2\sin(\theta)\, \mathrm{d}\theta\,\mathrm{d}\varphi\,\mathrm{d}r &= \int_{0}^{R} \int_{0}^{2\pi} \Big[r^2 (-\cos(\theta))\Big]_{\theta=0}^{\pi}\,\mathrm{d}\varphi\, \mathrm{d}r \\ &= \int_{0}^{R} \int_{0}^{2\pi} r^2\left(-\cos(\pi) + \cos(0)\right)\,\mathrm{d}\varphi\, \mathrm{d}r \tag{$\ast$} \\ &= \int_{0}^{R} \int_{0}^{2\pi} 2r^2\,\mathrm{d}\varphi\, \mathrm{d}r\\ &= \int_{0}^{R} 4\pi r^2\,\mathrm{d}r \\ &= \left[ \frac{4}{3}R^3 \right]_{r=0}^{R} \\ &= \frac{4}{3} \pi R^3. \end{align} In this case, as others have pointed out, it appears that your error was somewhere around the step I labeled with ($\ast$).

Sphere of radius $r$ can be generated by revolving the upper semicircular disk enclosed between the $x-$ axis and $$x^2+y^2 = r^2$$ about the $x-$axis. Since the upper half of this circle is the graph of $$y = f(x)= \sqrt{r^2 - x^2},$$ it follows that the volume of the sphere is $$V = \int_{a}^{b}\pi[f(x)]^2dx = \int_{-r}^{r}\pi(r^2 -x^2)dx = \pi\left[r^2x -\frac{x^3}{3}\right] = \frac{4}{3}\pi r^3.$$

$$(-\cos (\pi))-(-\cos (0))=2$$

the volume is

$$\frac {R^3}{3} .2\pi.2=\frac {4\pi R^3}{3}$$