2.34.5 Problem 243

2.34.5.1 second order ode non constant coeff transformation on B
2.34.5.2 Maple
2.34.5.3 Mathematica
2.34.5.4 Sympy

Internal problem ID [13903]
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 : 243
Date solved : Thursday, January 01, 2026 at 03:59:39 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

2.34.5.1 second order ode non constant coeff transformation on B

1.217 (sec)

\begin{align*} x^{n} y^{\prime \prime }+\left (a x +b \right ) y^{\prime }-a 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}\\ B &= a x +b\\ C &= -a\\ F &= 0 \end{align*}

The above shows that for this ode

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

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

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

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

\begin{align*} x^{n} \left (a x +b \right ) u^{\prime }\left (x \right )+\left (2 x^{n} a +\left (a x +b \right )^{2}\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 {-a^{2} x^{2-n}-2 a b \,x^{-n +1}-2 a -x^{-n} b^{2}}{a x +b}\\ p(x) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int -\frac {-a^{2} x^{2-n}-2 a b \,x^{-n +1}-2 a -x^{-n} b^{2}}{a x +b}d x}\\ &= \left (a x +b \right )^{2} {\mathrm e}^{-\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}} \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 \left (a x +b \right )^{2} {\mathrm e}^{-\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}\right ) &= 0 \end{align*}

Integrating gives

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

Dividing throughout by the integrating factor \(\left (a x +b \right )^{2} {\mathrm e}^{-\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}\) gives the final solution

\[ u \left (x \right ) = \frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}} \]
Simplifying the above gives
\begin{align*} u \left (x \right ) &= \frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}} \\ \end{align*}
The ode for \(v\) now becomes
\[ v^{\prime }\left (x \right ) = \frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}} \]
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 {\frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}}\, dx}\\ v \left (x \right ) &= \int \frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}}d x + c_2 \end{align*}
\begin{align*} v \left (x \right )&= \int \frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}}d x +c_2 \end{align*}

Replacing \(v \left (x \right )\) above by \(\frac {y}{a x +b}\), then the solution becomes

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

Summary of solutions found

\begin{align*} y &= \left (\int \frac {c_1 \,{\mathrm e}^{\frac {\left (x \left (n -1\right ) a +\left (n -2\right ) b \right ) x^{-n +1}}{\left (n -2\right ) \left (n -1\right )}}}{\left (a x +b \right )^{2}}d x +c_2 \right ) \left (a x +b \right ) \\ \end{align*}
2.34.5.2 Maple. Time used: 0.039 (sec). Leaf size: 56
ode:=x^n*diff(diff(y(x),x),x)+(a*x+b)*diff(y(x),x)-a*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left (c_1 \int \frac {{\mathrm e}^{\frac {x^{-n +1} \left (a x \left (-1+n \right )+b \left (-2+n \right )\right )}{\left (-2+n \right ) \left (-1+n \right )}}}{\left (a x +b \right )^{2}}d x +c_2 \right ) \left (a x +b \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.5.3 Mathematica
ode=x^n*D[y[x],{x,2}]+(a*x+b)*D[y[x],x]-a*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

2.34.5.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*y(x) + x**n*Derivative(y(x), (x, 2)) + (a*x + b)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False