12.5.5 problem 1

Internal problem ID [1629]
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 : 1
Date solved : Saturday, March 29, 2025 at 11:08:49 PM
CAS classification : [_quadrature]

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

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