18.22 problem 498

18.22.1 Solving as homogeneousTypeMapleC ode
18.22.2 Solving as first order ode lie symmetry calculated ode
18.22.3 Maple step by step solution

Internal problem ID [3752]
Internal file name [OUTPUT/3245_Sunday_June_05_2022_09_03_01_AM_24497102/index.tex]

Book: Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section: Various 18
Problem number: 498.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

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

\[ \boxed {\left (3+9 x +21 y\right ) y^{\prime }+5 y=45+7 x} \]

18.22.1 Solving as homogeneousTypeMapleC ode

Let \(Y = y +y_{0}\) and \(X = x +x_{0}\) then the above is transformed to new ode in \(Y(X)\) \begin {align*} \frac {d}{d X}Y \left (X \right ) = -\frac {5 Y \left (X \right )+5 y_{0} -7 x_{0} -7 X -45}{3 \left (1+3 x_{0} +3 X +7 Y \left (X \right )+7 y_{0} \right )} \end {align*}

Solving for possible values of \(x_{0}\) and \(y_{0}\) which makes the above ode a homogeneous ode results in \begin {align*} x_{0}&=-5\\ y_{0}&=2 \end {align*}

Using these values now it is possible to easily solve for \(Y \left (X \right )\). The above ode now becomes \begin {align*} \frac {d}{d X}Y \left (X \right ) = -\frac {5 Y \left (X \right )-7 X}{3 \left (3 X +7 Y \left (X \right )\right )} \end {align*}

In canonical form, the ODE is \begin {align*} Y' &= F(X,Y)\\ &= -\frac {5 Y -7 X}{3 \left (3 X +7 Y \right )}\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=-5 Y +7 X\) and \(N=9 X +21 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 {-5 u +7}{21 u +9}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}X}} &= \frac {\frac {-5 u \left (X \right )+7}{21 u \left (X \right )+9}-u \left (X \right )}{X} \end {align*}

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

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

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

Now \(u\) in the above solution is replaced back by \(Y\) using \(u=\frac {Y}{X}\) which results in the solution \[ Y \left (X \right ) = X \left (\frac {\operatorname {RootOf}\left (3^{\frac {2}{3}} \textit {\_Z}^{7} X^{\frac {7}{3}}+4 \,3^{\frac {2}{3}} \textit {\_Z}^{4} X^{\frac {7}{3}}-27 c_{3} \right )^{3}}{3}+\frac {1}{3}\right ) \] Using the solution for \(Y(X)\) \begin {align*} Y \left (X \right ) = X \left (\frac {\operatorname {RootOf}\left (3^{\frac {2}{3}} \textit {\_Z}^{7} X^{\frac {7}{3}}+4 \,3^{\frac {2}{3}} \textit {\_Z}^{4} X^{\frac {7}{3}}-27 c_{3} \right )^{3}}{3}+\frac {1}{3}\right ) \end {align*}

And replacing back terms in the above solution using \begin {align*} Y &= y +y_{0}\\ X &= x +x_{0} \end {align*}

Or \begin {align*} Y &= y +2\\ X &= x -5 \end {align*}

Then the solution in \(y\) becomes \begin {align*} y-2 = \left (5+x \right ) \left (\frac {\operatorname {RootOf}\left (3^{\frac {2}{3}} \textit {\_Z}^{7} \left (5+x \right )^{\frac {7}{3}}+4 \,3^{\frac {2}{3}} \textit {\_Z}^{4} \left (5+x \right )^{\frac {7}{3}}-27 c_{3} \right )^{3}}{3}+\frac {1}{3}\right ) \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y-2 &= \left (5+x \right ) \left (\frac {\operatorname {RootOf}\left (3^{\frac {2}{3}} \textit {\_Z}^{7} \left (5+x \right )^{\frac {7}{3}}+4 \,3^{\frac {2}{3}} \textit {\_Z}^{4} \left (5+x \right )^{\frac {7}{3}}-27 c_{3} \right )^{3}}{3}+\frac {1}{3}\right ) \\ \end{align*}

Figure 786: Slope field plot

Verification of solutions

\[ y-2 = \left (5+x \right ) \left (\frac {\operatorname {RootOf}\left (3^{\frac {2}{3}} \textit {\_Z}^{7} \left (5+x \right )^{\frac {7}{3}}+4 \,3^{\frac {2}{3}} \textit {\_Z}^{4} \left (5+x \right )^{\frac {7}{3}}-27 c_{3} \right )^{3}}{3}+\frac {1}{3}\right ) \] Verified OK.

18.22.2 Solving as first order ode lie symmetry calculated ode

Writing the ode as \begin {align*} y^{\prime }&=-\frac {-45-7 x +5 y}{3 \left (1+3 x +7 y \right )}\\ y^{\prime }&= \omega \left ( x,y\right ) \end {align*}

The condition of Lie symmetry is the linearized PDE given by \begin {align*} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta =0\tag {A} \end {align*}

The type of this ode is not in the lookup table. To determine \(\xi ,\eta \) then (A) is solved using ansatz. Making bivariate polynomials of degree 1 to use as anstaz gives \begin{align*} \tag{1E} \xi &= x a_{2}+y a_{3}+a_{1} \\ \tag{2E} \eta &= x b_{2}+y b_{3}+b_{1} \\ \end{align*} Where the unknown coefficients are \[ \{a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}\} \] Substituting equations (1E,2E) and \(\omega \) into (A) gives \begin{equation} \tag{5E} b_{2}-\frac {\left (-45-7 x +5 y \right ) \left (b_{3}-a_{2}\right )}{3 \left (1+3 x +7 y \right )}-\frac {\left (-45-7 x +5 y \right )^{2} a_{3}}{9 \left (1+3 x +7 y \right )^{2}}-\left (\frac {7}{3 \left (1+3 x +7 y \right )}+\frac {-45-7 x +5 y}{\left (1+3 x +7 y \right )^{2}}\right ) \left (x a_{2}+y a_{3}+a_{1}\right )-\left (-\frac {5}{3 \left (1+3 x +7 y \right )}+\frac {-105-\frac {49 x}{3}+\frac {35 y}{3}}{\left (1+3 x +7 y \right )^{2}}\right ) \left (x b_{2}+y b_{3}+b_{1}\right ) = 0 \end{equation} Putting the above in normal form gives \[ -\frac {63 x^{2} a_{2}+49 x^{2} a_{3}-273 x^{2} b_{2}-63 x^{2} b_{3}+294 x y a_{2}-70 x y a_{3}-378 x y b_{2}-294 x y b_{3}-105 y^{2} a_{2}+217 y^{2} a_{3}-441 y^{2} b_{2}+105 y^{2} b_{3}+42 x a_{2}+630 x a_{3}-192 x b_{1}-1014 x b_{2}-426 x b_{3}+192 y a_{1}+930 y a_{2}-834 y a_{3}-126 y b_{2}-1890 y b_{3}-384 a_{1}+135 a_{2}+2025 a_{3}-960 b_{1}-9 b_{2}-135 b_{3}}{9 \left (1+3 x +7 y \right )^{2}} = 0 \] Setting the numerator to zero gives \begin{equation} \tag{6E} -63 x^{2} a_{2}-49 x^{2} a_{3}+273 x^{2} b_{2}+63 x^{2} b_{3}-294 x y a_{2}+70 x y a_{3}+378 x y b_{2}+294 x y b_{3}+105 y^{2} a_{2}-217 y^{2} a_{3}+441 y^{2} b_{2}-105 y^{2} b_{3}-42 x a_{2}-630 x a_{3}+192 x b_{1}+1014 x b_{2}+426 x b_{3}-192 y a_{1}-930 y a_{2}+834 y a_{3}+126 y b_{2}+1890 y b_{3}+384 a_{1}-135 a_{2}-2025 a_{3}+960 b_{1}+9 b_{2}+135 b_{3} = 0 \end{equation} Looking at the above PDE shows the following are all the terms with \(\{x, y\}\) in them. \[ \{x, y\} \] The following substitution is now made to be able to collect on all terms with \(\{x, y\}\) in them \[ \{x = v_{1}, y = v_{2}\} \] The above PDE (6E) now becomes \begin{equation} \tag{7E} -63 a_{2} v_{1}^{2}-294 a_{2} v_{1} v_{2}+105 a_{2} v_{2}^{2}-49 a_{3} v_{1}^{2}+70 a_{3} v_{1} v_{2}-217 a_{3} v_{2}^{2}+273 b_{2} v_{1}^{2}+378 b_{2} v_{1} v_{2}+441 b_{2} v_{2}^{2}+63 b_{3} v_{1}^{2}+294 b_{3} v_{1} v_{2}-105 b_{3} v_{2}^{2}-192 a_{1} v_{2}-42 a_{2} v_{1}-930 a_{2} v_{2}-630 a_{3} v_{1}+834 a_{3} v_{2}+192 b_{1} v_{1}+1014 b_{2} v_{1}+126 b_{2} v_{2}+426 b_{3} v_{1}+1890 b_{3} v_{2}+384 a_{1}-135 a_{2}-2025 a_{3}+960 b_{1}+9 b_{2}+135 b_{3} = 0 \end{equation} Collecting the above on the terms \(v_i\) introduced, and these are \[ \{v_{1}, v_{2}\} \] Equation (7E) now becomes \begin{equation} \tag{8E} \left (-63 a_{2}-49 a_{3}+273 b_{2}+63 b_{3}\right ) v_{1}^{2}+\left (-294 a_{2}+70 a_{3}+378 b_{2}+294 b_{3}\right ) v_{1} v_{2}+\left (-42 a_{2}-630 a_{3}+192 b_{1}+1014 b_{2}+426 b_{3}\right ) v_{1}+\left (105 a_{2}-217 a_{3}+441 b_{2}-105 b_{3}\right ) v_{2}^{2}+\left (-192 a_{1}-930 a_{2}+834 a_{3}+126 b_{2}+1890 b_{3}\right ) v_{2}+384 a_{1}-135 a_{2}-2025 a_{3}+960 b_{1}+9 b_{2}+135 b_{3} = 0 \end{equation} Setting each coefficients in (8E) to zero gives the following equations to solve \begin {align*} -294 a_{2}+70 a_{3}+378 b_{2}+294 b_{3}&=0\\ -63 a_{2}-49 a_{3}+273 b_{2}+63 b_{3}&=0\\ 105 a_{2}-217 a_{3}+441 b_{2}-105 b_{3}&=0\\ -192 a_{1}-930 a_{2}+834 a_{3}+126 b_{2}+1890 b_{3}&=0\\ -42 a_{2}-630 a_{3}+192 b_{1}+1014 b_{2}+426 b_{3}&=0\\ 384 a_{1}-135 a_{2}-2025 a_{3}+960 b_{1}+9 b_{2}+135 b_{3}&=0 \end {align*}

Solving the above equations for the unknowns gives \begin {align*} a_{1}&=4 b_{2}+5 b_{3}\\ a_{2}&=2 b_{2}+b_{3}\\ a_{3}&=3 b_{2}\\ b_{1}&=5 b_{2}-2 b_{3}\\ b_{2}&=b_{2}\\ b_{3}&=b_{3} \end {align*}

Substituting the above solution in the anstaz (1E,2E) (using \(1\) as arbitrary value for any unknown in the RHS) gives \begin{align*} \xi &= 5+x \\ \eta &= -2+y \\ \end{align*} Shifting is now applied to make \(\xi =0\) in order to simplify the rest of the computation \begin {align*} \eta &= \eta - \omega \left (x,y\right ) \xi \\ &= -2+y - \left (-\frac {-45-7 x +5 y}{3 \left (1+3 x +7 y \right )}\right ) \left (5+x\right ) \\ &= \frac {-7 x^{2}+14 x y +21 y^{2}-98 x -14 y -231}{3+9 x +21 y}\\ \xi &= 0 \end {align*}

The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( x,y\right ) \to \left ( R,S \right )\) where \(\left ( R,S \right )\) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is \begin {align*} \frac {d x}{\xi } &= \frac {d y}{\eta } = dS \tag {1} \end {align*}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial y}\right ) S(x,y) = 1\). Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable \(R\) in the canonical coordinates, where \(S(R)\). Since \(\xi =0\) then in this special case \begin {align*} R = x \end {align*}

\(S\) is found from \begin {align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{\frac {-7 x^{2}+14 x y +21 y^{2}-98 x -14 y -231}{3+9 x +21 y}}} dy \end {align*}

Which results in \begin {align*} S&= \frac {4 \ln \left (3 y -x -11\right )}{7}+\frac {3 \ln \left (x +y +3\right )}{7} \end {align*}

Now that \(R,S\) are found, we need to setup the ode in these coordinates. This is done by evaluating \begin {align*} \frac {dS}{dR} &= \frac { S_{x} + \omega (x,y) S_{y} }{ R_{x} + \omega (x,y) R_{y} }\tag {2} \end {align*}

Where in the above \(R_{x},R_{y},S_{x},S_{y}\) are all partial derivatives and \(\omega (x,y)\) is the right hand side of the original ode given by \begin {align*} \omega (x,y) &= -\frac {-45-7 x +5 y}{3 \left (1+3 x +7 y \right )} \end {align*}

Evaluating all the partial derivatives gives \begin {align*} R_{x} &= 1\\ R_{y} &= 0\\ S_{x} &= \frac {45+7 x -5 y}{7 \left (x +y +3\right ) \left (x -3 y +11\right )}\\ S_{y} &= \frac {-\frac {9 x}{7}-3 y -\frac {3}{7}}{\left (x +y +3\right ) \left (x -3 y +11\right )} \end {align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates. \begin {align*} \frac {dS}{dR} &= 0\tag {2A} \end {align*}

We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,y\) in terms of \(R,S\) from the result obtained earlier and simplifying. This gives \begin {align*} \frac {dS}{dR} &= 0 \end {align*}

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates \(R,S\). Integrating the above gives \begin {align*} S \left (R \right ) = c_{1}\tag {4} \end {align*}

To complete the solution, we just need to transform (4) back to \(x,y\) coordinates. This results in \begin {align*} \frac {4 \ln \left (3 y-x -11\right )}{7}+\frac {3 \ln \left (3+x +y\right )}{7} = c_{1} \end {align*}

Which simplifies to \begin {align*} \frac {4 \ln \left (3 y-x -11\right )}{7}+\frac {3 \ln \left (3+x +y\right )}{7} = c_{1} \end {align*}

The following diagram shows solution curves of the original ode and how they transform in the canonical coordinates space using the mapping shown.

Original ode in \(x,y\) coordinates

Canonical coordinates transformation

ODE in canonical coordinates \((R,S)\)

\( \frac {dy}{dx} = -\frac {-45-7 x +5 y}{3 \left (1+3 x +7 y \right )}\)

\( \frac {d S}{d R} = 0\)

\(\!\begin {aligned} R&= x\\ S&= \frac {4 \ln \left (3 y -x -11\right )}{7}+\frac {3 \ln \left (x +y +3\right )}{7} \end {aligned} \)

Summary

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

Figure 787: Slope field plot

Verification of solutions

\[ \frac {4 \ln \left (3 y-x -11\right )}{7}+\frac {3 \ln \left (3+x +y\right )}{7} = c_{1} \] Verified OK.

18.22.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (3+9 x +21 y\right ) y^{\prime }+5 y=45+7 x \\ \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 {45+7 x -5 y}{3+9 x +21 y} \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.687 (sec). Leaf size: 212

dsolve((3+9*x+21*y(x))*diff(y(x),x) = 45+7*x-5*y(x),y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\left (-x -5\right ) {\operatorname {RootOf}\left (-27+\left (c_{1} x^{7}+35 c_{1} x^{6}+525 c_{1} x^{5}+4375 c_{1} x^{4}+21875 c_{1} x^{3}+65625 c_{1} x^{2}+109375 c_{1} x +78125 c_{1} \right ) \textit {\_Z}^{49}+\left (-12 c_{1} x^{7}-420 c_{1} x^{6}-6300 c_{1} x^{5}-52500 c_{1} x^{4}-262500 c_{1} x^{3}-787500 c_{1} x^{2}-1312500 c_{1} x -937500 c_{1} \right ) \textit {\_Z}^{42}+\left (48 c_{1} x^{7}+1680 c_{1} x^{6}+25200 c_{1} x^{5}+210000 c_{1} x^{4}+1050000 c_{1} x^{3}+3150000 c_{1} x^{2}+5250000 c_{1} x +3750000 c_{1} \right ) \textit {\_Z}^{35}+\left (-64 c_{1} x^{7}-2240 c_{1} x^{6}-33600 c_{1} x^{5}-280000 c_{1} x^{4}-1400000 c_{1} x^{3}-4200000 c_{1} x^{2}-7000000 c_{1} x -5000000 c_{1} \right ) \textit {\_Z}^{28}\right )}^{7}}{3}+\frac {11}{3}+\frac {x}{3} \]

Solution by Mathematica

Time used: 60.806 (sec). Leaf size: 7785

DSolve[(3+9 x+21 y[x])y'[x]==45 +7 x-5 y[x],y[x],x,IncludeSingularSolutions -> True]
 

Too large to display