2.43 problem 41

2.43.1 Solving as polynomial ode
2.43.2 Maple step by step solution

Internal problem ID [5791]
Internal file name [OUTPUT/5039_Sunday_June_05_2022_03_18_35_PM_8446703/index.tex]

Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section: Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number: 41.
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 C`], _rational, [_Abel, `2nd type`, `class A`]]

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

2.43.1 Solving as polynomial ode

This is ODE of type polynomial. Where the RHS of the ode is ratio of equations of two lines. Writing the ODE in the form \[ y^{\prime }= \frac {a_1 x + b_1 y + c_1}{ a_2 x + b_2 y + c_3 } \] Where \(a_1=3, b_1=-1, c_1 =1, a_2=2, b_2=1, c_2=4\). There are now two possible solution methods. The first case is when the two lines \(a_1 x + b_1 y + c_1\),\( a_2 x + b_2 y + c_3\) are not parallel and the second case is if they are parallel. If they are not parallel, then the transformation \(X=x-x_0\), \(Y=y-y_0\) converts the ODE to a homogeneous ODE. The values \( x_0,y_0\) have to be determined. If they are parallel then a transformation \(U(x)=a_1 x + b_1 y\) converts the given ODE in \(y\) to a separable ODE in \(U(x)\). The first case is when \(\frac {a_1}{b_1} \neq \frac {a_2}{b_2}\) and the second case when \(\frac {a_1}{b_1} = \frac {a_2}{b_2}\). From the above we see that \(\frac {a_1}{b_1}\neq \frac {a_2}{b_2}\). Hence this is case one where lines are not parallel. Using the transformation \begin {align*} X &=x-x_0 \\ Y &=y-y_0 \end {align*}

Where the constants \(x_0,y_0\) are obtained by solving the following two linear algebraic equations \begin {align*} a_1 x_0 + b_1 y_0 + c_1 &= 0\\ a_2 x_0 + b_2 y_0 + c_2 &= 0 \end {align*}

Substituting the values for \(a_1,b_1,c_1,a_2,b_2,c_2\) gives \begin {align*} 3 x_{0} -y_{0} +1 &= 0 \\ 2 x_{0} +y_{0} +4 &= 0 \\ \end {align*}

Solving for \(x_0,y_0\) from the above gives \begin {align*} x_0 &= -1 \\ y_0 &= -2 \end {align*}

Therefore the transformation becomes \begin {align*} X &=x+1 \\ Y &=y+2 \end {align*}

Using this transformation in \(y^{\prime }-\frac {3 x -y+1}{2 x +y+4} = 0\) result in \begin {align*} \frac {dY}{dX} &= \frac {3 X -Y}{2 X +Y} \end {align*}

This is now a homogeneous ODE which will now be solved for \(Y(X)\). In canonical form, the ODE is \begin {align*} Y' &= F(X,Y)\\ &= -\frac {-3 X +Y}{2 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=3 X -Y\) and \(N=2 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 +3}{u +2}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}X}} &= \frac {\frac {-u \left (X \right )+3}{u \left (X \right )+2}-u \left (X \right )}{X} \end {align*}

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

Where \(f(X)=-\frac {1}{X}\) and \(g(u)=\frac {u^{2}+3 u -3}{u +2}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {u^{2}+3 u -3}{u +2}} \,du &= -\frac {1}{X} \,d X \\ \int { \frac {1}{\frac {u^{2}+3 u -3}{u +2}} \,du} &= \int {-\frac {1}{X} \,d X} \\ \frac {\ln \left (u^{2}+3 u -3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 u +3\right ) \sqrt {21}}{21}\right )}{21}&=-\ln \left (X \right )+c_{3} \\ \end{align*} The solution is \[ \frac {\ln \left (u \left (X \right )^{2}+3 u \left (X \right )-3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 u \left (X \right )+3\right ) \sqrt {21}}{21}\right )}{21}+\ln \left (X \right )-c_{3} = 0 \] Now \(u\) in the above solution is replaced back by \(Y\) using \(u=\frac {Y}{X}\) which results in the solution \[ \frac {\ln \left (\frac {Y \left (X \right )^{2}}{X^{2}}+\frac {3 Y \left (X \right )}{X}-3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (\frac {2 Y \left (X \right )}{X}+3\right ) \sqrt {21}}{21}\right )}{21}+\ln \left (X \right )-c_{3} = 0 \] The solution is implicit \(\frac {\ln \left (\frac {Y \left (X \right )^{2}}{X^{2}}+\frac {3 Y \left (X \right )}{X}-3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 Y \left (X \right )+3 X \right ) \sqrt {21}}{21 X}\right )}{21}+\ln \left (X \right )-c_{3} = 0\). Replacing \(Y=y-y_0, X=x-x_0\) gives \[ \frac {\ln \left (\frac {\left (2+y\right )^{2}}{\left (1+x \right )^{2}}+\frac {6+3 y}{1+x}-3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 y+7+3 x \right ) \sqrt {21}}{21+21 x}\right )}{21}+\ln \left (1+x \right )-c_{3} = 0 \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} \frac {\ln \left (\frac {\left (2+y\right )^{2}}{\left (1+x \right )^{2}}+\frac {6+3 y}{1+x}-3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 y+7+3 x \right ) \sqrt {21}}{21+21 x}\right )}{21}+\ln \left (1+x \right )-c_{3} &= 0 \\ \end{align*}

Figure 84: Slope field plot

Verification of solutions

\[ \frac {\ln \left (\frac {\left (2+y\right )^{2}}{\left (1+x \right )^{2}}+\frac {6+3 y}{1+x}-3\right )}{2}-\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 y+7+3 x \right ) \sqrt {21}}{21+21 x}\right )}{21}+\ln \left (1+x \right )-c_{3} = 0 \] Verified OK.

2.43.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-\frac {3 x -y+1}{2 x +y+4}=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 {3 x -y+1}{2 x +y+4} \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 C 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful 
<- homogeneous successful`
 

Solution by Maple

Time used: 0.797 (sec). Leaf size: 67

dsolve(diff(y(x),x)=(3*x-y(x)+1)/(2*x+y(x)+4),y(x), singsol=all)
 

\[ -\frac {\ln \left (\frac {y \left (x \right )^{2}+\left (3 x +7\right ) y \left (x \right )-3 x^{2}+7}{\left (x +1\right )^{2}}\right )}{2}+\frac {\sqrt {21}\, \operatorname {arctanh}\left (\frac {\left (2 y \left (x \right )+7+3 x \right ) \sqrt {21}}{21 x +21}\right )}{21}-\ln \left (x +1\right )-c_{1} = 0 \]

Solution by Mathematica

Time used: 0.136 (sec). Leaf size: 79

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

\[ \text {Solve}\left [2 \sqrt {21} \text {arctanh}\left (\frac {-\frac {10 (x+1)}{y(x)+2 (x+2)}-1}{\sqrt {21}}\right )+21 \left (\log \left (-\frac {-3 x^2+y(x)^2+(3 x+7) y(x)+7}{5 (x+1)^2}\right )+2 \log (x+1)-10 c_1\right )=0,y(x)\right ] \]