Solveeit Logo

Question

Question: Solve the following differential equation: \[\left( {{x^2} + xy} \right)dy = \left( {{x^2} + {y^2}} ...

Solve the following differential equation: (x2+xy)dy=(x2+y2)dx\left( {{x^2} + xy} \right)dy = \left( {{x^2} + {y^2}} \right)dx.

Explanation

Solution

Hint- Here, we will proceed by using the general method of solving any homogeneous differential equation which includes substituting y = vx and then converting the given differential equation into variable separable form in order to obtain the solution.

Complete step-by-step answer:
Given differential equation is (x2+xy)dy=(x2+y2)dx\left( {{x^2} + xy} \right)dy = \left( {{x^2} + {y^2}} \right)dx
By shifting (x2+xy)\left( {{x^2} + xy} \right) on the RHS and dx on the LHS of the above equation, we get
dydx=(x2+y2)(x2+xy) (1)\Rightarrow \dfrac{{dy}}{{dx}} = \dfrac{{\left( {{x^2} + {y^2}} \right)}}{{\left( {{x^2} + xy} \right)}}{\text{ }} \to {\text{(1)}}
Since, the above differential equation is homogeneous differential equation because the degree of the function on the RHS of the equation (1) is same in the numerator and in the denominator (i.e., second degree function)
Put y = vx,
Differentiating the above equation with respect to x on both the sides, we get
dydx=ddx(vx) dydx=vdxdx+xdvdx dydx=v+xdvdx (2)  \Rightarrow \dfrac{{dy}}{{dx}} = \dfrac{d}{{dx}}\left( {vx} \right) \\\ \Rightarrow \dfrac{{dy}}{{dx}} = v\dfrac{{dx}}{{dx}} + x\dfrac{{dv}}{{dx}} \\\ \Rightarrow \dfrac{{dy}}{{dx}} = v + x\dfrac{{dv}}{{dx}}{\text{ }} \to {\text{(2)}} \\\
By substituting y = vx and equation (2) in equation (1), we get

v+xdvdx=(x2+(vx)2)(x2+x(vx)) xdvdx=(x2+v2x2)(x2+vx2)v  \Rightarrow v + x\dfrac{{dv}}{{dx}} = \dfrac{{\left( {{x^2} + {{\left( {vx} \right)}^2}} \right)}}{{\left( {{x^2} + x\left( {vx} \right)} \right)}} \\\ \Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{\left( {{x^2} + {v^2}{x^2}} \right)}}{{\left( {{x^2} + v{x^2}} \right)}} - v \\\

Now, taking x2{x^2} common from both the numerator and the denominator of the function (x2+v2x2)(x2+vx2)\dfrac{{\left( {{x^2} + {v^2}{x^2}} \right)}}{{\left( {{x^2} + v{x^2}} \right)}} in the above equation, we get
xdvdx=x2(1+v2)x2(1+v)v\Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{{x^2}\left( {1 + {v^2}} \right)}}{{{x^2}\left( {1 + v} \right)}} - v
Clearly, x2{x^2} will be cancelling out from both the numerator and denominator of the term given in the above equation.
xdvdx=1+v21+vv\Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{1 + {v^2}}}{{1 + v}} - v
By taking (1+v)\left( {1 + v} \right) as the LCM of the terms given in the RHS of the above equation, we get

xdvdx=(1+v2)v(1+v)1+v xdvdx=1+v2vv21+v xdvdx=1v1+v (1+v1v)dv=dxx  \Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{\left( {1 + {v^2}} \right) - v\left( {1 + v} \right)}}{{1 + v}} \\\ \Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{1 + {v^2} - v - {v^2}}}{{1 + v}} \\\ \Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{1 - v}}{{1 + v}} \\\ \Rightarrow \left( {\dfrac{{1 + v}}{{1 - v}}} \right)dv = \dfrac{{dx}}{x} \\\

By multiplying -1 to both the numerator and the denominator of the term given in the LHS of the above equation, we get

[1(1+v)1(1v)]dv=dxx [(1v)(1v)]dv=dxx [(1v+11)(1v)]dv=dxx [(1v)11(1v)]dv=dxx [(1v)2(1v)]dv=dxx [(1v)(1v)2(1v)]dv=dxx [12(1v)]dv=dxx [1+2(1v)]dv=dxx  \Rightarrow \left[ {\dfrac{{ - 1\left( {1 + v} \right)}}{{ - 1\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow - \left[ {\dfrac{{\left( { - 1 - v} \right)}}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow - \left[ {\dfrac{{\left( { - 1 - v + 1 - 1} \right)}}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow - \left[ {\dfrac{{\left( {1 - v} \right) - 1 - 1}}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow - \left[ {\dfrac{{\left( {1 - v} \right) - 2}}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow - \left[ {\dfrac{{\left( {1 - v} \right)}}{{\left( {1 - v} \right)}} - \dfrac{2}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow - \left[ {1 - \dfrac{2}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\ \Rightarrow \left[ { - 1 + \dfrac{2}{{\left( {1 - v} \right)}}} \right]dv = \dfrac{{dx}}{x} \\\

By integrating both the sides of the above equation, we get

(1+21v)dv=dxx (1)dv+(21v)dv=dxx dv+2dv1v=dxx v+2(ln(1v)1)=lnx+c v2ln(1v)=lnx+c (3)  \Rightarrow \int {\left( { - 1 + \dfrac{2}{{1 - v}}} \right)dv} = \int {\dfrac{{dx}}{x}} \\\ \Rightarrow \int {\left( { - 1} \right)dv} + \int {\left( {\dfrac{2}{{1 - v}}} \right)dv} = \int {\dfrac{{dx}}{x}} \\\ \Rightarrow - \int {dv} + 2\int {\dfrac{{dv}}{{1 - v}}} = \int {\dfrac{{dx}}{x}} \\\ \Rightarrow - v + 2\left( {\dfrac{{\ln \left( {1 - v} \right)}}{{ - 1}}} \right) = \ln x + c \\\ \Rightarrow - v - 2\ln \left( {1 - v} \right) = \ln x + c{\text{ }} \to {\text{(3)}} \\\

where c is any constant of integration
By substituting the value of v given by y=vxv=yxy = vx \Rightarrow v = \dfrac{y}{x} in equation (3), we get

yx2ln(1yx)=lnx+c lnx+yx+2ln(1yx)+c=0  \Rightarrow - \dfrac{y}{x} - 2\ln \left( {1 - \dfrac{y}{x}} \right) = \ln x + c \\\ \Rightarrow \ln x + \dfrac{y}{x} + 2\ln \left( {1 - \dfrac{y}{x}} \right) + c = 0 \\\

The above equation represents the solution to the given differential equation.

Note- In this particular problem, the function x2+y2x2+xy\dfrac{{{x^2} + {y^2}}}{{{x^2} + xy}} is homogeneous because here if we will put replace x by ax and y by ay, the above function becomes (ax)2+(ay)2(ax)2+(ax)(ay)=a2x2+a2y2a2x2+a2xy\dfrac{{{{\left( {ax} \right)}^2} + {{\left( {ay} \right)}^2}}}{{{{\left( {ax} \right)}^2} + \left( {ax} \right)\left( {ay} \right)}} = \dfrac{{{a^2}{x^2} + {a^2}{y^2}}}{{{a^2}{x^2} + {a^2}xy}}. Here, we will take a2{a^2} common from both the numerator and the denominator and will cancel them with each other we will get a2(x2+y2)a2(x2+xy)=x2+y2x2+xy\dfrac{{{a^2}\left( {{x^2} + {y^2}} \right)}}{{{a^2}\left( {{x^2} + xy} \right)}} = \dfrac{{{x^2} + {y^2}}}{{{x^2} + xy}} which is the same function that we considered.