6.5.1 problem Example 1

Internal problem ID [1625]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : Example 1
Date solved : Tuesday, September 30, 2025 at 04:40:44 AM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }-y&=x y^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 17
ode:=diff(y(x),x)-y(x) = x*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{1+{\mathrm e}^{-x} c_1 -x} \]
Mathematica. Time used: 0.07 (sec). Leaf size: 27
ode=D[y[x],x]-y[x]==x*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x}{-e^x (x-1)+c_1}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.130 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x)**2 - y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{x}}{C_{1} - x e^{x} + e^{x}} \]