61.4.15 problem 36

Internal problem ID [12041]
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.3-2. Equations with power and exponential functions
Problem number : 36
Date solved : Sunday, March 30, 2025 at 10:20:46 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.009 (sec). Leaf size: 86
ode:=x*diff(y(x),x) = a*x^(2*n)*exp(lambda*x)*y(x)^2+(b*x^n*exp(lambda*x)-n)*y(x)+c*exp(lambda*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (\tan \left (\frac {\sqrt {4 b^{2} a c -b^{4}}\, \left (b \,x^{n} \left (\Gamma \left (n , -\lambda x \right )-\Gamma \left (n \right )\right ) \left (-\lambda x \right )^{-n}-c_1 \right )}{2 b^{2}}\right ) \sqrt {4 b^{2} a c -b^{4}}+b^{2}\right ) x^{-n}}{2 a b} \]
Mathematica. Time used: 1.89 (sec). Leaf size: 87
ode=x*D[y[x],x]==a*x^(2*n)*Exp[\[Lambda]*x]*y[x]^2+(b*x^n*Exp[\[Lambda]*x]-n)*y[x]+c*Exp[\[Lambda]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\sqrt {\frac {a x^{2 n}}{c}} y(x)}\frac {1}{K[1]^2-\sqrt {\frac {b^2}{a c}} K[1]+1}dK[1]=-c (\lambda (-x))^{-n} \sqrt {\frac {a x^{2 n}}{c}} \Gamma (n,-x \lambda )+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
lambda_ = symbols("lambda_") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*x**(2*n)*y(x)**2*exp(lambda_*x) - c*exp(lambda_*x) + x*Derivative(y(x), x) - (b*x**n*exp(lambda_*x) - n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out