The answer to this question was supposed to be $-\frac{\pi}4$ using integration by parts but I thought this substitution was sufficient to get the answer.
-
1Sine is not invertible on the whole interval $A=[0,\pi]$, so you can't just write $\sin(u) = x$. If it were invertible on $A$ then it would be injective, but clearly $\sin(\pi) = \sin(0)$ and $0 \not = \pi$. There are also, infinitely many other values that go against infectivity, just look at the graph. – Faraad Armwood Oct 10 '16 at 02:18
-
@FaraadArmwood. infectivity is nice in this context ! – Claude Leibovici Oct 10 '16 at 05:02
-
@ClaudeLeibovici: That was totally by accident. lol – Faraad Armwood Oct 10 '16 at 05:04
-
@FaraadArmwood.A nice and revealing accident ! Cheers :-) – Claude Leibovici Oct 10 '16 at 05:36
-
Hint: Find the roots of the integrand. When you do so, you will see how to break up the integral. – poweierstrass Oct 10 '16 at 11:06
1 Answers
We find the antiderivative of $x\sin(x)\cos(x)$.
Remember that $\sin(x)\cos(x) = \sin(2x)/2$. Then the integral becomes $$\frac{1}{2} \int x\sin(2x)\textrm{dx}$$
Now we use integration by parts, by setting $f(x) = x$ and $g(x) = -\cos(2x)/2$, (by noting that then $g'(x) = \sin(2x)$).
\begin{align*} \frac{1}{2} \int x\sin(2x)\textrm{dx} &= \frac{1}{2} \left(-\frac{x\cos(2x)}{2} - \int -\frac{1}{2}\cos(2x)\textrm{dx}\right) \\ &= \frac{1}{2}\left(\frac{-x\cos(2x)}{2} + \frac{1}{2}\int \cos(2x)\textrm{dx}\right) \\ &= \frac{-x\cos(2x)}{4} + \frac{1}{4}\left(\frac{-\sin(2x)}{2}\right) + C\\ &= \frac{-2x\cos(2x) - \sin(2x)}{8} + C \end{align*} for some constant $C \in \mathbb{R}$. Now recall that $\int x \sin(2x)\textrm{dx}/2 = \int x\sin(x)\cos(x)\textrm{dx}$.
So, our answer is:
\begin{align*} \left[\int x\sin(x)\cos(x)\textrm{dx}\right]_0^\pi &= \left[\frac{-2x\cos(2x) - \sin(2x)}{8}\right]_0^\pi \\ &= \frac{-2\pi\cos(2\pi) - \sin(2\pi)}{8} + \frac{-2(0)\cos(0) - \sin(0)}{8} \\ &= -\frac{\pi}{4} \end{align*}
- 329
- 1
- 10
