4.16 problem Problem 25

4.16.1 Existence and uniqueness analysis
4.16.2 Solving as homogeneous ode
4.16.3 Maple step by step solution

Internal problem ID [2680]
Internal file name [OUTPUT/2172_Sunday_June_05_2022_02_51_43_AM_66279645/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 25.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "homogeneousTypeD2", "first_order_ode_lie_symmetry_calculated"

Maple gives the following as the ode type

[[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\[ \boxed {y^{\prime }-\frac {2 \left (2 y-x \right )}{y+x}=0} \] With initial conditions \begin {align*} [y \left (0\right ) = 2] \end {align*}

4.16.1 Existence and uniqueness analysis

This is non linear first order ODE. In canonical form it is written as \begin {align*} y^{\prime } &= f(x,y)\\ &= \frac {4 y -2 x}{x +y} \end {align*}

The \(x\) domain of \(f(x,y)\) when \(y=2\) is \[ \{x <-2\boldsymbol {\lor }-2

The \(x\) domain of \(\frac {\partial f}{\partial y}\) when \(y=2\) is \[ \{x <-2\boldsymbol {\lor }-2

4.16.2 Solving as homogeneous ode

In canonical form, the ODE is \begin {align*} y' &= F(x,y)\\ &= \frac {4 y -2 x}{x +y}\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=4 y -2 x\) and \(N=x +y\) are both homogeneous and of the same order \(n=1\). 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 {4 u -2}{u +1}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {\frac {4 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 {4 u \left (x \right )-2}{u \left (x \right )+1}-u \left (x \right )}{x} = 0 \] Or \[ u^{\prime }\left (x \right ) x u \left (x \right )+u^{\prime }\left (x \right ) x +u \left (x \right )^{2}-3 u \left (x \right )+2 = 0 \] Or \[ x \left (u \left (x \right )+1\right ) u^{\prime }\left (x \right )+u \left (x \right )^{2}-3 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^{2}-3 u +2}{x \left (u +1\right )} \end {align*}

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

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

The solution is \[ \frac {\left (u \left (x \right )-2\right )^{3}}{\left (u \left (x \right )-1\right )^{2}} = \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 )^{3}}{\left (\frac {y}{x}-1\right )^{2}} = \frac {c_{3}}{x} \] Which simplifies to \begin {align*} -\frac {\left (2 x -y\right )^{3}}{\left (x -y\right )^{2}} = c_{3} \end {align*}

Substituting initial conditions and solving for \(c_{3}\) gives \(c_{3} = 2\). Hence the solution becomes

Summary

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

Verification of solutions

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

4.16.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }-\frac {2 \left (2 y-x \right )}{y+x}=0, y \left (0\right )=2\right ] \\ \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 {2 \left (2 y-x \right )}{y+x} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=2 \\ {} & {} & 0 \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} 0 \\ {} & {} & 0=0 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} 0=0\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & 0 \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & 0 \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.657 (sec). Leaf size: 273

dsolve([diff(y(x),x)=2*(2*y(x)-x)/(x+y(x)),y(0) = 2],y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\left (3 \sqrt {3}\, x \sqrt {x \left (27 x +8\right )}+27 x^{2}+36 x +8\right )^{\frac {1}{3}}}{3}+\frac {4 x +\frac {4}{3}}{\left (3 \sqrt {3}\, x \sqrt {x \left (27 x +8\right )}+27 x^{2}+36 x +8\right )^{\frac {1}{3}}}+2 x +\frac {2}{3} \]

Solution by Mathematica

Time used: 60.289 (sec). Leaf size: 121

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

\[ y(x)\to \frac {1}{3} \left (x \left (\frac {12}{\sqrt [3]{3 \sqrt {3} \sqrt {x^3 (27 x+8)}+27 x^2+36 x+8}}+6\right )+\sqrt [3]{3 \sqrt {3} \sqrt {x^3 (27 x+8)}+27 x^2+36 x+8}+\frac {4}{\sqrt [3]{3 \sqrt {3} \sqrt {x^3 (27 x+8)}+27 x^2+36 x+8}}+2\right ) \]