Why does changing integral bounds get me the wrong answer?

Full disclaimer, this is a homework question.

Question

While solving this question, I came upon the integral $$\int_{-r}^{r}\frac{b\tan^{-1}(\theta)}{2}\sqrt{r^2-x^2} dx$$ Proceeding with trig substitution I simplified this to: $$-\frac{br^2\tan^{-1}(\theta)}{2}\int_{\pi}^{0}\sin^2(\theta_1) d\theta_1$$ which evaluates to $$\frac{\pi}{4}r^2b\tan^{-1}(\theta)$$ However, if we change the integration bounds to $$\int_{-\pi}^{0}\sin^2(\theta_1)d\theta_1$$ where $-\pi$ is also a solution to $$\cos(\theta_1)=-1$$ we instead get $$-\frac{\pi}{4}r^2b\tan^{-1}(\theta)$$ which is incorrect and obviously doesn't make sense as a value for volume. Why is this the case? Interpreting this geometrically, $-\pi$ to $0$ seems to more match up with the picture attached. Moreso, in general, how does changing the integration bounds affect the answer of an integral?


Solution 1:

If I understand your diagram correctly, the area of each triangle is,

$ \displaystyle \frac 12 \cdot b \cdot h = \frac 12 \cdot b \cdot b \tan\theta = \frac{b^2 \tan\theta}{2}$

And at a given $x$, $b = \sqrt{r^2-x^2}$

So the integral to find volume should be,

$\displaystyle V = \frac{\tan\theta}{2} \int_{-r}^r (r^2-x^2) dx$


In any case coming to your question about sign, please note when you do change of variable,

$\sqrt{r^2-x^2} = r |\sin\theta_1|$ and not $r \sin\theta_1$.

For $\theta \in (0, \pi), \sin\theta_1 $ is always positive, so writing $|\sin\theta_1|$ as $\sin\theta_1$ works. But for $\theta \in (-\pi, 0)$, $\sin\theta_1$ is negative as $\sin(-\theta) = - \sin\theta$.