Question
Question: Find the general solution of the following differential equation: \(\sin x\dfrac{dy}{dx}+3y=\cos x...
Find the general solution of the following differential equation:
sinxdxdy+3y=cosx
Solution
To solve the given differential equation, we are going to divide sinx on both the sides of the equation. And then the equation will be written in the following differential form: dxdy+P(x)y=Q(x). Now, this equation will be solved by using the integrating factor concept in which first of all, we are going to find the integrating factor which is calculated as follows: λ=e∫P(x)dx. Then we are going to use this integrating factor in this manner: λy=∫(λQ(x))dx.
Complete step by step answer:
The differential equation given in the above problem is as follows:
sinxdxdy+3y=cosx
Dividing sinx on both the sides of the above equation we get,
sinxsinxdxdy+sinx3y=sinxcosx⇒dxdy+sinx3y=sinxcosx......(1)
We know from the trigonometric conversions that:
sinx1=cscx;sinxcosx=cotx
Using the above relations in eq. (1) we get,
⇒dxdy+3ycscx=cotx
The standard differential equation is as follows:
dxdy+P(x)y=Q(x)
Now, we know the integrating factor when solving the differential equation is as follows:
λ=e∫P(x)dx
Comparing the differential equation which we have rearranged to the above equation we get,
P(x)=3cscx;Q(x)=cotx
Now, we are going to find the integrating factor by using the above value of P(x) in the integrating factor formula and we get,
λ=e∫3cscxdx ………. (2)
We know the integration of cscx with respect to x is equal to:
∫cscxdx=ln(cscx−cotx)+C
Using the above integral in eq. (2) we get,
λ=e3(ln(cscx−cotx))⇒λ=eln(cscx−cotx)3⇒λ=(cscx−cotx)3
Now, if we have an integrating factor then in the following way we are going to find the solution of the differential equation:
∫(d(λy))=∫(λQ(x))dx
Substituting the value of λ&Q(x) from the above in the above equation we get,