44.4.44 problem 26

Internal problem ID [7057]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.1 Solution curves without a solution. Exercises 2.1 at page 44
Problem number : 26
Date solved : Sunday, March 30, 2025 at 11:37:04 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.211 (sec). Leaf size: 73
ode:=diff(y(x),x) = y(x)*(2-y(x))*(4-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {2 \,{\mathrm e}^{8 x} c_1}{\sqrt {-{\mathrm e}^{8 x} c_1 +1}\, \left (1+\sqrt {-{\mathrm e}^{8 x} c_1 +1}\right )} \\ y &= -\frac {2 \,{\mathrm e}^{8 x} c_1}{\sqrt {-{\mathrm e}^{8 x} c_1 +1}\, \left (-1+\sqrt {-{\mathrm e}^{8 x} c_1 +1}\right )} \\ \end{align*}
Mathematica. Time used: 12.462 (sec). Leaf size: 102
ode=D[y[x],x]==y[x]*(2-y[x])*(4-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {2 \left (-\sqrt {1+e^{8 (x+c_1)}}+e^{8 (x+c_1)}+1\right )}{1+e^{8 (x+c_1)}} \\ y(x)\to \frac {2 \left (\sqrt {1+e^{8 (x+c_1)}}+e^{8 (x+c_1)}+1\right )}{1+e^{8 (x+c_1)}} \\ y(x)\to 0 \\ y(x)\to 2 \\ y(x)\to 4 \\ \end{align*}
Sympy. Time used: 1.548 (sec). Leaf size: 65
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((4 - y(x))*(y(x) - 2)*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {2 \left (C_{1} - \sqrt {C_{1} \left (C_{1} - e^{8 x}\right )} - e^{8 x}\right )}{C_{1} - e^{8 x}}, \ y{\left (x \right )} = \frac {2 \left (C_{1} + \sqrt {C_{1} \left (C_{1} - e^{8 x}\right )} - e^{8 x}\right )}{C_{1} - e^{8 x}}\right ] \]