2.26 problem 51

2.26.1 Solved as first order homogeneous class C ode
2.26.2 Solved using Lie symmetry for first order ode
2.26.3 Solved as first order ode of type Riccati
2.26.4 Solved as first order ode of type dAlembert
2.26.5 Maple step by step solution
2.26.6 Maple trace
2.26.7 Maple dsolve solution
2.26.8 Mathematica DSolve solution

Internal problem ID [3965]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 2
Problem number : 51
Date solved : Thursday, October 17, 2024 at 11:46:58 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

Solve

\begin{align*} y^{\prime }&=\left (3+x -4 y\right )^{2} \end{align*}

2.26.1 Solved as first order homogeneous class C ode

Time used: 0.177 (sec)

Let

\begin{align*} z = -3-x +4 y\tag {1} \end{align*}

Then

\begin{align*} z^{\prime }\left (x \right )&=-1+4 y^{\prime } \end{align*}

Therefore

\begin{align*} y^{\prime }&=\frac {z^{\prime }\left (x \right )}{4}+\frac {1}{4} \end{align*}

Hence the given ode can now be written as

\begin{align*} \frac {z^{\prime }\left (x \right )}{4}+\frac {1}{4}&=z^{2} \end{align*}

This is separable first order ode. Integrating

\begin{align*} \int d x&=\int \frac {1}{4 z^{2}-1}d z \\ x +c_1&=\frac {\ln \left (2 z -1\right )}{4}-\frac {\ln \left (2 z +1\right )}{4} \\ \end{align*}

Replacing \(z\) back by its value from (1) then the above gives the solution as Solving for \(y\) from the above solution(s) gives (after possible removing of solutions that do not verify)

\begin{align*} y = \frac {2 x \,{\mathrm e}^{4 x +4 c_1}+5 \,{\mathrm e}^{4 x +4 c_1}-2 x -7}{-8+8 \,{\mathrm e}^{4 x +4 c_1}} \end{align*}
Figure 85: Slope field plot
\(y^{\prime } = \left (3+x -4 y\right )^{2}\)
2.26.2 Solved using Lie symmetry for first order ode

Time used: 0.880 (sec)

Writing the ode as

\begin{align*} y^{\prime }&=\left (-3-x +4 y \right )^{2}\\ 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*}

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}+\left (-3-x +4 y \right )^{2} \left (b_{3}-a_{2}\right )-\left (-3-x +4 y \right )^{4} a_{3}-\left (6+2 x -8 y \right ) \left (x a_{2}+y a_{3}+a_{1}\right )-\left (-24-8 x +32 y \right ) \left (x b_{2}+y b_{3}+b_{1}\right ) = 0 \end{equation}

Putting the above in normal form gives

\[ -x^{4} a_{3}+16 x^{3} y a_{3}-96 x^{2} y^{2} a_{3}+256 x \,y^{3} a_{3}-256 y^{4} a_{3}-12 x^{3} a_{3}+144 x^{2} y a_{3}-576 x \,y^{2} a_{3}+768 y^{3} a_{3}-3 x^{2} a_{2}-54 x^{2} a_{3}+8 x^{2} b_{2}+x^{2} b_{3}+16 x y a_{2}+430 x y a_{3}-32 x y b_{2}-16 y^{2} a_{2}-856 y^{2} a_{3}-16 y^{2} b_{3}-2 x a_{1}-12 x a_{2}-108 x a_{3}+8 x b_{1}+24 x b_{2}+6 x b_{3}+8 y a_{1}+24 y a_{2}+426 y a_{3}-32 y b_{1}-6 a_{1}-9 a_{2}-81 a_{3}+24 b_{1}+b_{2}+9 b_{3} = 0 \]

Setting the numerator to zero gives

\begin{equation} \tag{6E} -x^{4} a_{3}+16 x^{3} y a_{3}-96 x^{2} y^{2} a_{3}+256 x \,y^{3} a_{3}-256 y^{4} a_{3}-12 x^{3} a_{3}+144 x^{2} y a_{3}-576 x \,y^{2} a_{3}+768 y^{3} a_{3}-3 x^{2} a_{2}-54 x^{2} a_{3}+8 x^{2} b_{2}+x^{2} b_{3}+16 x y a_{2}+430 x y a_{3}-32 x y b_{2}-16 y^{2} a_{2}-856 y^{2} a_{3}-16 y^{2} b_{3}-2 x a_{1}-12 x a_{2}-108 x a_{3}+8 x b_{1}+24 x b_{2}+6 x b_{3}+8 y a_{1}+24 y a_{2}+426 y a_{3}-32 y b_{1}-6 a_{1}-9 a_{2}-81 a_{3}+24 b_{1}+b_{2}+9 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} -a_{3} v_{1}^{4}+16 a_{3} v_{1}^{3} v_{2}-96 a_{3} v_{1}^{2} v_{2}^{2}+256 a_{3} v_{1} v_{2}^{3}-256 a_{3} v_{2}^{4}-12 a_{3} v_{1}^{3}+144 a_{3} v_{1}^{2} v_{2}-576 a_{3} v_{1} v_{2}^{2}+768 a_{3} v_{2}^{3}-3 a_{2} v_{1}^{2}+16 a_{2} v_{1} v_{2}-16 a_{2} v_{2}^{2}-54 a_{3} v_{1}^{2}+430 a_{3} v_{1} v_{2}-856 a_{3} v_{2}^{2}+8 b_{2} v_{1}^{2}-32 b_{2} v_{1} v_{2}+b_{3} v_{1}^{2}-16 b_{3} v_{2}^{2}-2 a_{1} v_{1}+8 a_{1} v_{2}-12 a_{2} v_{1}+24 a_{2} v_{2}-108 a_{3} v_{1}+426 a_{3} v_{2}+8 b_{1} v_{1}-32 b_{1} v_{2}+24 b_{2} v_{1}+6 b_{3} v_{1}-6 a_{1}-9 a_{2}-81 a_{3}+24 b_{1}+b_{2}+9 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} -a_{3} v_{1}^{4}+16 a_{3} v_{1}^{3} v_{2}-12 a_{3} v_{1}^{3}-96 a_{3} v_{1}^{2} v_{2}^{2}+144 a_{3} v_{1}^{2} v_{2}+\left (-3 a_{2}-54 a_{3}+8 b_{2}+b_{3}\right ) v_{1}^{2}+256 a_{3} v_{1} v_{2}^{3}-576 a_{3} v_{1} v_{2}^{2}+\left (16 a_{2}+430 a_{3}-32 b_{2}\right ) v_{1} v_{2}+\left (-2 a_{1}-12 a_{2}-108 a_{3}+8 b_{1}+24 b_{2}+6 b_{3}\right ) v_{1}-256 a_{3} v_{2}^{4}+768 a_{3} v_{2}^{3}+\left (-16 a_{2}-856 a_{3}-16 b_{3}\right ) v_{2}^{2}+\left (8 a_{1}+24 a_{2}+426 a_{3}-32 b_{1}\right ) v_{2}-6 a_{1}-9 a_{2}-81 a_{3}+24 b_{1}+b_{2}+9 b_{3} = 0 \end{equation}

Setting each coefficients in (8E) to zero gives the following equations to solve

\begin{align*} -576 a_{3}&=0\\ -256 a_{3}&=0\\ -96 a_{3}&=0\\ -12 a_{3}&=0\\ -a_{3}&=0\\ 16 a_{3}&=0\\ 144 a_{3}&=0\\ 256 a_{3}&=0\\ 768 a_{3}&=0\\ -16 a_{2}-856 a_{3}-16 b_{3}&=0\\ 16 a_{2}+430 a_{3}-32 b_{2}&=0\\ 8 a_{1}+24 a_{2}+426 a_{3}-32 b_{1}&=0\\ -3 a_{2}-54 a_{3}+8 b_{2}+b_{3}&=0\\ -6 a_{1}-9 a_{2}-81 a_{3}+24 b_{1}+b_{2}+9 b_{3}&=0\\ -2 a_{1}-12 a_{2}-108 a_{3}+8 b_{1}+24 b_{2}+6 b_{3}&=0 \end{align*}

Solving the above equations for the unknowns gives

\begin{align*} a_{1}&=4 b_{1}\\ a_{2}&=0\\ a_{3}&=0\\ b_{1}&=b_{1}\\ b_{2}&=0\\ b_{3}&=0 \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 &= 4 \\ \eta &= 1 \\ \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 \\ &= 1 - \left (\left (-3-x +4 y \right )^{2}\right ) \left (4\right ) \\ &= -4 x^{2}+32 x y -64 y^{2}-24 x +96 y -35\\ \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}{-4 x^{2}+32 x y -64 y^{2}-24 x +96 y -35}} dy \end{align*}

Which results in

\begin{align*} S&= -\frac {\ln \left (8 y -2 x -7\right )}{16}+\frac {\ln \left (8 y -2 x -5\right )}{16} \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) &= \left (-3-x +4 y \right )^{2} \end{align*}

Evaluating all the partial derivatives gives

\begin{align*} R_{x} &= 1\\ R_{y} &= 0\\ S_{x} &= \frac {1}{4 \left (-8 y +2 x +7\right ) \left (-8 y +2 x +5\right )}\\ S_{y} &= -\frac {1}{\left (-8 y +2 x +7\right ) \left (-8 y +2 x +5\right )} \end{align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.

\begin{align*} \frac {dS}{dR} &= -{\frac {1}{4}}\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} &= -{\frac {1}{4}} \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\).

Since the ode has the form \(\frac {d}{d R}S \left (R \right )=f(R)\), then we only need to integrate \(f(R)\).

\begin{align*} \int {dS} &= \int {-{\frac {1}{4}}\, dR}\\ S \left (R \right ) &= -\frac {R}{4} + c_2 \end{align*}

To complete the solution, we just need to transform the above back to \(x,y\) coordinates. This results in

\begin{align*} -\frac {\ln \left (-7-2 x +8 y\right )}{16}+\frac {\ln \left (-5-2 x +8 y\right )}{16} = -\frac {x}{4}+c_2 \end{align*}

Which gives

\begin{align*} y = \frac {2 x \,{\mathrm e}^{-4 x +16 c_2}+7 \,{\mathrm e}^{-4 x +16 c_2}-2 x -5}{8 \,{\mathrm e}^{-4 x +16 c_2}-8} \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} = \left (-3-x +4 y \right )^{2}\)

\( \frac {d S}{d R} = -{\frac {1}{4}}\)

\(\!\begin {aligned} R&= x\\ S&= -\frac {\ln \left (8 y -2 x -7\right )}{16}+\frac {\ln \left (8 y -2 x -5\right )}{16} \end {aligned} \)

Figure 86: Slope field plot
\(y^{\prime } = \left (3+x -4 y\right )^{2}\)
2.26.3 Solved as first order ode of type Riccati

Time used: 0.569 (sec)

In canonical form the ODE is

\begin{align*} y' &= F(x,y)\\ &= \left (-3-x +4 y \right )^{2} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = x^{2}-8 x y +16 y^{2}+6 x -24 y +9 \]

With Riccati ODE standard form

\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]

Shows that \(f_0(x)=\left (-3-x \right )^{2}\), \(f_1(x)=-24-8 x\) and \(f_2(x)=16\). Let

\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{16 u} \tag {1} \end{align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is

\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}

But

\begin{align*} f_2' &=0\\ f_1 f_2 &=-384-128 x\\ f_2^2 f_0 &=256 \left (-3-x \right )^{2} \end{align*}

Substituting the above terms back in equation (2) gives

\begin{align*} 16 u^{\prime \prime }\left (x \right )-\left (-384-128 x \right ) u^{\prime }\left (x \right )+256 \left (-3-x \right )^{2} u \left (x \right ) = 0 \end{align*}

In normal form the given ode is written as

\begin{align*} \frac {d^{2}u}{d x^{2}}+p \left (x \right ) \left (\frac {d u}{d x}\right )+q \left (x \right ) u&=0 \tag {2} \end{align*}

Where

\begin{align*} p \left (x \right )&=8 x +24\\ q \left (x \right )&=16 \left (3+x \right )^{2} \end{align*}

Calculating the Liouville ode invariant \(Q\) given by

\begin{align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= 16 \left (3+x \right )^{2} - \frac {\left (8 x +24\right )'}{2}- \frac {\left (8 x +24\right )^2}{4} \\ &= 16 \left (3+x \right )^{2} - \frac {\left (8\right )}{2}- \frac {\left (\left (8 x +24\right )^{2}\right )}{4} \\ &= 16 \left (3+x \right )^{2} - \left (4\right )-\frac {\left (8 x +24\right )^{2}}{4}\\ &= -4 \end{align*}

Since the Liouville ode invariant does not depend on the independent variable \(x\) then the transformation

\begin{align*} u = v \left (x \right ) z \left (x \right )\tag {3} \end{align*}

is used to change the original ode to a constant coefficients ode in \(v\). In (3) the term \(z \left (x \right )\) is given by

\begin{align*} z \left (x \right )&={\mathrm e}^{-\left (\int \frac {p \left (x \right )}{2}d x \right )}\\ &= e^{-\int \frac {8 x +24}{2} }\\ &= {\mathrm e}^{-2 x \left (x +6\right )}\tag {5} \end{align*}

Hence (3) becomes

\begin{align*} u = v \left (x \right ) {\mathrm e}^{-2 x \left (x +6\right )}\tag {4} \end{align*}

Applying this change of variable to the original ode results in

\begin{align*} \left (-64 v \left (x \right )+16 \frac {d^{2}}{d x^{2}}v \left (x \right )\right ) {\mathrm e}^{-2 x \left (x +6\right )} = 0 \end{align*}

Which is now solved for \(v \left (x \right )\).

The above ode can be simplified to

\begin{align*} -64 v \left (x \right )+16 \frac {d^{2}}{d x^{2}}v \left (x \right ) = 0 \end{align*}

This is second order with constant coefficients homogeneous ODE. In standard form the ODE is

\[ A v''(x) + B v'(x) + C v(x) = 0 \]

Where in the above \(A=16, B=0, C=-64\). Let the solution be \(v \left (x \right )=e^{\lambda x}\). Substituting this into the ODE gives

\[ 16 \lambda ^{2} {\mathrm e}^{x \lambda }-64 \,{\mathrm e}^{x \lambda } = 0 \tag {1} \]

Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\) gives

\[ 16 \lambda ^{2}-64 = 0 \tag {2} \]

Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form.Using the quadratic formula

\[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \]

Substituting \(A=16, B=0, C=-64\) into the above gives

\begin{align*} \lambda _{1,2} &= \frac {0}{(2) \left (16\right )} \pm \frac {1}{(2) \left (16\right )} \sqrt {0^2 - (4) \left (16\right )\left (-64\right )}\\ &= \pm 2 \end{align*}

Hence

\begin{align*} \lambda _1 &= + 2 \\ \lambda _2 &= - 2 \\ \end{align*}

Which simplifies to

\begin{align*} \lambda _1 &= 2 \\ \lambda _2 &= -2 \\ \end{align*}

Since roots are real and distinct, then the solution is

\begin{align*} v \left (x \right ) &= c_1 e^{\lambda _1 x} + c_2 e^{\lambda _2 x} \\ v \left (x \right ) &= c_1 e^{\left (2\right )x} +c_2 e^{\left (-2\right )x} \\ \end{align*}

Or

\[ v \left (x \right ) =c_1 \,{\mathrm e}^{2 x}+c_2 \,{\mathrm e}^{-2 x} \]

Will add steps showing solving for IC soon.

Now that \(v \left (x \right )\) is known, then

\begin{align*} u&= v \left (x \right ) z \left (x \right )\\ &= \left (c_1 \,{\mathrm e}^{2 x}+c_2 \,{\mathrm e}^{-2 x}\right ) \left (z \left (x \right )\right )\tag {7} \end{align*}

But from (5)

\begin{align*} z \left (x \right )&= {\mathrm e}^{-2 x \left (x +6\right )} \end{align*}

Hence (7) becomes

\begin{align*} u = \left (c_1 \,{\mathrm e}^{2 x}+c_2 \,{\mathrm e}^{-2 x}\right ) {\mathrm e}^{-2 x \left (x +6\right )} \end{align*}

Will add steps showing solving for IC soon.

Taking derivative gives

\[ u^{\prime }\left (x \right ) = \left (2 c_1 \,{\mathrm e}^{2 x}-2 c_2 \,{\mathrm e}^{-2 x}\right ) {\mathrm e}^{-2 x \left (x +6\right )}+\left (c_1 \,{\mathrm e}^{2 x}+c_2 \,{\mathrm e}^{-2 x}\right ) \left (-12-4 x \right ) {\mathrm e}^{-2 x \left (x +6\right )} \]

Doing change of constants, the solution becomes

\[ y = -\frac {\left (\left (2 c_3 \,{\mathrm e}^{2 x}-2 \,{\mathrm e}^{-2 x}\right ) {\mathrm e}^{-2 x \left (x +6\right )}+\left (c_3 \,{\mathrm e}^{2 x}+{\mathrm e}^{-2 x}\right ) \left (-12-4 x \right ) {\mathrm e}^{-2 x \left (x +6\right )}\right ) {\mathrm e}^{2 x \left (x +6\right )}}{16 \left (c_3 \,{\mathrm e}^{2 x}+{\mathrm e}^{-2 x}\right )} \]
Figure 87: Slope field plot
\(y^{\prime } = \left (3+x -4 y\right )^{2}\)
2.26.4 Solved as first order ode of type dAlembert

Time used: 2.020 (sec)

Let \(p=y^{\prime }\) the ode becomes

\begin{align*} p = \left (3+x -4 y \right )^{2} \end{align*}

Solving for \(y\) from the above results in

\begin{align*} y &= \frac {3}{4}+\frac {x}{4}+\frac {\sqrt {p}}{4}\tag {1A}\\ y &= \frac {3}{4}+\frac {x}{4}-\frac {\sqrt {p}}{4}\tag {2A} \end{align*}

This has the form

\begin{align*} y=xf(p)+g(p)\tag {*} \end{align*}

Where \(f,g\) are functions of \(p=y'(x)\). Each of the above ode’s is dAlembert ode which is now solved.

Solving ode 1A

Taking derivative of (*) w.r.t. \(x\) gives

\begin{align*} p &= f+(x f'+g') \frac {dp}{dx}\\ p-f &= (x f'+g') \frac {dp}{dx}\tag {2} \end{align*}

Comparing the form \(y=x f + g\) to (1A) shows that

\begin{align*} f &= {\frac {1}{4}}\\ g &= \frac {3}{4}+\frac {\sqrt {p}}{4} \end{align*}

Hence (2) becomes

\begin{align*} p -\frac {1}{4} = \frac {p^{\prime }\left (x \right )}{8 \sqrt {p}}\tag {2A} \end{align*}

The singular solution is found by setting \(\frac {dp}{dx}=0\) in the above which gives

\begin{align*} p -\frac {1}{4} = 0 \end{align*}

Solving the above for \(p\) results in

\begin{align*} p_{1} &={\frac {1}{4}} \end{align*}

Substituting these in (1A) and keeping singular solution that verifies the ode gives

\begin{align*} y = \frac {x}{4}+\frac {7}{8} \end{align*}

The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}x}}\neq 0\). From eq. (2A). This results in

\begin{align*} p^{\prime }\left (x \right ) = 8 \left (p \left (x \right )-\frac {1}{4}\right ) \sqrt {p \left (x \right )}\tag {3} \end{align*}

This ODE is now solved for \(p \left (x \right )\). No inversion is needed. Integrating gives

\begin{align*} \int \frac {1}{2 \left (4 p -1\right ) \sqrt {p}}d p &= dx\\ \frac {\ln \left (2 \sqrt {p}-1\right )}{4}-\frac {\ln \left (2 \sqrt {p}+1\right )}{4}&= x +c_1 \end{align*}

Singular solutions are found by solving

\begin{align*} 2 \left (4 p -1\right ) \sqrt {p}&= 0 \end{align*}

for \(p \left (x \right )\). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} p \left (x \right ) = 0\\ p \left (x \right ) = {\frac {1}{4}} \end{align*}

Solving for \(p \left (x \right )\) from the above solution(s) gives (after possible removing of solutions that do not verify)

\begin{align*} p \left (x \right )&=0\\ p \left (x \right )&={\frac {1}{4}}\\ p \left (x \right )&=\frac {\left ({\mathrm e}^{4 x +4 c_1}+1\right )^{2}}{4 \left (-1+{\mathrm e}^{4 x +4 c_1}\right )^{2}} \end{align*}

Substituing the above solution for \(p\) in (2A) gives

\begin{align*} y = \frac {3}{4}+\frac {x}{4}\\ y = \frac {3}{4}+\frac {x}{4}+\frac {\sqrt {4}}{16}\\ y = \frac {3}{4}+\frac {x}{4}+\frac {\sqrt {4}\, \sqrt {\frac {\left ({\mathrm e}^{4 x +4 c_1}+1\right )^{2}}{\left (-1+{\mathrm e}^{4 x +4 c_1}\right )^{2}}}}{16}\\ \end{align*}

Solving ode 2A

Taking derivative of (*) w.r.t. \(x\) gives

\begin{align*} p &= f+(x f'+g') \frac {dp}{dx}\\ p-f &= (x f'+g') \frac {dp}{dx}\tag {2} \end{align*}

Comparing the form \(y=x f + g\) to (1A) shows that

\begin{align*} f &= {\frac {1}{4}}\\ g &= \frac {3}{4}-\frac {\sqrt {p}}{4} \end{align*}

Hence (2) becomes

\begin{align*} p -\frac {1}{4} = -\frac {p^{\prime }\left (x \right )}{8 \sqrt {p}}\tag {2A} \end{align*}

The singular solution is found by setting \(\frac {dp}{dx}=0\) in the above which gives

\begin{align*} p -\frac {1}{4} = 0 \end{align*}

Solving the above for \(p\) results in

\begin{align*} p_{1} &={\frac {1}{4}} \end{align*}

Substituting these in (1A) and keeping singular solution that verifies the ode gives

\begin{align*} y = \frac {x}{4}+\frac {5}{8} \end{align*}

The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}x}}\neq 0\). From eq. (2A). This results in

\begin{align*} p^{\prime }\left (x \right ) = -8 \left (p \left (x \right )-\frac {1}{4}\right ) \sqrt {p \left (x \right )}\tag {3} \end{align*}

This ODE is now solved for \(p \left (x \right )\). No inversion is needed. Integrating gives

\begin{align*} \int -\frac {1}{2 \left (4 p -1\right ) \sqrt {p}}d p &= dx\\ -\frac {\ln \left (2 \sqrt {p}-1\right )}{4}+\frac {\ln \left (2 \sqrt {p}+1\right )}{4}&= x +c_2 \end{align*}

Singular solutions are found by solving

\begin{align*} -2 \left (4 p -1\right ) \sqrt {p}&= 0 \end{align*}

for \(p \left (x \right )\). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} p \left (x \right ) = 0\\ p \left (x \right ) = {\frac {1}{4}} \end{align*}

Solving for \(p \left (x \right )\) from the above solution(s) gives (after possible removing of solutions that do not verify)

\begin{align*} p \left (x \right )&=0\\ p \left (x \right )&={\frac {1}{4}}\\ p \left (x \right )&=\frac {\left (1+{\mathrm e}^{4 x +4 c_2}\right )^{2}}{4 \left ({\mathrm e}^{4 x +4 c_2}-1\right )^{2}} \end{align*}

Substituing the above solution for \(p\) in (2A) gives

\begin{align*} y = \frac {3}{4}+\frac {x}{4}\\ y = \frac {3}{4}+\frac {x}{4}-\frac {\sqrt {4}}{16}\\ y = \frac {3}{4}+\frac {x}{4}-\frac {\sqrt {4}\, \sqrt {\frac {\left (1+{\mathrm e}^{4 x +4 c_2}\right )^{2}}{\left ({\mathrm e}^{4 x +4 c_2}-1\right )^{2}}}}{16}\\ \end{align*}

The solution

\[ y = \frac {3}{4}+\frac {x}{4} \]

was found not to satisfy the ode or the IC. Hence it is removed. The solution

\[ y = \frac {3}{4}+\frac {x}{4} \]

was found not to satisfy the ode or the IC. Hence it is removed.

Figure 88: Slope field plot
\(y^{\prime } = \left (3+x -4 y\right )^{2}\)
2.26.5 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\left (3+x -4 y \left (x \right )\right )^{2} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\left (3+x -4 y \left (x \right )\right )^{2} \end {array} \]

2.26.6 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 
1st order, trying the canonical coordinates of the invariance group 
   -> Calling odsolve with the ODE`, diff(y(x), x) = 1/4, y(x)`      *** Sublevel 2 *** 
      Methods for first order ODEs: 
      --- Trying classification methods --- 
      trying a quadrature 
      trying 1st order linear 
      <- 1st order linear successful 
<- 1st order, canonical coordinates successful 
<- homogeneous successful`
 
2.26.7 Maple dsolve solution

Solving time : 0.028 (sec)
Leaf size : 32

dsolve(diff(y(x),x) = (3+x-4*y(x))^2, 
       y(x),singsol=all)
 
\[ y \left (x \right ) = \frac {c_{1} \left (5+2 x \right ) {\mathrm e}^{4 x}-2 x -7}{8 \,{\mathrm e}^{4 x} c_{1} -8} \]
2.26.8 Mathematica DSolve solution

Solving time : 0.136 (sec)
Leaf size : 41

DSolve[{D[y[x],x]==(3+x-4 y[x])^2,{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{16} \left (4 x+\frac {1}{\frac {1}{4}+c_1 e^{4 x}}+10\right ) \\ y(x)\to \frac {1}{8} (2 x+5) \\ \end{align*}