Solveeit Logo

Question

Question: Solve the following differential equation \[\text{cosec}x\log y\dfrac{dy}{dx}+{{x}^{2}}{{y}^{2}}=0\]...

Solve the following differential equation cosecxlogydydx+x2y2=0\text{cosec}x\log y\dfrac{dy}{dx}+{{x}^{2}}{{y}^{2}}=0.

Explanation

Solution

In this question, in order to solve the given differential equation cosecxlogydydx+x2y2=0\text{cosec}x\log y\dfrac{dy}{dx}+{{x}^{2}}{{y}^{2}}=0 we have to simplify it using variable separable to get logyy2dy=x2cosecxdx\dfrac{\log y}{{{y}^{2}}}dy=\dfrac{-{{x}^{2}}}{\text{cosec}x}dx . We will then integrate both sides to get the desired solution of the given differential equation.

Complete step by step answer:
We are given with a differential equation of the form cosecxlogydydx+x2y2=0\text{cosec}x\log y\dfrac{dy}{dx}+{{x}^{2}}{{y}^{2}}=0.
On taking the value x2y2{{x}^{2}}{{y}^{2}} on the right hand side of the above differential equation, we get
cosecxlogydydx=x2y2\text{cosec}x\log y\dfrac{dy}{dx}=-{{x}^{2}}{{y}^{2}}.
Now we will be separating the variables by taking terms in variable xx on the right hand side of the above equation and terms in variable yy on the left hand side of the above equation.
Then we get
logyy2dy=x2cosecxdx\dfrac{\log y}{{{y}^{2}}}dy=\dfrac{-{{x}^{2}}}{\text{cosec}x}dx

Now on integrating both sides of the above differential equation, we will have
logyy2dy=x2cosecxdx\int{\dfrac{\log y}{{{y}^{2}}}dy}=\int{\dfrac{-{{x}^{2}}}{\text{cosec}x}dx}
Since 1cosecx=sinx\dfrac{1}{\text{cosec}x}=\sin x, then the above equation becomes
logy1y2dy=x2sinxdx\int{\log y\dfrac{1}{{{y}^{2}}}dy}=-\int{{{x}^{2}}\sin xdx}
Since we know that by integration by parts we have (uv)dx=uvdxddx(u)vdx\int{\left( uv \right)dx=u\int{vdx-\int{\dfrac{d}{dx}\left( u \right)\int{vdx}}}}
Now using formula of integration by parts on both side of the above integral, we get
logy1y2dyddy(logy)1y2dy=[x2sinxdxddx(x2)sinxdx]\log y\int{\dfrac{1}{{{y}^{2}}}dy-\int{\dfrac{d}{dy}\left( \log y \right)\int{\dfrac{1}{{{y}^{2}}}dy=}}}-\left[ {{x}^{2}}\int{\sin xdx-\int{\dfrac{d}{dx}\left( {{x}^{2}} \right)\int{\sin xdx}}} \right]
Now on evaluating the integral, we will have
logy[1y](1y)[1y]dy=x2cosx(2x)cosxdx+c\log y\left[ -\dfrac{1}{y} \right]-\int{\left( \dfrac{1}{y} \right)\left[ -\dfrac{1}{y} \right]dy=}{{x}^{2}}\cos x-\int{\left( 2x \right)\cos xdx}+c
On simplifying the above equation we get
logyy+(1y2)dy=x2cosx2xcosxdx+c-\dfrac{\log y}{y}+\int{\left( \dfrac{1}{{{y}^{2}}} \right)dy=}{{x}^{2}}\cos x-2\int{x\cos xdx}+c
Again on evaluation the above integral by using integration by parts in the right hand side of the above equation we get,
logyy+[1y]=x2cosx2[xcosxdxddx(x)cosxdx]+c-\dfrac{\log y}{y}+\left[ -\dfrac{1}{y} \right]={{x}^{2}}\cos x-2\left[ x\int{\cos xdx}-\int{\dfrac{d}{dx}\left( x \right)\int{\cos xdx}} \right]+c
Now we get
logyy+1y=x2cosx2[xsinx1.sinxdx]+c-\dfrac{\log y}{y}+-\dfrac{1}{y}={{x}^{2}}\cos x-2\left[ x\sin x-\int{1.\sin xdx} \right]+c
Again on simplifying, we will have
logyy1y=x2cosx2[xsinx+cosx]+c-\dfrac{\log y}{y}-\dfrac{1}{y}={{x}^{2}}\cos x-2\left[ x\sin x+\cos x \right]+c
logyy+1y+x2cosx2[xsinx+cosx]+c=0\Rightarrow \dfrac{\log y}{y}+\dfrac{1}{y}+{{x}^{2}}\cos x-2\left[ x\sin x+\cos x \right]+c=0
There on solving the given differential equation cosecxlogydydx+x2y2=0\text{cosec}x\log y\dfrac{dy}{dx}+{{x}^{2}}{{y}^{2}}=0, we get logyy+1y+x2cosx2[xsinx+cosx]+c=0\dfrac{\log y}{y}+\dfrac{1}{y}+{{x}^{2}}\cos x-2\left[ x\sin x+\cos x \right]+c=0.

Note:
In this problem, we are using the method of separation of variables of a differential equation in order to solve the problem. While using this method we have to take care of the fact that the differential equation allows one to rewrite an equation so that each of two variables occurs on a different side of the equation. Then integrating both sides with respect to different variables will lead us to the solution.