Context: http://tutorial.math.lamar.edu/Classes/CalcI/MoreVolume.aspx (Example 3)
When integrating the spherical cap volume formula, Paul comes up with the following solution:
$V=\int_{r-h}^{r}\pi(r^2-y^2)dy=\pi\left(r^2y-\frac{1}{3}y^3\right)\biggr\rvert_{r-h}^{r}=\pi\left(h^2r-\frac{1}{3}h^3\right)=\pi h^2 \left(r-\frac{1}{3}h\right)$
Question: Whats going on here?*
This is my result:
$V=\int_{r-h}^{r}\pi(r^2-y^2)dy=\pi\left(r^2y-\frac{y^3}{3}\right)\biggr\rvert_{r-h}^{r}=\pi\left[\left(r^2\cdot r-\frac{r^3}{3}\right)- \left(r^2(r-h)-\frac {(r-h)^3}{3} \right )\right]$
$=\pi\left[\left(r^3-\frac{r^3}{3}\right)-\left(r^3-r^2 h-\frac{\color{red} {r^3-3hr^2+3h^2r-h^3}} {3}\right )\right]$
I had to stop here because my solution is very far from the one above.
*Sorry for the informal question
Thanks in advance.
Your solution was not very far from the one above. Let's group terms inside the square brackets, by powers of $r$:
We have $$r^3\left( 1 - \frac13 -(1-\frac13) \right) = 0 \cdot r^3$$ And $$ r^2 \left( 0 - (-h + \frac{3h}{3}) \right) = 0 \cdot r^2$$ And $$r \left( -(-3\frac{h^2}{3} \right) = rh^2$$ And $$ \left( -( -( -\frac{h^3}{3} )) \right) = - \frac13 h^3 $$
So the answer is $$\pi\left[rh^2 - \frac13 h^3 \right] = \pi h^2 \left( r - \frac13 h\right)$$