I'm trying to calculate the below integral:
$$ \int_{0}^{2 \pi} \sqrt{(-5\sin t-10\cos t\sin t)^2+(-5\sin^2t+5\cos^2t+5\cos t)^2} dt $$
After some lengthy manipulations, I get the below as the result of the indefinite integral:
$$ 20\sin\frac{t}{2} $$
This seems right as confirmed by Wolframalpha and several other online integral calculators. Now, the answer sheet says that the result is $40$ (again: confirmed by Wolframalpha), but how could that be - when you plug $2\pi$ and $0$ as the bounds of integration, the result should be $0$. Or did my brain just turn off?
It's because you need to take into account the modulus sign!
You have $$10\int_{0}^{2\pi}\sqrt{\cos^{2}(\frac{t}{2})}dt=10\int_{0}^{2\pi}|\cos(\frac{t}{2})|dt$$ $$=10\big[\int_{0}^{\pi}\cos(\frac{t}{2})dt-\int_{\pi}^{2\pi}\cos(\frac{t}{2})dt\big]$$ $$=20\big[\sin(\frac{t}{2})\big|_{t=0}^{t=\pi}-\sin(\frac{t}{2})\big|_{t=\pi}^{t=2\pi}\big]$$ $$=20\big[1-0-(0-1)\big]=20\cdot2=40.$$