# why does $\int_0^\pi \cos t(\sin t)^2 dt$ evaluate to $0$ when given the substitution $u = \sin t$

$$\int_0^\pi \cos t(\sin t)^2 dt$$ This evaluates to $0$ if I make the substitution $u = \sin t$ because the integral becomes $\int_0^0$. But on the other hand if I use a calculator and evaluate this integral I get $3.14 \times 10^{-3}$ . Why does this happen ? What am I doing wrong here ?

• Please also check your calculator and the input – Fakemistake Dec 2 '17 at 8:47
• I didn't quite understand what that meant. That's why I asked this question 😅 – Allen Dec 2 '17 at 8:50
• Your substitution is correct and the integral is indeed equal to $0$. – Paramanand Singh Dec 2 '17 at 8:53
• @Fakemistake you are correct – Allen Dec 2 '17 at 9:03
• I must say sorry guys, from the deepest part of my heart. It was a mistake that I had on the calculator. I had been using degrees as unit for angles instead of radians. Thank you for all your effort. I am planning to delete the post. – Allen Dec 2 '17 at 9:04

Note the antiderivative of $f (t)=\cos t (\sin t)^2$ is $F (t)=\frac{1}{3} (\sin t)^3 + C$ ($C$ const, e.g. $C=0$) and the conditions of the FTC are fulfilled, so your integral is just $F(\pi)-F (0)=\frac {1}{3}((\sin\pi)^3-(\sin 0)^3)=0$, and it is 0 after all.

Things might go wrong because $\sin$ is not monotone on the interval $(0,\pi)$.

Try it again with the RHS of :$$\int_0^{\pi}\dots dt=\int_0^{\frac12\pi}\dots dt+\int_{\frac12\pi}^{\pi}\dots dt$$

On the smaller intervals $\sin$ is monotone.

Apart from that also note that: $$\int_{\frac12\pi}^{\pi}\cos t(\sin t)^2dt=-\int_0^{\frac12\pi}\cos(\pi-t)(\sin(\pi-t))^2d(\pi-t)=-\int_0^{\frac12\pi}\cos t(\sin t)^2dt$$

• but then again when you make the substitution you get 0 – Allen Dec 2 '17 at 8:47
• Well, I expect that to be the correct answer then. It agrees with the other method mentioned in my question. – drhab Dec 2 '17 at 8:48

Because you have doubts, just make the "more trusted" substitution $t=u- \frac {\pi}2$, you'll get $\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin u(\cos t)^2 du=0$ because the function is odd, therefore your substitution is right.

We should make use of the following change of formula theorem, I adopted from Introduction to Analysis, William R. Wade:

Let $\phi$ be continuously differentiable on a closed, nondegenerate interval $[a,b]$. If $\phi'$ is nonzero on $(a,b)$ and if $f$ is integrable on $[c,d]=\phi[a,b]$, then $f\circ\phi\cdot|\phi'|$ is integrable on $[a,b]$, and \begin{align*} \int_{c}^{d}f(t)dt=\int_{a}^{b}f(\phi(x))\cdot|\phi'(x)|dx. \end{align*}

Return to your question, the $\sin$ which is the role of $\phi$, its derivative, $\cos$, is zero somewhere on $(0,\pi)$, but if we restrict to $(0,\pi/2)$, then it is safe to use the theorem.

• Okay, I see that the integral is zero, but I think it is safer if we use the theorem. – user284331 Dec 2 '17 at 8:58