1.20 problem 20

1.20.1 Solved as first order Bernoulli ode
1.20.2 Maple step by step solution
1.20.3 Maple trace
1.20.4 Maple dsolve solution
1.20.5 Mathematica DSolve solution

Internal problem ID [7712]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 20
Date solved : Monday, October 21, 2024 at 03:58:17 PM
CAS classification : [_Bernoulli]

Solve

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

1.20.1 Solved as first order Bernoulli ode

Time used: 0.387 (sec)

In canonical form, the ODE is

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

This is a Bernoulli ODE.

\[ y' = \left (-{\frac {1}{3}}\right ) y + \left (-\frac {2 x}{3}+\frac {1}{3}\right )y^{4} \tag {1} \]

The standard Bernoulli ODE has the form

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

Comparing this to (1) shows that

\begin{align*} f_0 &=-{\frac {1}{3}}\\ f_1 &=-\frac {2 x}{3}+\frac {1}{3} \end{align*}

The first step is to divide the above equation by \(y^n \) which gives

\[ \frac {y'}{y^n} = f_0(x) y^{1-n} +f_1(x) \tag {3} \]

The next step is use the substitution \(v = y^{1-n}\) in equation (3) which generates a new ODE in \(v \left (x \right )\) which will be linear and can be easily solved using an integrating factor. Backsubstitution then gives the solution \(y(x)\) which is what we want.

This method is now applied to the ODE at hand. Comparing the ODE (1) With (2) Shows that

\begin{align*} f_0(x)&=-{\frac {1}{3}}\\ f_1(x)&=-\frac {2 x}{3}+\frac {1}{3}\\ n &=4 \end{align*}

Dividing both sides of ODE (1) by \(y^n=y^{4}\) gives

\begin{align*} y'\frac {1}{y^{4}} &= -\frac {1}{3 y^{3}} -\frac {2 x}{3}+\frac {1}{3} \tag {4} \end{align*}

Let

\begin{align*} v &= y^{1-n} \\ &= \frac {1}{y^{3}} \tag {5} \end{align*}

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

\begin{align*} v' &= -\frac {3}{y^{4}}y' \tag {6} \end{align*}

Substituting equations (5) and (6) into equation (4) gives

\begin{align*} -\frac {v^{\prime }\left (x \right )}{3}&= -\frac {v \left (x \right )}{3}-\frac {2 x}{3}+\frac {1}{3}\\ v' &= v +2 x -1 \tag {7} \end{align*}

The above now is a linear ODE in \(v \left (x \right )\) which is now solved.

In canonical form a linear first order is

\begin{align*} v^{\prime }\left (x \right ) + q(x)v \left (x \right ) &= p(x) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(x) &=-1\\ p(x) &=2 x -1 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int \left (-1\right )d x}\\ &= {\mathrm e}^{-x} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu v\right ) &= \mu p \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu v\right ) &= \left (\mu \right ) \left (2 x -1\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (v \,{\mathrm e}^{-x}\right ) &= \left ({\mathrm e}^{-x}\right ) \left (2 x -1\right ) \\ \mathrm {d} \left (v \,{\mathrm e}^{-x}\right ) &= \left (\left (2 x -1\right ) {\mathrm e}^{-x}\right )\, \mathrm {d} x \\ \end{align*}

Integrating gives

\begin{align*} v \,{\mathrm e}^{-x}&= \int {\left (2 x -1\right ) {\mathrm e}^{-x} \,dx} \\ &=-\left (2 x +1\right ) {\mathrm e}^{-x} + c_1 \end{align*}

Dividing throughout by the integrating factor \({\mathrm e}^{-x}\) gives the final solution

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

The substitution \(v = y^{1-n}\) is now used to convert the above solution back to \(y\) which results in

\[ \frac {1}{y^{3}} = c_1 \,{\mathrm e}^{x}-2 x -1 \]

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

\begin{align*} y&=\frac {1}{\left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}}\\ y&=-\frac {1}{2 \left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}}-\frac {i \sqrt {3}}{2 \left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}}\\ y&=-\frac {1}{2 \left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}}+\frac {i \sqrt {3}}{2 \left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}} \end{align*}
Figure 42: Slope field plot
\(y^{\prime }+\frac {y}{3} = \frac {\left (1-2 x \right ) y^{4}}{3}\)
1.20.2 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }+\frac {y}{3}=\frac {\left (1-2 x \right ) y^{4}}{3} \\ \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 {y}{3}+\frac {\left (1-2 x \right ) y^{4}}{3} \end {array} \]

1.20.3 Maple trace
Methods for first order ODEs:
 
1.20.4 Maple dsolve solution

Solving time : 0.003 (sec)
Leaf size : 61

dsolve(diff(y(x),x)+1/3*y(x) = 1/3*(1-2*x)*y(x)^4, 
       y(x),singsol=all)
 
\begin{align*} y &= \frac {1}{\left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}} \\ y &= -\frac {1+i \sqrt {3}}{2 \left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}} \\ y &= \frac {-1+i \sqrt {3}}{2 \left (c_1 \,{\mathrm e}^{x}-2 x -1\right )^{{1}/{3}}} \\ \end{align*}
1.20.5 Mathematica DSolve solution

Solving time : 4.787 (sec)
Leaf size : 76

DSolve[{D[y[x],x]+y[x]/3== (1-2*x)/3*y[x]^4,{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{\sqrt [3]{-2 x+c_1 e^x-1}} \\ y(x)\to -\frac {\sqrt [3]{-1}}{\sqrt [3]{-2 x+c_1 e^x-1}} \\ y(x)\to \frac {(-1)^{2/3}}{\sqrt [3]{-2 x+c_1 e^x-1}} \\ y(x)\to 0 \\ \end{align*}