10.4.1 problem 1

Internal problem ID [1182]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.5. Page 88
Problem number : 1
Date solved : Saturday, March 29, 2025 at 10:44:54 PM
CAS classification : [_quadrature]

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

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