44.5.42 problem 40 (a)

Internal problem ID [7104]
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.2 Separable equations. Exercises 2.2 at page 53
Problem number : 40 (a)
Date solved : Sunday, March 30, 2025 at 11:42:27 AM
CAS classification : [_separable]

\begin{align*} x y^{\prime }&=y^{2}-y \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Maple. Time used: 0.080 (sec). Leaf size: 37
ode:=x*diff(y(x),x) = y(x)^2-y(x); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= 1 \\ y &= \frac {c_1}{c_1 -x} \\ y &= \frac {c_1}{c_1 +x} \\ y &= \frac {1}{c_1 x +1} \\ \end{align*}
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=x*D[y[x],x]==y[x]^2-y[x]; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 1 \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - y(x)**2 + y(x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions