If we place the sphere so that its center is at the origin, then the plane $P\_x$ intersects the sphere in a circle whose radius is $y = \sqrt{r^2-x^2}$.So the cross-sectional area is $$A(x) = \pi y^2 = \pi (r^2 - x^2)$$

[![enter image description here](https://i.stack.imgur.com/YFxe7.png)](https://i.stack.imgur.com/YFxe7.png)

Where I get lost is in the integration. How does $2\pi\int\_{0}^{r} (r^2-x^2)dx$ integrate to $2\pi \bigg[ r^2x - \frac{x^3}{3}\bigg]\_{0}^{r}$ ? In my mind it integrates to $2\pi \bigg[ \frac{1}{3} r^3 - \frac{1}{3}x^3\bigg]\_{0}^{r}$

What am I overlooking here? I am really confused why $r^2 \to r^2x$ if it's just a simple power series integration.