Solve differential equation dy/dx+ycos(x)= 4cos(x), y(0)=6

First order differential equations
asked 2021-02-23

Solve differential equation \(\frac{dy}{dx}+y \cos(x)= 4\cos(x)\), y(0)=6

Expert Answers (1)


\(\frac{dy}{dx}+y \cos x= 4\cos x\)
That is \(\frac{dy}{dx}+(\cos x)y= 4\cos x\)
So \(P(x)= \cos x\), \(Q(x)= 4\cos x\)
Integrating factor is
\(I.F.= e^{(\int P(x)dx)}\)
\(= e^{\int \cos xdx}\)
\(= e^{\sin x}\)
\(y \cdot I.F.= \int Q(x) \cdot I.F. dx+c\)
\(ye^{\sin x}= \int 4\cos x e^{\sin x} dx+c\)
\(= 4 \int e^{\sin x} \cos x dx+c\)
\(= 4 \int e^t dt+c\) (by subtitution)
\(= 4e^t+c\)
\(ye^{\sin x}= 4e^{\sin x}+c\)
\(y(x)=4e^{\sin x}+c\)
Now apply the initial condition y(0)=6 in the general solution
\(4e^0+c=6 => 4+c=6\)
c=6-4=2 Now substitute 2 for c in general solution
Thus,the particular solution is \(y(x)=4e^{\sin x}+2\)

Best answer

expert advice

Have a similar question?
We can deal with it in 3 hours