2.34.23 Problem 261

2.34.23.1 second order ode non constant coeff transformation on B
2.34.23.2 Maple
2.34.23.3 Mathematica
2.34.23.4 Sympy

Internal problem ID [13921]
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.2-8. Other equations.
Problem number : 261
Date solved : Sunday, January 18, 2026 at 09:34:22 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

2.34.23.1 second order ode non constant coeff transformation on B

0.453 (sec)

\begin{align*} \left (x^{n} a +b \,x^{m}+c \right ) y^{\prime \prime }+\left (\lambda -x \right ) y^{\prime }+y&=0 \\ \end{align*}
Entering second order ode non constant coeff transformation on \(B\) solverGiven an ode of the form
\begin{align*} A y^{\prime \prime } + B y^{\prime } + C y &= F(x) \end{align*}

This method reduces the order ode the ODE by one by applying the transformation

\begin{align*} y&= B v \end{align*}

This results in

\begin{align*} y' &=B' v+ v' B \\ y'' &=B'' v+ B' v' +v'' B + v' B' \\ &=v'' B+2 v'+ B'+B'' v \end{align*}

And now the original ode becomes

\begin{align*} A\left ( v'' B+2v'B'+ B'' v\right )+B\left ( B'v+ v' B\right ) +CBv & =0\\ ABv'' +\left ( 2AB'+B^{2}\right ) v'+\left (AB''+BB'+CB\right ) v & =0 \tag {1} \end{align*}

If the term \(AB''+BB'+CB\) is zero, then this method works and can be used to solve

\[ ABv''+\left ( 2AB' +B^{2}\right ) v'=0 \]
By Using \(u=v'\) which reduces the order of the above ode to one. The new ode is
\[ ABu'+\left ( 2AB'+B^{2}\right ) u=0 \]
The above ode is first order ode which is solved for \(u\). Now a new ode \(v'=u\) is solved for \(v\) as first order ode. Then the final solution is obtain from \(y=Bv\).

This method works only if the term \(AB''+BB'+CB\) is zero. The given ODE shows that

\begin{align*} A &= x^{n} a +b \,x^{m}+c\\ B &= \lambda -x\\ C &= 1\\ F &= 0 \end{align*}

The above shows that for this ode

\begin{align*} AB''+BB'+CB &= \left (x^{n} a +b \,x^{m}+c\right ) \left (0\right ) + \left (\lambda -x\right ) \left (-1\right ) + \left (1\right ) \left (\lambda -x\right ) \\ &=0 \end{align*}

Hence the ode in \(v\) given in (1) now simplifies to

\begin{align*} \left (x^{n} a +b \,x^{m}+c \right ) \left (\lambda -x \right ) v'' +\left ( -2 x^{n} a -2 b \,x^{m}-2 c +\left (\lambda -x \right )^{2}\right ) v' & =0 \end{align*}

Now by applying \(v'=u\) the above becomes

\begin{align*} \left (x^{n} a +b \,x^{m}+c \right ) \left (\lambda -x \right ) u^{\prime }\left (x \right )-2 \left (x^{n} a +b \,x^{m}-\frac {x^{2}}{2}+\lambda x -\frac {\lambda ^{2}}{2}+c \right ) u \left (x \right ) = 0 \end{align*}

Which is now solved for \(u\). Entering first order ode linear solverIn canonical form a linear first order is

\begin{align*} u^{\prime }\left (x \right ) + q(x)u \left (x \right ) &= p(x) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(x) &=-\frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}\\ p(x) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int -\frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x}\\ &= {\mathrm e}^{\int -\frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \mu u &= 0 \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (u \,{\mathrm e}^{\int -\frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x}\right ) &= 0 \end{align*}

Integrating gives

\begin{align*} u \,{\mathrm e}^{\int -\frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x}&= \int {0 \,dx} + c_1 \\ &=c_1 \end{align*}

Dividing throughout by the integrating factor \({\mathrm e}^{\int -\frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x}\) gives the final solution

\[ u \left (x \right ) = {\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1 \]
The ode for \(v\) now becomes
\[ v^{\prime }\left (x \right ) = {\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1 \]
Which is now solved for \(v\). Entering first order ode quadrature solverSince the ode has the form \(v^{\prime }\left (x \right )=f(x)\), then we only need to integrate \(f(x)\).
\begin{align*} \int {dv} &= \int {{\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1\, dx}\\ v \left (x \right ) &= \int {\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1 d x + c_2 \end{align*}
\begin{align*} v \left (x \right )&= \int {\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1 d x +c_2 \end{align*}

Replacing \(v \left (x \right )\) above by \(\frac {y}{\lambda -x}\), then the solution becomes

\begin{align*} y(x) &= B v\\ &= \left (\int {\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1 d x +c_2 \right ) \left (\lambda -x \right ) \end{align*}

Summary of solutions found

\begin{align*} y &= \left (\int {\mathrm e}^{\int \frac {-2 x^{n} a -2 b \,x^{m}+\lambda ^{2}-2 \lambda x +x^{2}-2 c}{\left (x^{n} a +b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x} c_1 d x +c_2 \right ) \left (\lambda -x \right ) \\ \end{align*}
2.34.23.2 Maple. Time used: 0.076 (sec). Leaf size: 68
ode:=(a*x^n+b*x^m+c)*diff(diff(y(x),x),x)+(lambda-x)*diff(y(x),x)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left (\int {\mathrm e}^{\int \frac {-2 a \,x^{n}-2 b \,x^{m}-2 c +x^{2}-2 \lambda x +\lambda ^{2}}{\left (a \,x^{n}+b \,x^{m}+c \right ) \left (-\lambda +x \right )}d x}d x c_1 +c_2 \right ) \left (\lambda -x \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 an equivalence, under non-integer power transformations, 
   to LODEs admitting Liouvillian solutions. 
-> Trying a solution in terms of special functions: 
   -> Bessel 
   -> elliptic 
   -> Legendre 
   -> Whittaker 
      -> hyper3: Equivalence to 1F1 under a power @ Moebius 
   -> hypergeometric 
      -> heuristic approach 
      -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
   -> Mathieu 
      -> Equivalence to the rational form of Mathieu ODE under a power @ Moebi\ 
us 
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power \ 
@ Moebius 
-> 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 
<- unable to find a useful change of variables 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   trying differential order: 2; exact nonlinear 
   trying symmetries linear in x and y(x) 
   <- linear symmetries successful
 
2.34.23.3 Mathematica
ode=(a*x^n+b*x^m+c)*D[y[x],{x,2}]+(\[Lambda]-x)*D[y[x],x]+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

2.34.23.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
lambda_ = symbols("lambda_") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq((lambda_ - x)*Derivative(y(x), x) + (a*x**n + b*x**m + c)*Derivative(y(x), (x, 2)) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : Symbol object cannot be interpreted as an integer
 
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')