2.35.24 Problem 24

2.35.24.1 second order change of variable on y method 1
2.35.24.2 Maple
2.35.24.3 Mathematica
2.35.24.4 Sympy

Internal problem ID [13948]
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 : 24
Date solved : Sunday, January 18, 2026 at 09:36:40 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

2.35.24.1 second order change of variable on y method 1

0.717 (sec)

\begin{align*} y^{\prime \prime }+\left (2 \,{\mathrm e}^{\lambda x} a +b \right ) y^{\prime }+\left (a^{2} {\mathrm e}^{2 \lambda x}+a \left (b +\lambda \right ) {\mathrm e}^{\lambda x}+c \right ) y&=0 \\ \end{align*}
Entering second order change of variable on \(y\) method 1 solverIn normal form the given ode is written as
\begin{align*} y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y&=0 \tag {2} \end{align*}

Where

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

Calculating the Liouville ode invariant \(Q\) given by

\begin{align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= a^{2} {\mathrm e}^{2 \lambda x}+a \left (b +\lambda \right ) {\mathrm e}^{\lambda x}+c - \frac {\left (2 \,{\mathrm e}^{\lambda x} a +b\right )'}{2}- \frac {\left (2 \,{\mathrm e}^{\lambda x} a +b\right )^2}{4} \\ &= a^{2} {\mathrm e}^{2 \lambda x}+a \left (b +\lambda \right ) {\mathrm e}^{\lambda x}+c - \frac {\left (2 a \lambda \,{\mathrm e}^{\lambda x}\right )}{2}- \frac {\left (\left (2 \,{\mathrm e}^{\lambda x} a +b \right )^{2}\right )}{4} \\ &= a^{2} {\mathrm e}^{2 \lambda x}+a \left (b +\lambda \right ) {\mathrm e}^{\lambda x}+c - \left (a \lambda \,{\mathrm e}^{\lambda x}\right )-\frac {\left (2 \,{\mathrm e}^{\lambda x} a +b \right )^{2}}{4}\\ &= c -\frac {b^{2}}{4} \end{align*}

Since the Liouville ode invariant does not depend on the independent variable \(x\) then the transformation

\begin{align*} y = v \left (x \right ) z \left (x \right )\tag {3} \end{align*}

is used to change the original ode to a constant coefficients ode in \(v\). In (3) the term \(z \left (x \right )\) is given by

\begin{align*} z \left (x \right )&={\mathrm e}^{-\int \frac {p \left (x \right )}{2}d x}\\ &= e^{-\int \frac {2 \,{\mathrm e}^{\lambda x} a +b}{2} }\\ &= {\mathrm e}^{-\frac {b x}{2}-\frac {a \,{\mathrm e}^{\lambda x}}{\lambda }}\tag {5} \end{align*}

Hence (3) becomes

\begin{align*} y = v \left (x \right ) {\mathrm e}^{-\frac {b x}{2}-\frac {a \,{\mathrm e}^{\lambda x}}{\lambda }}\tag {4} \end{align*}

Applying this change of variable to the original ode results in

\begin{align*} -\frac {\left (-4 v^{\prime \prime }\left (x \right )+\left (b^{2}-4 c \right ) v \left (x \right )\right ) {\mathrm e}^{-\frac {b \lambda x +2 \,{\mathrm e}^{\lambda x} a}{2 \lambda }}}{4} = 0 \end{align*}

Which is now solved for \(v \left (x \right )\).

The above ode simplifies to

\begin{align*} v^{\prime \prime }\left (x \right )-\frac {v \left (x \right ) b^{2}}{4}+v \left (x \right ) c = 0 \end{align*}

Entering second order linear constant coefficient ode solver

This is second order with constant coefficients homogeneous ODE. In standard form the ODE is

\[ A v''(x) + B v'(x) + C v(x) = 0 \]
Where in the above \(A=1, B=0, C=c -\frac {b^{2}}{4}\). Let the solution be \(v \left (x \right )=e^{\lambda x}\). Substituting this into the ODE gives
\[ \lambda ^{2} {\mathrm e}^{x \lambda }+\left (c -\frac {b^{2}}{4}\right ) {\mathrm e}^{x \lambda } = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\) gives
\[ \lambda ^{2}+c -\frac {b^{2}}{4} = 0 \tag {2} \]
Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form. Using the quadratic formula the roots are
\[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \]
Substituting \(A=1, B=0, C=c -\frac {b^{2}}{4}\) into the above gives
\begin{align*} \lambda _{1,2} &= \frac {0}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {0^2 - (4) \left (1\right )\left (c -\frac {b^{2}}{4}\right )}\\ &= \pm \frac {\sqrt {b^{2}-4 c}}{2} \end{align*}

Hence

\begin{align*} \lambda _1 &= + \frac {\sqrt {b^{2}-4 c}}{2} \\ \lambda _2 &= - \frac {\sqrt {b^{2}-4 c}}{2} \\ \end{align*}
Which simplifies to
\begin{align*} \lambda _1 &= \frac {\sqrt {b^{2}-4 c}}{2} \\ \lambda _2 &= -\frac {\sqrt {b^{2}-4 c}}{2} \\ \end{align*}
Since the roots are distinct, the solution is
\begin{align*} v \left (x \right ) &= c_1 e^{\lambda _1 x} + c_2 e^{\lambda _2 x} \\ v \left (x \right ) &= c_1 e^{\left (\frac {\sqrt {b^{2}-4 c}}{2}\right )x} +c_2 e^{\left (-\frac {\sqrt {b^{2}-4 c}}{2}\right )x} \\ \end{align*}
Or
\[ v \left (x \right ) =c_1 \,{\mathrm e}^{\frac {\sqrt {b^{2}-4 c}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {b^{2}-4 c}\, x}{2}} \]
Now that \(v \left (x \right )\) is known, then
\begin{align*} y&= v \left (x \right ) z \left (x \right )\\ &= \left (c_1 \,{\mathrm e}^{\frac {\sqrt {b^{2}-4 c}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {b^{2}-4 c}\, x}{2}}\right ) \left (z \left (x \right )\right )\tag {7} \end{align*}

But from (5)

\begin{align*} z \left (x \right )&= {\mathrm e}^{-\frac {b x}{2}-\frac {a \,{\mathrm e}^{\lambda x}}{\lambda }} \end{align*}

Hence (7) becomes

\begin{align*} y = \left (c_1 \,{\mathrm e}^{\frac {\sqrt {b^{2}-4 c}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {b^{2}-4 c}\, x}{2}}\right ) {\mathrm e}^{-\frac {b x}{2}-\frac {a \,{\mathrm e}^{\lambda x}}{\lambda }} \end{align*}

Summary of solutions found

\begin{align*} y &= \left (c_1 \,{\mathrm e}^{\frac {\sqrt {b^{2}-4 c}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {b^{2}-4 c}\, x}{2}}\right ) {\mathrm e}^{-\frac {b x}{2}-\frac {a \,{\mathrm e}^{\lambda x}}{\lambda }} \\ \end{align*}
2.35.24.2 Maple. Time used: 0.003 (sec). Leaf size: 54
ode:=diff(diff(y(x),x),x)+(2*a*exp(lambda*x)+b)*diff(y(x),x)+(a^2*exp(2*lambda*x)+a*(b+lambda)*exp(lambda*x)+c)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x b \lambda +2 a \,{\mathrm e}^{\lambda x}}{2 \lambda }} \left (c_1 \sinh \left (\frac {\sqrt {b^{2}-4 c}\, x}{2}\right )+c_2 \cosh \left (\frac {\sqrt {b^{2}-4 c}\, x}{2}\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 
-> Trying a Liouvillian solution using Kovacics algorithm 
   A Liouvillian solution exists 
   Group is reducible or imprimitive 
<- Kovacics algorithm successful
 
2.35.24.3 Mathematica. Time used: 0.194 (sec). Leaf size: 82
ode=D[y[x],{x,2}]+(2*a*Exp[\[Lambda]*x]+b)*D[y[x],x]+(a^2*Exp[2*\[Lambda]*x]+a*(b+\[Lambda])*Exp[\[Lambda]*x]+c)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\left (c_2 e^{x \sqrt {b^2-4 c}}+c_1 \sqrt {b^2-4 c}\right ) e^{-\frac {a e^{\lambda x}}{\lambda }-\frac {1}{2} x \left (\sqrt {b^2-4 c}+b\right )}}{\sqrt {b^2-4 c}} \end{align*}
2.35.24.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq((2*a*exp(lambda_*x) + b)*Derivative(y(x), x) + (a**2*exp(2*lambda_*x) + a*(b + lambda_)*exp(lambda_*x) + c)*y(x) + Derivative(y(x), (x, 2)),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')