# How do you integrate int xcosx by integration by parts method?

Jul 31, 2016

$\int x \cos x \mathrm{dx} = x \sin x + \cos x + C$

#### Explanation:

Integration by parts tell us : $\int f \left(x\right) g ' \left(x\right) \mathrm{dx} = f \left(x\right) g \left(x\right) - \int f ' \left(x\right) g \left(x\right) \mathrm{dx}$

In this example
$f \left(x\right) = x$ and $g ' \left(x\right) = \cos x \to g \left(x\right) = \sin x$

Therefore, using integration by parts:
$\int x \cos x \mathrm{dx} = x \sin x - \int 1 \cdot \sin x \mathrm{dx}$

$= x \sin x + \cos x + C$