2.35.41 Problem 41

2.35.41.1 Maple
2.35.41.2 Mathematica
2.35.41.3 Sympy

Internal problem ID [13965]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 2, Second-Order Differential Equations. section 2.1.3-1. Equations with exponential functions
Problem number : 41
Date solved : Friday, December 19, 2025 at 08:54:36 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (a \,{\mathrm e}^{\lambda x}+b \right ) y^{\prime \prime }+\left ({\mathrm e}^{\lambda x} c +d \right ) y^{\prime }+\left (n \,{\mathrm e}^{\lambda x}+m \right ) y&=0 \\ \end{align*}
2.35.41.1 Maple. Time used: 0.131 (sec). Leaf size: 296
ode:=(a*exp(lambda*x)+b)*diff(diff(y(x),x),x)+(c*exp(lambda*x)+d)*diff(y(x),x)+(n*exp(lambda*x)+m)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x d}{2 b}} \left (c_1 \,{\mathrm e}^{\frac {x \sqrt {-4 b m +d^{2}}}{2 b}} \operatorname {hypergeom}\left (\left [-\frac {\sqrt {-4 a n +c^{2}}\, b -\sqrt {-4 b m +d^{2}}\, a +d a -c b}{2 b \lambda a}, \frac {-d a +c b +\sqrt {-4 b m +d^{2}}\, a +\sqrt {-4 a n +c^{2}}\, b}{2 b \lambda a}\right ], \left [\frac {b \lambda +\sqrt {-4 b m +d^{2}}}{b \lambda }\right ], -\frac {a \,{\mathrm e}^{\lambda x}}{b}\right )+c_2 \,{\mathrm e}^{-\frac {x \sqrt {-4 b m +d^{2}}}{2 b}} \operatorname {hypergeom}\left (\left [-\frac {\sqrt {-4 a n +c^{2}}\, b +\sqrt {-4 b m +d^{2}}\, a +d a -c b}{2 b \lambda a}, \frac {-d a +c b -\sqrt {-4 b m +d^{2}}\, a +\sqrt {-4 a n +c^{2}}\, b}{2 b \lambda a}\right ], \left [\frac {b \lambda -\sqrt {-4 b m +d^{2}}}{\lambda b}\right ], -\frac {a \,{\mathrm e}^{\lambda x}}{b}\right )\right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power \ 
@ Moebius 
-> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x),\ 
 dx)) * 2F1([a1, a2], [b1], f) 
-> Trying changes of variables to rationalize or make the ODE simpler 
   trying a quadrature 
   checking if the LODE has constant coefficients 
   checking if the LODE is of Euler type 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   checking if the LODE is missing y 
   -> Trying a Liouvillian solution using Kovacics algorithm 
   <- No Liouvillian solutions exists 
   -> Trying a solution in terms of special functions: 
      -> Bessel 
      -> elliptic 
      -> Legendre 
      -> Kummer 
         -> hyper3: Equivalence to 1F1 under a power @ Moebius 
      -> hypergeometric 
         -> heuristic approach 
         <- heuristic approach successful 
      <- hypergeometric successful 
   <- special function solution successful 
   Change of variables used: 
      [x = ln(t)/lambda] 
   Linear ODE actually solved: 
      (n*t+m)*u(t)+(a*lambda^2*t^2+b*lambda^2*t+c*lambda*t^2+d*lambda*t)*diff(u\ 
(t),t)+(a*lambda^2*t^3+b*lambda^2*t^2)*diff(diff(u(t),t),t) = 0 
<- change of variables successful
 
2.35.41.2 Mathematica. Time used: 0.187 (sec). Leaf size: 476
ode=(a*Exp[\[Lambda]*x]+b)*D[y[x],{x,2}]+(c*Exp[\[Lambda]*x]+d)*D[y[x],x]+(n*Exp[\[Lambda]*x]+m)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to b^{\frac {d-\sqrt {d^2-4 b m}}{2 b \lambda }} a^{-\frac {\sqrt {d^2-4 b m}+d}{2 b \lambda }} \left (e^{\lambda x}\right )^{-\frac {\sqrt {d^2-4 b m}+d}{2 b \lambda }} \left (c_2 a^{\frac {\sqrt {d^2-4 b m}}{b \lambda }} \left (e^{\lambda x}\right )^{\frac {\sqrt {d^2-4 b m}}{b \lambda }} \operatorname {Hypergeometric2F1}\left (\frac {-d \lambda a+\sqrt {\left (d^2-4 b m\right ) \lambda ^2} a+b c \lambda -b \sqrt {\left (c^2-4 a n\right ) \lambda ^2}}{2 a b \lambda ^2},\frac {-d \lambda a+\sqrt {\left (d^2-4 b m\right ) \lambda ^2} a+b c \lambda +b \sqrt {\left (c^2-4 a n\right ) \lambda ^2}}{2 a b \lambda ^2},\frac {\sqrt {\left (d^2-4 b m\right ) \lambda ^2}}{b \lambda ^2}+1,-\frac {a e^{x \lambda }}{b}\right )+c_1 b^{\frac {\sqrt {d^2-4 b m}}{b \lambda }} \operatorname {Hypergeometric2F1}\left (-\frac {a \left (d \lambda +\sqrt {\left (d^2-4 b m\right ) \lambda ^2}\right )+b \left (\sqrt {\left (c^2-4 a n\right ) \lambda ^2}-c \lambda \right )}{2 a b \lambda ^2},\frac {b \left (c \lambda +\sqrt {\left (c^2-4 a n\right ) \lambda ^2}\right )-a \left (d \lambda +\sqrt {\left (d^2-4 b m\right ) \lambda ^2}\right )}{2 a b \lambda ^2},1-\frac {\sqrt {\left (d^2-4 b m\right ) \lambda ^2}}{b \lambda ^2},-\frac {a e^{x \lambda }}{b}\right )\right ) \end{align*}
2.35.41.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
n = symbols("n") 
m = symbols("m") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq((m + n*exp(lambda_*x))*y(x) + (a*exp(lambda_*x) + b)*Derivative(y(x), (x, 2)) + (c*exp(lambda_*x) + d)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False
 
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', '2nd_power_series_ordinary')