# What is the integral of xcos(x)?

Dec 20, 2014

You use idea of the integrating by parts:
$\int u v ' \mathrm{dx} = u v - \int u ' v \mathrm{dx}$

$\int x \cos x \mathrm{dx} =$
Let:
$u = x$
$u ' = 1$
$v ' = \cos x$
$v = \sin x$

Then:
$\int x \cos x \mathrm{dx} = x \sin x - \int 1 \cdot \sin x \mathrm{dx} = x \sin x - \left(- \cos x\right) = x \sin x + \cos x$

Dec 20, 2014

The integral is:
$x \cdot \sin \left(x\right) + \cos \left(x\right) + C$
You can get this result Integrating by Parts .
In general if you have the product of two functions $f \left(x\right) \cdot g \left(x\right)$ you can try this method in which you have:
$\int f \left(x\right) \cdot g \left(x\right) \mathrm{dx} = F \left(x\right) \cdot g \left(x\right) - \int F \left(x\right) \cdot g ' \left(x\right) \mathrm{dx}$

The integral of the product of the two functions is equal to the product of the integral ( $F \left(x\right)$ ) of the first times the second function ( $g \left(x\right)$ ) minus the integral of ther product of the integral of the first function ( $F \left(x\right)$ ) times the derivative of the second function ( $g ' \left(x\right)$ ). Hopefully the last integral should be easier to solve than the starting one!!!

In your case you get (you can choose which one is $f \left(x\right)$ to help you to make the solution easier ):

$f \left(x\right) = \cos \left(x\right)$

$g \left(x\right) = x$

$F \left(x\right) = \sin \left(x\right)$

$g ' \left(x\right) = 1$

And finally:
$\int x \cdot \cos \left(x\right) \mathrm{dx} = x \cdot \sin \left(x\right) - \int 1 \cdot \sin \left(x\right) \mathrm{dx} = x \cdot \sin \left(x\right) + \cos \left(x\right) + C$
You can now check your answer by deriving this result.