2.34.12 Problem 250

2.34.12.1 second order linear exact ode
2.34.12.2 second order integrable as is
2.34.12.3 Maple
2.34.12.4 Mathematica
2.34.12.5 Sympy

Internal problem ID [13910]
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 : 250
Date solved : Thursday, January 01, 2026 at 04:00:15 AM
CAS classification : [[_2nd_order, _with_linear_symmetries], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

2.34.12.1 second order linear exact ode

4.902 (sec)

\begin{align*} \left (x^{n} a +b x +c \right ) y^{\prime \prime }&=a n \left (n -1\right ) x^{n -2} y \\ \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^{n} a +b x +c\\ q(x) &= 0\\ r(x) &= -a n \left (n -1\right ) x^{n -2}\\ s(x) &= 0 \end{align*}

Hence

\begin{align*} p''(x) &= \frac {a \,n^{2} x^{n}}{x^{2}}-\frac {a \,x^{n} n}{x^{2}}\\ q'(x) &= 0 \end{align*}

Therefore (1) becomes

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

We now have a first order ode to solve which is

\begin{align*} \left (x^{n} a +b x +c \right ) y^{\prime }+\left (-\frac {a n \,x^{n}}{x}-b \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 {a n \,x^{n}+b x}{\left (x^{n} a +b x +c \right ) x}\\ p(x) &=\frac {c_1}{x^{n} a +b x +c} \end{align*}

The integrating factor \(\mu \) is

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

Dividing throughout by the integrating factor \(\frac {1}{x^{n} a +b x +c}\) gives the final solution

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

Summary of solutions found

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

0.566 (sec)

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

The integrating factor \(\mu \) is

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

Dividing throughout by the integrating factor \(\frac {1}{x^{n} a +b x +c}\) gives the final solution

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

Summary of solutions found

\begin{align*} y &= \left (x^{n} a +b x +c \right ) \left (\int \frac {c_1}{\left (x^{n} a +b x +c \right )^{2}}d x +c_2 \right ) \\ \end{align*}
2.34.12.3 Maple. Time used: 0.002 (sec). Leaf size: 33
ode:=(a*x^n+b*x+c)*diff(diff(y(x),x),x) = a*n*(n-1)*x^(-2+n)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int \frac {1}{\left (a \,x^{n}+b x +c \right )^{2}}d x c_1 +c_2 \right ) \left (a \,x^{n}+b x +c \right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a symmetry of the form [xi=0, eta=F(x)] 
<- linear_1 successful
 
2.34.12.4 Mathematica
ode=(a*x^n+b*x+c)*D[y[x],{x,2}]==a*n*(n-1)*x^(n-2)*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

2.34.12.5 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*n*x**(n - 2)*(n - 1)*y(x) + (a*x**n + b*x + c)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : Add object cannot be interpreted as an integer