Question
Question: Solve the differential equation: \(\dfrac{dy}{dx}+2y\tan x=\sin x\)...
Solve the differential equation:
dxdy+2ytanx=sinx
Solution
Hint: Observe that the given differential equation is a linear differential equation, i.e. a differential equation of the form dxdy+P(x)y=Q(x). The solution of a linear differential equation is given by
yI.F=∫Q(x)I.Fdx, where IF=e∫P(x)dx. Find the integrating factor of the given differential equation and hence find the solution of the given equation. Verify your answer.
Complete step-by-step answer:
We have dxdy+2ytanx=sinx, which is of the form of dxdy+P(x)y=Q(x).
Here P(x)=2tanx and Q(x)=sinx.
Now, we know that the integrating factor IF of a linear differential equation is given by
IF=e∫P(x)dx
Hence, the integrating factor of the given differential equation is given by
IF=e∫2tanxdx.
We know that ∫tanxdx=ln(secx)+C
Hence, we have IF=e2ln(secx)=eln(sec2x)
We know that elnx=x
Hence, we have
IF=sec2x
Now, we know that the solution of a linear differential equation is given by
yIF=∫Q(x)IFdx
Hence, the solution of the given equation is
ysec2x=∫sinxsec2xdx
Now, we have
sinxsec2x=sinxsecxsecx=cosxsinxsecx=secxtanx
Hence, we have
ysec2x=∫secxtanxdx
We know that
∫secxtanxdx=secx
Hence, we have
ysec2x=secx+C
Dividing both sides by sec2x, we get
y=cosx+Ccos2x, which is the required solution of the given differential equation.
Note: Verification.
We have
y=cosx+Ccos2x
Differentiating both sides, we get
dxdy=−sinx−2Csinxcosx
Adding 2ytanx on both sides, we get
dxdy+2ytanx=−sinx−2Csinxcosx+2tanx(cosx+Ccos2x)
We have tanxcosx=cosxsinxcosx=sinx
Hence, we have
dxdy+2ytanx=−sinx−2Csinxcosx+2sinx+2Csinxcosx
Simplifying, we get
dxdy+2ytanx=sinx, which is the given differential equation.
Hence our answer is verified to be correct.