2.26.20 Problem 21

2.26.20.1 Maple
2.26.20.2 Mathematica
2.26.20.3 Sympy

Internal problem ID [13656]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.4. Equations Containing Polynomial Functions of y. subsection 1.4.1-2 Abel equations of the first kind.
Problem number : 21
Date solved : Friday, December 19, 2025 at 10:07:11 AM
CAS classification : [_Abel]

\begin{align*} y^{\prime }&=-y^{3}+a \,{\mathrm e}^{\lambda x} y^{2} \\ \end{align*}
Unknown ode type.
2.26.20.1 Maple. Time used: 0.002 (sec). Leaf size: 101
ode:=diff(y(x),x) = -y(x)^3+a*exp(lambda*x)*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {2 \,{\mathrm e}^{\frac {y^{2} {\mathrm e}^{2 \lambda x} a^{2}-2 \lambda ^{2} x y^{2}+2 y \,{\mathrm e}^{\lambda x} a \lambda +\lambda ^{2}}{2 \lambda y^{2}}} \sqrt {-\lambda }+a \left (\operatorname {erf}\left (\frac {\left ({\mathrm e}^{\lambda x} a y+\lambda \right ) \sqrt {2}}{2 \sqrt {-\lambda }\, y}\right ) \sqrt {2}\, \sqrt {\pi }+2 c_1 \right )}{2 a} = 0 \]

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
trying Abel 
<- Abel successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-y \left (x \right )^{3}+a \,{\mathrm e}^{\lambda x} y \left (x \right )^{2} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-y \left (x \right )^{3}+a \,{\mathrm e}^{\lambda x} y \left (x \right )^{2} \end {array} \]
2.26.20.2 Mathematica. Time used: 0.486 (sec). Leaf size: 99
ode=D[y[x],x]==-y[x]^3+a*Exp[\[Lambda]*x]*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {a e^{\lambda x}}{\sqrt {\lambda }}=\frac {2 e^{\frac {1}{2} \left (-\frac {a e^{\lambda x}}{\sqrt {\lambda }}-\frac {\sqrt {\lambda }}{y(x)}\right )^2}}{\sqrt {2 \pi } \text {erfi}\left (\frac {-\frac {a e^{\lambda x}}{\sqrt {\lambda }}-\frac {\sqrt {\lambda }}{y(x)}}{\sqrt {2}}\right )+2 c_1},y(x)\right ] \]
2.26.20.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq(-a*y(x)**2*exp(lambda_*x) + y(x)**3 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(a*exp(lambda_*x) - y(x))*y(x)**2 + Derivative(y(x), x) cannot
 
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0
 
classify_ode(ode,func=y(x)) 
 
('factorable', '1st_power_series', 'lie_group')