55.19.1 problem 1

Internal problem ID [13486]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. subsection 1.2.8-1. Equations containing arbitrary functions (but not containing their derivatives).
Problem number : 1
Date solved : Wednesday, October 01, 2025 at 03:32:11 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=y^{2}+f \left (x \right ) y-a^{2}-a f \left (x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 36
ode:=diff(y(x),x) = y(x)^2+f(x)*y(x)-a^2-a*f(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = a -\frac {{\mathrm e}^{\int f \left (x \right )d x +2 a x}}{\int {\mathrm e}^{\int f \left (x \right )d x +2 a x}d x -c_1} \]
Mathematica. Time used: 0.306 (sec). Leaf size: 166
ode=D[y[x],x]==y[x]^2+f[x]*y[x]-a^2-a*f[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x\frac {\exp \left (-\int _1^{K[2]}(-2 a-f(K[1]))dK[1]\right ) (a+f(K[2])+y(x))}{a-y(x)}dK[2]+\int _1^{y(x)}\left (\frac {\exp \left (-\int _1^x(-2 a-f(K[1]))dK[1]\right )}{(K[3]-a)^2}-\int _1^x\left (\frac {\exp \left (-\int _1^{K[2]}(-2 a-f(K[1]))dK[1]\right ) (a+f(K[2])+K[3])}{(a-K[3])^2}+\frac {\exp \left (-\int _1^{K[2]}(-2 a-f(K[1]))dK[1]\right )}{a-K[3]}\right )dK[2]\right )dK[3]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
f = Function("f") 
ode = Eq(a**2 + a*f(x) - f(x)*y(x) - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a**2 + a*f(x) - f(x)*y(x) - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method