Integration by parts · Exercise-INTEGRATION-BY-PARTS-006

Step-by-step solved exercise: Integrals

Compute \(\displaystyle\int x \cos {x}\,dx\).

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. Take \(\displaystyle u=x\) and \(\displaystyle dv=\cos x\,dx\).

    \[\displaystyle u=x,\quad dv=\cos x\,dx\]
  2. Compute \(\displaystyle du=dx\) and \(\displaystyle v=\sin x\).

    \[\displaystyle du=dx,\quad v=\sin x\]
  3. Apply the formula \(\displaystyle \int u\,dv=uv-\int v\,du\).

    \[\displaystyle \int x\cos x\,dx = x\sin x-\int\sin x\,dx\]
  4. Use \(\displaystyle \int \sin x\,dx=-\cos x\) to get the final result.

    \[\displaystyle x\sin x+\cos x+C\]

    Comment: Check: the derivative of \(\displaystyle x\sin x+\cos x\) is \(\displaystyle x\cos x\).

Answer

\(\displaystyle x \sin {x} + \cos {x} + C\)

🎯 Build my path to this exercise