61.2.59 problem 59

Internal problem ID [11986]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 59
Date solved : Wednesday, March 05, 2025 at 03:38:08 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} \left (a \,x^{2}+b x +c \right ) y^{\prime }&=y^{2}+\left (2 \lambda x +b \right ) y+\lambda \left (\lambda -a \right ) x^{2}+\mu \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 530
ode:=(a*x^2+b*x+c)*diff(y(x),x) = y(x)^2+(2*lambda*x+b)*y(x)+lambda*(lambda-a)*x^2+mu; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {8 a^{2} \left (c_{1} \left (i a \sqrt {4 a c -b^{2}}\, \sqrt {\frac {b^{2}-4 c \lambda -4 \mu }{a^{2}}}-\sqrt {-4 a c +b^{2}}\, \left (2 \lambda x +b \right )\right ) {\left (\frac {-b +i \sqrt {4 a c -b^{2}}-2 a x}{i \sqrt {4 a c -b^{2}}+2 a x +b}\right )}^{-\frac {a \sqrt {\frac {b^{2}-4 c \lambda -4 \mu }{a^{2}}}}{2 \sqrt {-4 a c +b^{2}}}}-\left (i a \sqrt {4 a c -b^{2}}\, \sqrt {\frac {b^{2}-4 c \lambda -4 \mu }{a^{2}}}+\sqrt {-4 a c +b^{2}}\, \left (2 \lambda x +b \right )\right ) {\left (\frac {-b +i \sqrt {4 a c -b^{2}}-2 a x}{i \sqrt {4 a c -b^{2}}+2 a x +b}\right )}^{\frac {a \sqrt {\frac {b^{2}-4 c \lambda -4 \mu }{a^{2}}}}{2 \sqrt {-4 a c +b^{2}}}}\right ) \left (a \,x^{2}+b x +c \right )^{2}}{\sqrt {-4 a c +b^{2}}\, \left (2 a x +b -\sqrt {-4 a c +b^{2}}\right ) \left (2 a x +b +\sqrt {-4 a c +b^{2}}\right ) \left (i \sqrt {4 a c -b^{2}}+2 a x +b \right ) \left (-b +i \sqrt {4 a c -b^{2}}-2 a x \right ) \left (c_{1} {\left (\frac {-b +i \sqrt {4 a c -b^{2}}-2 a x}{i \sqrt {4 a c -b^{2}}+2 a x +b}\right )}^{-\frac {a \sqrt {\frac {b^{2}-4 c \lambda -4 \mu }{a^{2}}}}{2 \sqrt {-4 a c +b^{2}}}}+{\left (\frac {-b +i \sqrt {4 a c -b^{2}}-2 a x}{i \sqrt {4 a c -b^{2}}+2 a x +b}\right )}^{\frac {a \sqrt {\frac {b^{2}-4 c \lambda -4 \mu }{a^{2}}}}{2 \sqrt {-4 a c +b^{2}}}}\right )} \]
Mathematica. Time used: 1.414 (sec). Leaf size: 80
ode=(a*x^2+b*x+c)*D[y[x],x]==y[x]^2+(2*\[Lambda]*x+b)*y[x]+\[Lambda]*(\[Lambda]-a)*x^2+\[Mu]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \left (\sqrt {4 (c \lambda +\mu )-b^2} \tan \left (\frac {1}{2} \sqrt {-b^2+4 c \lambda +4 \mu } \int _1^x\frac {1}{c+K[5] (b+a K[5])}dK[5]+c_1\right )-b-2 \lambda x\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
cg = symbols("cg") 
mu = symbols("mu") 
y = Function("y") 
ode = Eq(-cg*x**2*(-a + cg) - mu - (b + 2*cg*x)*y(x) + (a*x**2 + b*x + c)*Derivative(y(x), x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out