0

enter image description here

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.

suomynonA
  • 6,895

1 Answers1

1

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*}

defunct-user
  • 329
  • 1
  • 10