I am trying to use substitution on this indefinite integral.

Here is what I have so far:

$\displaystyle \int sinx - 2cosx dx$

let u = -cosx

du/dx = sinx

du = sinx dx - so I am left with:

$\displaystyle \int 2u du$

$\displaystyle = [u^2]$

sub back in

$\displaystyle - cos^2 x$

Where am I going wrong?

Angus