Question
Question: Solve the following differential equation: \(\left( 1+{{x}^{2}} \right)dy+2xydx=\cot xdx;x\ne 0\)....
Solve the following differential equation: (1+x2)dy+2xydx=cotxdx;x=0.
Solution
To solve this type of question, we should know about the general forms of linear differential equations. We have to identify the equation by dividing and subtracting by any term and then we have to see to the questions from like, dxdy+Py=Q form or dydx+Px=Q form.
Complete step by step answer:
The given equation in the question is, (1+x2)dy+2xydx=cotxdx. Dividing both the sides by dx, we will get,
(1+x2)dxdy+2xydxdx=cotxdxdx⇒(1+x2)dxdy+2xy=cotx
Now dividing both the sides by (1+x2), we will get,
dxdy+(1+x2)2xy=(1+x2)cotx………(1)
Comparing the above equation (1) with dxdy+Py=Q, where P=(1+x2)2x and Q=(1+x2)cotx.
Now we have to find the Integrating Factor, I.F. So, we have,
I.F=e∫P.dx
Now we will put the value of p in the formula of integrating factor. Therefore, we will get,
I.F=e∫1+x22xdx
Let us consider t=1+x2
On differentiation of t with respect to x, we will getas follows,
dt=2xdx,
Therefore, we get,
I.F=e∫tdt
And we know that integration of t1 is logt, therefore we will get,
I.F=elogt
By solving this we will get the integration factor as,
I.F=t⇒I.F=(1+x2)
So, we get that the I.F=1+x2. So, the solution of the equation will be,
y×I.F=∫Q×I.Fdx+c………(2)
By substituting the values in equation, we will get as,
y×(1+x2)=∫(1+x2)cotx×(1+x2)dx+c⇒y.(1+x2)=∫cotxdx+c
By solving this, we will get,
y(1+x2)=log∣sinx∣+c
Dividing both sides by (1+x2), we will get,
y=(1+x2)−1log∣sinx∣+c(1+x2)−1
So, this is the general solution of the equation.
Note: In the linear differential equations, there are two forms and the solution of both are different from one another. We should remember that the solution of dxdy+Py=Q form is given as y(I.F)=∫(I.F)Qdx and the solution of the form dydx+Px=Q would be given as x(I.F)=∫(I.F)Qdy.