12.3.8 problem 9

Internal problem ID [1585]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 9
Date solved : Monday, January 27, 2025 at 05:09:27 AM
CAS classification : [_separable]

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

Solution by Maple

Time used: 0.079 (sec). Leaf size: 29

dsolve(diff(y(x),x)=(x-1)*(y(x)-1)*(y(x)-2),y(x), singsol=all)
 
\[ y = \frac {-2+c_1 \,{\mathrm e}^{\frac {x \left (x -2\right )}{2}}}{c_1 \,{\mathrm e}^{\frac {x \left (x -2\right )}{2}}-1} \]

Solution by Mathematica

Time used: 0.284 (sec). Leaf size: 56

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