Question
Question: Solve the differential equation \(\dfrac{dy}{dx}+y\tan x=\sin x\)...
Solve the differential equation
dxdy+ytanx=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+ytanx=sinx, which is of the form of dxdy+P(x)y=Q(x).
Here P(x)=tanx 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∫tanxdx.
We know that ∫tanxdx=ln(secx)+C
Hence, we have IF=eln(secx)
We know that elnx=x
Hence, we have
IF=secx
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
ysecx=∫sinxsecxdx
Now, we have
sinxsecx=cosxsinx=tanx
Hence, we have
ysecx=∫tanxdx
We know that
∫tanxdx=ln(secx)
Hence, we have
ysecx=ln(secx)+C
Dividing both sides by secx, we get
y=cosxln(secx)+Ccosx, which is the required solution of the given differential equation.
Note: Verification.
We have
y=cosxln(secx)+Ccosx
Differentiating both sides, we get
dxdy=−sinxln(secx)+cosxtanx−Csinx
Adding ytanx on both sides, we get
dxdy+ytanx=dxdy=−sinxln(secx)+cosxtanx−Csinx+tanx(cosxln(secx)+Ccosx)
We have tanxcosx=cosxsinxcosx=sinx
Hence, we have
dxdy+ytanx=−sinxln(secx)+sinx−Csinx+sinxln(secx)+Csinx
Simplifying, we get
dxdy+ytanx=sinx, which is the given differential equation.
Hence our answer is verified to be correct.