Solveeit Logo

Question

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

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

Explanation

Solution

First find the expression for dydx\dfrac{{dy}}{{dx}} in terms of xx and yy. This will give us a homogeneous equation. Then substitute y=vxy = vx. Find the value of dydx\dfrac{{dy}}{{dx}} and put it in the above equation. Then solve the resulting differential equation using a variable separation method and put back the value of vv to get the answer.

Complete step-by-step solution:
According to the question, we have to solve the differential equation (x2+xy)dy=(x2+y2)dx\left( {{x^2} + xy} \right)dy = \left( {{x^2} + {y^2}} \right)dx.
If we find the expression for dydx\dfrac{{dy}}{{dx}} in terms of xx and yy by cross multiplication, we’ll get:
dydx=x2+y2x2+xy .....(1)\Rightarrow \dfrac{{dy}}{{dx}} = \dfrac{{{x^2} + {y^2}}}{{{x^2} + xy}}{\text{ }}.....{\text{(1)}}
This is a homogeneous equation on the right hand side as the degree of all the terms in the equation is the same i.e. 2. So we’ll substitute y=vxy = vx in the equation. We have:
y=vx .....(2)\Rightarrow y = vx{\text{ }}.....{\text{(2)}}
Differentiating it both sides, we’ll get:
dydx=xdvdx+v\Rightarrow \dfrac{{dy}}{{dx}} = x\dfrac{{dv}}{{dx}} + v
Putting these values in equation (1), we’ll get:
xdvdx+v=x2+(vx)2x2+xvx xdvdx+v=x2+v2x2x2+vx2 xdvdx+v=1+v21+v \Rightarrow x\dfrac{{dv}}{{dx}} + v = \dfrac{{{x^2} + {{\left( {vx} \right)}^2}}}{{{x^2} + xvx}} \\\ \Rightarrow x\dfrac{{dv}}{{dx}} + v = \dfrac{{{x^2} + {v^2}{x^2}}}{{{x^2} + v{x^2}}} \\\ \Rightarrow x\dfrac{{dv}}{{dx}} + v = \dfrac{{1 + {v^2}}}{{1 + v}}
On further simplification, this will give us:
xdvdx=1+v21+vv xdvdx=1+v2vv21+v xdvdx=1v1+v \Rightarrow x\dfrac{{dv}}{{dx}} = \dfrac{{1 + {v^2}}}{{1 + v}} - 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}}
Now we will cross multiply for variable separation, we’ll get:
1+v1vdv=dxx\Rightarrow \dfrac{{1 + v}}{{1 - v}}dv = \dfrac{{dx}}{x}
This can also be written as:
v+1v1dv=dxx\Rightarrow \dfrac{{v + 1}}{{v - 1}}dv = - \dfrac{{dx}}{x}
Integrating both sides, we’ll get:
v+1v1dv=dxx\Rightarrow \int {\dfrac{{v + 1}}{{v - 1}}dv} = - \int {\dfrac{{dx}}{x}}
Left hand side can be simplified as:
v1+2v1dv=dxx v1v1dv+2dvv1=dxx dv+2dvv1=dxx \Rightarrow \int {\dfrac{{v - 1 + 2}}{{v - 1}}dv} = - \int {\dfrac{{dx}}{x}} \\\ \Rightarrow \int {\dfrac{{v - 1}}{{v - 1}}dv + 2\int {\dfrac{{dv}}{{v - 1}}} } = - \int {\dfrac{{dx}}{x}} \\\ \Rightarrow \int {dv + 2\int {\dfrac{{dv}}{{v - 1}}} } = - \int {\dfrac{{dx}}{x}}
We know that the integration of 1x\dfrac{1}{x} with respect to xx is lnx\ln \left| x \right|.
dxx=lnx\Rightarrow \int {\dfrac{{dx}}{x}} = \ln \left| x \right|
Similarly the integration of 1v1\dfrac{1}{{v - 1}} with respect to vv is lnv1\ln \left| {v - 1} \right|.
dvv1=lnv1\Rightarrow \int {\dfrac{{dv}}{{v - 1}}} = \ln \left| {v - 1} \right|
Using these results in our integration, we’ll get:
v+2lnv1=lnx+lnC\Rightarrow v + 2\ln \left| {v - 1} \right| = - \ln \left| x \right| + \ln C, where lnC\ln C is the integration constant.
We have taken a logarithmic constant just to adjust our equation as we are getting other terms in logarithms also.
v+2lnv1=lnClnx\Rightarrow v + 2\ln \left| {v - 1} \right| = \ln C - \ln \left| x \right|
Now, we will use few properties of logarithm as shown below:
alnb=lnba lnmlnn=lnmn \Rightarrow a\ln b = \ln {b^a} \\\ \Rightarrow \ln m - \ln n = \ln \dfrac{m}{n}
Using these properties in our equation, we’ll get:
v+lnv12=lnCx ln(v1)2lnCx=v \Rightarrow v + \ln {\left| {v - 1} \right|^2} = \ln \dfrac{C}{x} \\\ \Rightarrow \ln {\left( {v - 1} \right)^2} - \ln \dfrac{C}{x} = - v
Again using property of logarithm, we will get:
ln((v1)2Cx)=v ln(x(v1)2C)=v \Rightarrow \ln \left( {\dfrac{{{{\left( {v - 1} \right)}^2}}}{{\dfrac{C}{x}}}} \right) = - v \\\ \Rightarrow \ln \left( {\dfrac{{x{{\left( {v - 1} \right)}^2}}}{C}} \right) = - v
Putting back v=yxv = \dfrac{y}{x} from equation (2), we’ll get:
ln(x(yx1)2C)=yx ln(x(yx)2x2C)=yx ln(yx)2Cx=yx \Rightarrow \ln \left( {\dfrac{{x{{\left( {\dfrac{y}{x} - 1} \right)}^2}}}{C}} \right) = - \dfrac{y}{x} \\\ \Rightarrow \ln \left( {\dfrac{{x\dfrac{{{{\left( {y - x} \right)}^2}}}{{{x^2}}}}}{C}} \right) = - \dfrac{y}{x} \\\ \Rightarrow \ln \dfrac{{{{\left( {y - x} \right)}^2}}}{{Cx}} = - \dfrac{y}{x}
Taking anti logarithm both sides, we’ll get:
(yx)2Cx=eyx (yx)2=Cxeyx \Rightarrow \dfrac{{{{\left( {y - x} \right)}^2}}}{{Cx}} = {e^{ - \dfrac{y}{x}}} \\\ \Rightarrow {\left( {y - x} \right)^2} = Cx{e^{ - \dfrac{y}{x}}}

(yx)2=Cxeyx{\left( {y - x} \right)^2} = Cx{e^{ - \dfrac{y}{x}}} is the final solution of the differential equation.

Note: When the degree of all the terms in a polynomial equation is the same then those equations are called homogeneous equations. And if we have to solve the differential equation containing homogeneous equations then we substitute y=vxy = vx and proceed as we did above.
If we can separate the two variables of the differential equation on either side of the equation then we can solve it using the variable separation method also. This we have done in the step just before integration in the above problem separating vv and xx on either side of the equation.