5.6 problem 1(f)

5.6.1 Solving as homogeneous ode
5.6.2 Maple step by step solution

Internal problem ID [6208]
Internal file name [OUTPUT/5456_Sunday_June_05_2022_03_39_10_PM_3528254/index.tex]

Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 1. What is a differential equation. Section 1.7. Homogeneous Equations. Page 28
Problem number: 1(f).
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`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

\[ \boxed {-y-\left (x +y\right ) y^{\prime }=-x} \]

5.6.1 Solving as homogeneous ode

In canonical form, the ODE is \begin {align*} y' &= F(x,y)\\ &= -\frac {-x +y}{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=x -y\) 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 {-u +1}{u +1}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {\frac {-u \left (x \right )+1}{u \left (x \right )+1}-u \left (x \right )}{x} \end {align*}

Or \[ u^{\prime }\left (x \right )-\frac {\frac {-u \left (x \right )+1}{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}+2 u \left (x \right )-1 = 0 \] Or \[ x \left (u \left (x \right )+1\right ) u^{\prime }\left (x \right )+u \left (x \right )^{2}+2 u \left (x \right )-1 = 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}+2 u -1}{x \left (u +1\right )} \end {align*}

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

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

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

Summary

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

Figure 138: Slope field plot

Verification of solutions

\[ \sqrt {\frac {y^{2}+2 y x -x^{2}}{x^{2}}} = \frac {c_{3} {\mathrm e}^{c_{2}}}{x} \] Verified OK.

5.6.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & -y-\left (x +y\right ) y^{\prime }=-x \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \square & {} & \textrm {Check if ODE is exact}\hspace {3pt} \\ {} & \circ & \textrm {ODE is exact if the lhs is the total derivative of a}\hspace {3pt} C^{2}\hspace {3pt}\textrm {function}\hspace {3pt} \\ {} & {} & F^{\prime }\left (x , y\right )=0 \\ {} & \circ & \textrm {Compute derivative of lhs}\hspace {3pt} \\ {} & {} & F^{\prime }\left (x , y\right )+\left (\frac {\partial }{\partial y}F \left (x , y\right )\right ) y^{\prime }=0 \\ {} & \circ & \textrm {Evaluate derivatives}\hspace {3pt} \\ {} & {} & -1=-1 \\ {} & \circ & \textrm {Condition met, ODE is exact}\hspace {3pt} \\ \bullet & {} & \textrm {Exact ODE implies solution will be of this form}\hspace {3pt} \\ {} & {} & \left [F \left (x , y\right )=c_{1} , M \left (x , y\right )=F^{\prime }\left (x , y\right ), N \left (x , y\right )=\frac {\partial }{\partial y}F \left (x , y\right )\right ] \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} F \left (x , y\right )\hspace {3pt}\textrm {by integrating}\hspace {3pt} M \left (x , y\right )\hspace {3pt}\textrm {with respect to}\hspace {3pt} x \\ {} & {} & F \left (x , y\right )=\int \left (x -y \right )d x +f_{1} \left (y \right ) \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & F \left (x , y\right )=\frac {x^{2}}{2}-x y +f_{1} \left (y \right ) \\ \bullet & {} & \textrm {Take derivative of}\hspace {3pt} F \left (x , y\right )\hspace {3pt}\textrm {with respect to}\hspace {3pt} y \\ {} & {} & N \left (x , y\right )=\frac {\partial }{\partial y}F \left (x , y\right ) \\ \bullet & {} & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & -x -y =-x +\frac {d}{d y}f_{1} \left (y \right ) \\ \bullet & {} & \textrm {Isolate for}\hspace {3pt} \frac {d}{d y}f_{1} \left (y \right ) \\ {} & {} & \frac {d}{d y}f_{1} \left (y \right )=-y \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} f_{1} \left (y \right ) \\ {} & {} & f_{1} \left (y \right )=-\frac {y^{2}}{2} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} f_{1} \left (y \right )\hspace {3pt}\textrm {into equation for}\hspace {3pt} F \left (x , y\right ) \\ {} & {} & F \left (x , y\right )=\frac {1}{2} x^{2}-x y -\frac {1}{2} y^{2} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} F \left (x , y\right )\hspace {3pt}\textrm {into the solution of the ODE}\hspace {3pt} \\ {} & {} & \frac {1}{2} x^{2}-x y -\frac {1}{2} y^{2}=c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & \left \{y=-x -\sqrt {2 x^{2}-2 c_{1}}, y=-x +\sqrt {2 x^{2}-2 c_{1}}\right \} \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.062 (sec). Leaf size: 51

dsolve((x-y(x))-(x+y(x))*diff(y(x),x)=0,y(x), singsol=all)
 

\begin{align*} y \left (x \right ) &= \frac {-c_{1} x -\sqrt {2 x^{2} c_{1}^{2}+1}}{c_{1}} \\ y \left (x \right ) &= \frac {-c_{1} x +\sqrt {2 x^{2} c_{1}^{2}+1}}{c_{1}} \\ \end{align*}

Solution by Mathematica

Time used: 0.493 (sec). Leaf size: 94

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

\begin{align*} y(x)\to -x-\sqrt {2 x^2+e^{2 c_1}} \\ y(x)\to -x+\sqrt {2 x^2+e^{2 c_1}} \\ y(x)\to -\sqrt {2} \sqrt {x^2}-x \\ y(x)\to \sqrt {2} \sqrt {x^2}-x \\ \end{align*}