Solveeit Logo

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;x0\left( 1+{{x}^{2}} \right)dy+2xydx=\cot xdx;x\ne 0.

Explanation

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, dydx+Py=Q\dfrac{dy}{dx}+Py=Q form or dxdy+Px=Q\dfrac{dx}{dy}+Px=Q form.

Complete step by step answer:
The given equation in the question is, (1+x2)dy+2xydx=cotxdx\left( 1+{{x}^{2}} \right)dy+2xydx=\cot xdx. Dividing both the sides by dxdx, we will get,
(1+x2)dydx+2xydxdx=cotxdxdx (1+x2)dydx+2xy=cotx \begin{aligned} & \left( 1+{{x}^{2}} \right)\dfrac{dy}{dx}+2xy\dfrac{dx}{dx}=\cot x\dfrac{dx}{dx} \\\ & \Rightarrow \left( 1+{{x}^{2}} \right)\dfrac{dy}{dx}+2xy=\cot x \\\ \end{aligned}
Now dividing both the sides by (1+x2)\left( 1+{{x}^{2}} \right), we will get,
dydx+2xy(1+x2)=cotx(1+x2)(1)\dfrac{dy}{dx}+\dfrac{2xy}{\left( 1+{{x}^{2}} \right)}=\dfrac{\cot x}{\left( 1+{{x}^{2}} \right)}\ldots \ldots \ldots \left( 1 \right)
Comparing the above equation (1) with dydx+Py=Q\dfrac{dy}{dx}+Py=Q, where P=2x(1+x2)P=\dfrac{2x}{\left( 1+{{x}^{2}} \right)} and Q=cotx(1+x2)Q=\dfrac{\cot x}{\left( 1+{{x}^{2}} \right)}.
Now we have to find the Integrating Factor, I.F. So, we have,
I.F=eP.dxI.F={{e}^{\int{P.dx}}}
Now we will put the value of p in the formula of integrating factor. Therefore, we will get,
I.F=e2x1+x2dxI.F={{e}^{\int{\dfrac{2x}{1+{{x}^{2}}}dx}}}
Let us consider t=1+x2t=1+{{x}^{2}}
On differentiation of t with respect to x, we will getas follows,
dt=2xdxdt=2xdx,
Therefore, we get,
I.F=edttI.F={{e}^{\int{\dfrac{dt}{t}}}}
And we know that integration of 1t\dfrac{1}{t} is logt\log t, therefore we will get,
I.F=elogtI.F={{e}^{\log t}}
By solving this we will get the integration factor as,
I.F=t I.F=(1+x2) \begin{aligned} & I.F=t \\\ & \Rightarrow I.F=\left( 1+{{x}^{2}} \right) \\\ \end{aligned}
So, we get that the I.F=1+x2I.F=1+{{x}^{2}}. So, the solution of the equation will be,
y×I.F=Q×I.Fdx+c(2)y\times I.F=\int{Q\times I.Fdx+c\ldots \ldots \ldots \left( 2 \right)}
By substituting the values in equation, we will get as,
y×(1+x2)=cotx(1+x2)×(1+x2)dx+c y.(1+x2)=cotxdx+c \begin{aligned} & y\times \left( 1+{{x}^{2}} \right)=\int{\dfrac{\cot x}{\left( 1+{{x}^{2}} \right)}\times \left( 1+{{x}^{2}} \right)dx+c} \\\ & \Rightarrow y.\left( 1+{{x}^{2}} \right)=\int{\cot xdx+c} \\\ \end{aligned}
By solving this, we will get,
y(1+x2)=logsinx+cy\left( 1+{{x}^{2}} \right)=\log \left| \sin x \right|+c
Dividing both sides by (1+x2)\left( 1+{{x}^{2}} \right), we will get,
y=(1+x2)1logsinx+c(1+x2)1y={{\left( 1+{{x}^{2}} \right)}^{-1}}\log \left| \sin x \right|+c{{\left( 1+{{x}^{2}} \right)}^{-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 dydx+Py=Q\dfrac{dy}{dx}+Py=Q form is given as y(I.F)=(I.F)Qdxy\left( I.F \right)=\int{\left( I.F \right)Qdx} and the solution of the form dxdy+Px=Q\dfrac{dx}{dy}+Px=Q would be given as x(I.F)=(I.F)Qdyx\left( I.F \right)=\int{\left( I.F \right)Qdy}.