2.31.15 Problem 163

2.31.15.1 second order linear exact ode
2.31.15.2 second order integrable as is
2.31.15.3 Maple
2.31.15.4 Mathematica
2.31.15.5 Sympy

Internal problem ID [13824]
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-5
Problem number : 163
Date solved : Thursday, January 01, 2026 at 02:48:01 AM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

2.31.15.1 second order linear exact ode

1.642 (sec)

\begin{align*} \left (x^{2}+a \right ) y^{\prime \prime }+2 b x y^{\prime }+2 \left (b -1\right ) y&=0 \\ \end{align*}
Entering second order linear exact ode solverAn ode of the form
\begin{align*} p \left (x \right ) y^{\prime \prime }+q \left (x \right ) y^{\prime }+r \left (x \right ) y&=s \left (x \right ) \end{align*}

is exact if

\begin{align*} p''(x) - q'(x) + r(x) &= 0 \tag {1} \end{align*}

For the given ode we have

\begin{align*} p(x) &= x^{2}+a\\ q(x) &= 2 b x\\ r(x) &= -2+2 b\\ s(x) &= 0 \end{align*}

Hence

\begin{align*} p''(x) &= 2\\ q'(x) &= 2 b \end{align*}

Therefore (1) becomes

\begin{align*} 2- \left (2 b\right ) + \left (-2+2 b\right )&=0 \end{align*}

Hence the ode is exact. Since we now know the ode is exact, it can be written as

\begin{align*} \left (p \left (x \right ) y^{\prime }+\left (q \left (x \right )-p^{\prime }\left (x \right )\right ) y\right )' &= s(x) \end{align*}

Integrating gives

\begin{align*} p \left (x \right ) y^{\prime }+\left (q \left (x \right )-p^{\prime }\left (x \right )\right ) y&=\int {s \left (x \right )\, dx} \end{align*}

Substituting the above values for \(p,q,r,s\) gives

\begin{align*} \left (x^{2}+a \right ) y^{\prime }+\left (2 b x -2 x \right ) y&=c_1 \end{align*}

We now have a first order ode to solve which is

\begin{align*} \left (x^{2}+a \right ) y^{\prime }+\left (2 b x -2 x \right ) y = c_1 \end{align*}

Entering first order ode linear solverIn canonical form a linear first order is

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

Comparing the above to the given ode shows that

\begin{align*} q(x) &=\frac {2 x \left (b -1\right )}{x^{2}+a}\\ p(x) &=\frac {c_1}{x^{2}+a} \end{align*}

The integrating factor \(\mu \) is

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

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu p \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_1}{x^{2}+a}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (y \left (x^{2}+a \right )^{b -1}\right ) &= \left (\left (x^{2}+a \right )^{b -1}\right ) \left (\frac {c_1}{x^{2}+a}\right ) \\ \mathrm {d} \left (y \left (x^{2}+a \right )^{b -1}\right ) &= \left (\frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}\right )\, \mathrm {d} x \\ \end{align*}
Integrating gives
\begin{align*} y \left (x^{2}+a \right )^{b -1}&= \int {\frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a} \,dx} \\ &=\int \frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}d x + c_2 \end{align*}

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

\[ y = \left (x^{2}+a \right )^{-b +1} \left (\int \frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}d x +c_2 \right ) \]

Summary of solutions found

\begin{align*} y &= \left (x^{2}+a \right )^{-b +1} \left (\int \frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}d x +c_2 \right ) \\ \end{align*}
2.31.15.2 second order integrable as is

0.454 (sec)

\begin{align*} \left (x^{2}+a \right ) y^{\prime \prime }+2 b x y^{\prime }+2 \left (b -1\right ) y&=0 \\ \end{align*}
Entering second order integrable as is solverIntegrating both sides of the ODE w.r.t \(x\) gives
\begin{align*} \int \left (\left (x^{2}+a \right ) y^{\prime \prime }+2 b x y^{\prime }+\left (-2+2 b \right ) y\right )d x &= 0 \\ \left (x^{2}+a \right ) y^{\prime }+\left (2 b x -2 x \right ) y = c_1 \end{align*}

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

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

Comparing the above to the given ode shows that

\begin{align*} q(x) &=\frac {2 x \left (b -1\right )}{x^{2}+a}\\ p(x) &=\frac {c_1}{x^{2}+a} \end{align*}

The integrating factor \(\mu \) is

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

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu p \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_1}{x^{2}+a}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (y \left (x^{2}+a \right )^{b -1}\right ) &= \left (\left (x^{2}+a \right )^{b -1}\right ) \left (\frac {c_1}{x^{2}+a}\right ) \\ \mathrm {d} \left (y \left (x^{2}+a \right )^{b -1}\right ) &= \left (\frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}\right )\, \mathrm {d} x \\ \end{align*}
Integrating gives
\begin{align*} y \left (x^{2}+a \right )^{b -1}&= \int {\frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a} \,dx} \\ &=\int \frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}d x + c_2 \end{align*}

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

\[ y = \left (x^{2}+a \right )^{-b +1} \left (\int \frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}d x +c_2 \right ) \]

Summary of solutions found

\begin{align*} y &= \left (x^{2}+a \right )^{-b +1} \left (\int \frac {c_1 \left (x^{2}+a \right )^{b -1}}{x^{2}+a}d x +c_2 \right ) \\ \end{align*}
2.31.15.3 Maple. Time used: 0.007 (sec). Leaf size: 41
ode:=(x^2+a)*diff(diff(y(x),x),x)+2*b*x*diff(y(x),x)+2*(b-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \left (\frac {x^{2}+a}{a}\right )^{-b +1}+c_2 x \operatorname {hypergeom}\left (\left [1, b -\frac {1}{2}\right ], \left [\frac {3}{2}\right ], -\frac {x^{2}}{a}\right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
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)] 
   One independent solution has integrals. Trying a hypergeometric solution fre\ 
e of integrals... 
   -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
   <- hyper3 successful: received ODE is equivalent to the 2F1 ODE 
   -> Trying to convert hypergeometric functions to elementary form... 
   <- elementary form for at least one hypergeometric solution is achieved - re\ 
turning with no uncomputed integrals 
<- linear_1 successful
 
2.31.15.4 Mathematica. Time used: 0.166 (sec). Leaf size: 64
ode=(x^2+a)*D[y[x],{x,2}]+2*b*x*D[y[x],x]+2*(b-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (a+x^2\right ) \left (\frac {c_2 x \left (\frac {a+x^2}{a}\right )^{-b} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},2-b,\frac {3}{2},-\frac {x^2}{a}\right )}{a^2}+c_1 \left (a+x^2\right )^{-b}\right ) \end{align*}
2.31.15.5 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(2*b*x*Derivative(y(x), x) + (a + x**2)*Derivative(y(x), (x, 2)) + (2*b - 2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False