Recently, I was working on exercises concerning bodies of rotation, when I ran into an issue with calculating a value for some of these.
The exercise goes as follows (I'm paraphrasing): Consider a function $f(x)=x^2-4$. Calculate the volume of the body created when the area defined by $f(x)$ and the x-axis is rotated around the x-axis.
The beginning is straightforward enough. I calculate the intersections of $f(x)$ with the x-axis, which gives me $x_1=-2$ and $x_2=2$. These are the boundaries for my integral.
I can now determine the integral for further calculations:
$$ V=\pi *\int_{-2}^{2}(x^2 - 4)^2 dx $$
This is where problems start appearing. If I continue by finding the antiderivative of $(x^2-4)^2$, I get this:
$$ V=\pi*\left[\frac{1}{6x}(x^2-4)^3\right]_{-2}^2 $$ $$ V=\pi\left(\frac{1}{6(2)}((2)^2 - 4)^3 - \frac{1}{6(-2)}((-2)^2 - 4)^3\right) $$ $$ V=\pi(0 - 0) = 0 $$
This is obviously incorrect. However, if I instead use apply the binomial rule and turn $(x^2-4)^2$ into $x^4 - 8x^2 + 16$, I can perform these calculations:
$$ V=\pi*\left[\frac15x^5 - \frac83x^3 + 16x\right]_{-2}^2 $$ $$ V=\pi\left(\frac15(2)^5 - \frac83(2)^3 + 16(2) - \left(\frac15(-2)^5 - \frac83(-2)^3 + 16(-2)\right)\right) $$ $$ V=\pi\left(\frac{256}{15} - \frac{-256}{15}\right) = \frac{512}{15}\pi $$
This appears to be the correct answer (there may be an arithmetic error). This leads me to wonder: Why does expanding the equation lead to the correct result, while not doing so give $0$? I can see why in the function itself (if I carry over the part of the equation I originally set equal to $0$, of course the results from that in the same function will give me $0$), but it doesn't make intuitive sense to me. Any help explaining this is appreciated! (I believe it has something to do with antiderivatives)
So, as @Lubin and @Tyberius have pointed out, the first antiderivative is incorrect, as I was previously ignoring the $\frac1{6x}$ factor I added to the antiderivative, which must of course also be derived using the product rule $(u * v)' = u' * v + u * v'$, leading to a different function in the end:
$$ \frac{(-4 + x^2)^2 (4 + 5 x^2)}{6 x^2} $$
This falsified my later calculations.