4.9 problem Problem 17

4.9.1 Solving as homogeneous ode
4.9.2 Maple step by step solution

Internal problem ID [2673]
Internal file name [OUTPUT/2165_Sunday_June_05_2022_02_51_16_AM_34878343/index.tex]

Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section: Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number: Problem 17.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program :

Maple gives the following as the ode type

[[_homogeneous, `class A`], _rational, _dAlembert]

\[ \boxed {y^{\prime }-\frac {y^{2}+2 y x -2 x^{2}}{x^{2}-y x +y^{2}}=0} \]

4.9.1 Solving as homogeneous ode

In canonical form, the ODE is \begin {align*} y' &= F(x,y)\\ &= \frac {-2 x^{2}+2 y x +y^{2}}{x^{2}-y x +y^{2}}\tag {1} \end {align*}

An ode of the form \(y' = \frac {M(x,y)}{N(x,y)}\) is called homogeneous if the functions \(M(x,y)\) and \(N(x,y)\) are both homogeneous functions and of the same order. Recall that a function \(f(x,y)\) is homogeneous of order \(n\) if \[ f(t^n x, t^n y)= t^n f(x,y) \] In this case, it can be seen that both \(M=-2 x^{2}+2 y x +y^{2}\) and \(N=x^{2}-y x +y^{2}\) are both homogeneous and of the same order \(n=2\). Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution \(u=\frac {y}{x}\), or \(y=ux\). Hence \[ \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u \] Applying the transformation \(y=ux\) to the above ODE in (1) gives \begin {align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u &= \frac {u^{2}+2 u -2}{u^{2}-u +1}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {\frac {u \left (x \right )^{2}+2 u \left (x \right )-2}{u \left (x \right )^{2}-u \left (x \right )+1}-u \left (x \right )}{x} \end {align*}

Or \[ u^{\prime }\left (x \right )-\frac {\frac {u \left (x \right )^{2}+2 u \left (x \right )-2}{u \left (x \right )^{2}-u \left (x \right )+1}-u \left (x \right )}{x} = 0 \] Or \[ u^{\prime }\left (x \right ) u \left (x \right )^{2} x -u^{\prime }\left (x \right ) u \left (x \right ) x +u \left (x \right )^{3}+u^{\prime }\left (x \right ) x -2 u \left (x \right )^{2}-u \left (x \right )+2 = 0 \] Or \[ x \left (u \left (x \right )^{2}-u \left (x \right )+1\right ) u^{\prime }\left (x \right )+u \left (x \right )^{3}-2 u \left (x \right )^{2}-u \left (x \right )+2 = 0 \] Which is now solved as separable in \(u \left (x \right )\). Which is now solved in \(u \left (x \right )\). In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= -\frac {u^{3}-2 u^{2}-u +2}{x \left (u^{2}-u +1\right )} \end {align*}

Where \(f(x)=-\frac {1}{x}\) and \(g(u)=\frac {u^{3}-2 u^{2}-u +2}{u^{2}-u +1}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {u^{3}-2 u^{2}-u +2}{u^{2}-u +1}} \,du &= -\frac {1}{x} \,d x \\ \int { \frac {1}{\frac {u^{3}-2 u^{2}-u +2}{u^{2}-u +1}} \,du} &= \int {-\frac {1}{x} \,d x} \\ \ln \left (u -2\right )+\frac {\ln \left (u +1\right )}{2}-\frac {\ln \left (u -1\right )}{2}&=-\ln \left (x \right )+c_{2} \\ \end{align*} Raising both side to exponential gives \begin {align*} {\mathrm e}^{\ln \left (u -2\right )+\frac {\ln \left (u +1\right )}{2}-\frac {\ln \left (u -1\right )}{2}} &= {\mathrm e}^{-\ln \left (x \right )+c_{2}} \end {align*}

Which simplifies to \begin {align*} \frac {\left (u -2\right ) \sqrt {u +1}}{\sqrt {u -1}} &= \frac {c_{3}}{x} \end {align*}

The solution is \[ \frac {\left (u \left (x \right )-2\right ) \sqrt {u \left (x \right )+1}}{\sqrt {u \left (x \right )-1}} = \frac {c_{3}}{x} \] Now \(u\) in the above solution is replaced back by \(y\) using \(u=\frac {y}{x}\) which results in the solution \[ \frac {\left (\frac {y}{x}-2\right ) \sqrt {\frac {y}{x}+1}}{\sqrt {\frac {y}{x}-1}} = \frac {c_{3}}{x} \] Which simplifies to \begin {align*} \frac {\left (y-2 x \right ) \sqrt {\frac {y+x}{x}}}{\sqrt {\frac {y-x}{x}}} = c_{3} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} \frac {\left (y-2 x \right ) \sqrt {\frac {y+x}{x}}}{\sqrt {\frac {y-x}{x}}} &= c_{3} \\ \end{align*}

Figure 93: Slope field plot

Verification of solutions

\[ \frac {\left (y-2 x \right ) \sqrt {\frac {y+x}{x}}}{\sqrt {\frac {y-x}{x}}} = c_{3} \] Verified OK.

4.9.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-\frac {y^{2}+2 y x -2 x^{2}}{x^{2}-y x +y^{2}}=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {y^{2}+2 y x -2 x^{2}}{x^{2}-y x +y^{2}} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful`
 

Solution by Maple

Time used: 0.016 (sec). Leaf size: 80

dsolve(diff(y(x),x)=(y(x)^2+2*x*y(x)-2*x^2)/(x^2-x*y(x)+y(x)^2),y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {x \left (-\operatorname {RootOf}\left (2 \textit {\_Z}^{6}+\left (9 c_{1} x^{2}-1\right ) \textit {\_Z}^{4}-6 x^{2} c_{1} \textit {\_Z}^{2}+c_{1} x^{2}\right )^{2}+1\right )}{\operatorname {RootOf}\left (2 \textit {\_Z}^{6}+\left (9 c_{1} x^{2}-1\right ) \textit {\_Z}^{4}-6 x^{2} c_{1} \textit {\_Z}^{2}+c_{1} x^{2}\right )^{2}} \]

Solution by Mathematica

Time used: 60.187 (sec). Leaf size: 373

DSolve[y'[x]==(y[x]^2+2*x*y[x]-2*x^2)/(x^2-x*y[x]+y[x]^2),y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {\sqrt [3]{-54 x^3+2 \sqrt {729 x^6+\left (-9 x^2+3 e^{2 c_1}\right ){}^3}}}{3 \sqrt [3]{2}}-\frac {\sqrt [3]{2} \left (-3 x^2+e^{2 c_1}\right )}{\sqrt [3]{-54 x^3+2 \sqrt {729 x^6+\left (-9 x^2+3 e^{2 c_1}\right ){}^3}}}+x \\ y(x)\to \frac {\left (-1+i \sqrt {3}\right ) \sqrt [3]{-54 x^3+2 \sqrt {729 x^6+\left (-9 x^2+3 e^{2 c_1}\right ){}^3}}}{6 \sqrt [3]{2}}+\frac {\left (1+i \sqrt {3}\right ) \left (-3 x^2+e^{2 c_1}\right )}{2^{2/3} \sqrt [3]{-54 x^3+2 \sqrt {729 x^6+\left (-9 x^2+3 e^{2 c_1}\right ){}^3}}}+x \\ y(x)\to -\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{-54 x^3+2 \sqrt {729 x^6+\left (-9 x^2+3 e^{2 c_1}\right ){}^3}}}{6 \sqrt [3]{2}}+\frac {\left (1-i \sqrt {3}\right ) \left (-3 x^2+e^{2 c_1}\right )}{2^{2/3} \sqrt [3]{-54 x^3+2 \sqrt {729 x^6+\left (-9 x^2+3 e^{2 c_1}\right ){}^3}}}+x \\ \end{align*}