# Verify that y=sin xcos x-cos x is a solution of the initial value problem y'+(tan x)y=cos^2 xy(0)=-1 on the interval -pi /2 < x< pi/2

Verify that $y=\mathrm{sin}x\mathrm{cos}x-\mathrm{cos}x$ is a solution of the initial value problem ${y}^{\prime }+\left(\mathrm{tan}x\right)y=co{s}^{2}xy\left(0\right)=-1$ on the interval $-\pi /2
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

y'+y P(x)= Q(x)
${y}^{\prime }+\left(\mathrm{tan}x\right)y={\mathrm{cos}}^{2}x$ linear diff. eqn.
$P\left(x\right)=\mathrm{tan}x$
$Q\left(x\right)={\mathrm{cos}}^{2}x$
integration factor $i\left(x\right)=\mathrm{exp}\left(\int P\left(x\right)dx\right)=\mathrm{exp}\left(\int \mathrm{tan}\left(x\right)dx\right)$
$=\mathrm{exp}\left(-\mathrm{ln}\left(\mathrm{cos}x\right)=\frac{1}{\mathrm{cos}x}$
$y.i\left(x\right)=\int i\left(x\right)Q\left(x\right)dx+c$
$y\ast \frac{1}{\mathrm{cos}x}=\int \frac{1}{\mathrm{cos}x}{\mathrm{cos}}^{2}xdx+c$
$y\ast \frac{1}{\mathrm{cos}x}=\mathrm{sin}x+c$
$y=\mathrm{sin}x.\mathrm{cos}x+c.\mathrm{cos}x$
$y\left(0\right)=-1⇒-1=\mathrm{sin}0\mathrm{cos}0+c.cos0⇒c=-1$
$y=\mathrm{sin}x.\mathrm{cos}x-\mathrm{cos}x$