# Integral of x Cos2x

In this tutorial we shall find the integral of the x Cos2x function. To evaluate this integral we shall use the integration by parts method.

The integration is of the form
$I = \int {x\cos 2xdx}$

Here the first function is $x$ and the second function is $\cos 2x$
$I = \int {x\cos 2xdx} \,\,\,\,{\text{ – – – }}\left( {\text{i}} \right)$

Using the formula for integration by parts, we have
$\int {\left[ {f\left( x \right)g\left( x \right)} \right]dx = f\left( x \right)\int {g\left( x \right)dx – \int {\left[ {\frac{d}{{dx}}f\left( x \right)\int {g\left( x \right)dx} } \right]dx} } }$

Using the formula above, equation (i) becomes
$I = x\int {\cos 2xdx} – \int {\left[ {\frac{d}{{dx}}x\left( {\int {\cos 2xdx} } \right)} \right]} dx$

Using the integral rule $\int {\cos kx} dx = \frac{{\sin kx}}{k} + c$, we have
$\begin{gathered} I = x\frac{{\sin 2x}}{2} – \int {\left[ {\left( 1 \right)\frac{{\sin 2x}}{2}} \right]} dx \\ \Rightarrow I = \frac{x}{2}\sin 2x – \frac{1}{2}\int {\sin 2x} dx \\ \end{gathered}$

Using the integral rule $\int {\sin kx} dx = – \frac{{\cos kx}}{k} + c$, we have
$\begin{gathered} I = \frac{x}{2}\sin 2x – \frac{1}{2}\left( {\frac{{ – \cos 2x}}{2}} \right) + c \\ \Rightarrow I = \frac{x}{2}\sin 2x + \frac{1}{4}\cos 2x + c \\ \Rightarrow \int {x\cos 2xdx} = \frac{x}{2}\sin 2x + \frac{1}{4}\cos 2x + c \\ \end{gathered}$