Hey guys so I need some help solving this..
Verify y=2cosx -cosxsinx
solves intial value problem y(dash) + (tanx)y = -cos^2x, y(0)=2
The y dash means the first derivative
$y=2\cos(x)-\cos(x)\sin(x)$
$y^\prime = -2\sin(x) - (-\sin^2(x) +\cos^2(x)) = -2\sin(x) - 1+2\sin^2(x)$
$y^\prime +\tan(x) y = -2\sin(x) - 1+2\sin^2(x) + \tan(x)(2\cos(x)-\cos(x)\sin(x))=$
Spoiler:
checking $y(0)$ we get
Spoiler: