# Preface

This section presents a class of variable coefficient equations that admit closed form solutions---the Euler equations (also known as equidimensional equations).

# Euler equations

Linear differential equations with variable coefficients rarely have explicit solutions expressed via familiar functions. However, there is a special class of variable coefficient linear differential equations where explicit solutions are not difficult to obtain. They were discovered by Leonhard Euler (1707--1783).
The n-th order homogeneous Euler differential equation is an equation of the form
\begin{equation} \label{EqEuler.1} a_n x^n y^{(n)} + a_{n-1} x^{n-1} y^{(n-1)} + \cdots + a_1 x\,y' + a_0 y =0 \qquad (a_n \ne 0) , \end{equation}
where $$a_0 , a_1 , \ldots , a_n$$ are some real constants and $$y^{(k)} (x) = {\text d}^k y/{\text d}x^k$$ is the kth derivative. The general inhomogeneous Euler equation is
\begin{equation} \label{EqEuler.2} a_n x^n y^{(n)} + a_{n-1} x^{n-1} y^{(n-1)} + \cdots + a_1 x\,y' + a_0 y = f(x) \qquad (a_n \ne 0) , \end{equation}
where f(x) is a given function.
This equations are also known Cauchy--Euler equation or Euler--Cauchy equations. The most common term for these equations is the equidimensional equation because products of powers of x and corresponding derivatives, $$x^k y^{(k)} \ k = 0,1,2,\ldots ,$$ have the same units as the function y(x). This keeps the coefficients $$a_0 , a_1 , \ldots , a_n$$ dimensionless. Since the leading coefficient in equation \eqref{EqEuler.2} is 0 when x = 0, this point is a singular point for Euler's equation; this forces us to consider Euler's differential equation in domains not containing the origin: either for x > 0 or x < 0. As we will see in the following examples, initial value problems with initial conditions specified at the origin are ill-posed: their solutions either do not exist or have infinite many solutions.

Euler's equations can be generalized as

\begin{equation} \label{EqEuler.3} a_n \left( \alpha x + \beta \right)^n y^{(n)} + a_{n-1} \left( \alpha x + \beta \right)^{n-1} y^{(n-1)} + \cdots + a_1 \left( \alpha x + \beta \right) y' + a_0 y =0 \qquad (a_n \ne 0) , \end{equation}
with some real numbers α and β. Upon changing independent variable t = αx + β equidimensional equation \eqref{EqEuler.3} can be transferred into standard Euler's equation \eqref{EqEuler.1} having singular point at the origin instead of −β/α.

When n = 2, Euler's homogeneous equation can be written as

\begin{equation} \label{EqEuler.4} a\,x^2 y'' + b\,x\, y' + c\,y =0 \qquad (x > 0), \end{equation}
for some real constants $$a, b, c .$$ Euler's equation can be solved explicitly by substitution t = ln|x| > 0, or
$x = \begin{cases} e^t , & \ \mbox{ if } \ x > 0, \\ e^{-t} , & \ \mbox{ if } \ x < 0. \end{cases}$
Then
\begin{align*} \frac{{\text d}y}{{\text d} x} &= \frac{{\text d}y}{{\text d} t} \, \frac{{\text d}t}{{\text d} x} = \frac{{\text d}y}{{\text d} t} \,\frac{1}{x} , \\ \frac{{\text d}^2 y}{{\text d} x^2} &= \frac{{\text d}}{{\text d} x} \left( \frac{{\text d}y}{{\text d} t} \,\frac{1}{x} \right) = \frac{{\text d}^2 y}{{\text d} t^2} \,\frac{1}{x^2} - \frac{{\text d}y}{{\text d} t} \,\frac{1}{x^2} . \end{align*}
Substituting these expressions into Euler's homogeneous equation \eqref{EqEuler.3}, we get
$a\,x^2 \left[ \frac{{\text d}^2 y}{{\text d} t^2} \,\frac{1}{x^2} - \frac{{\text d}y}{{\text d} t} \,\frac{1}{x^2} \right] + b\,x \left[ \frac{{\text d}y}{{\text d} t} \,\frac{1}{x} \right] + c\, y = 0.$
Upon canceling the common multiple x², we have constant coefficient differential equation
$a\,\frac{{\text d}^2 y}{{\text d} t^2} + \left( b-a \right) \frac{{\text d}y}{{\text d} t} + c\, y = 0.$
Thus, we get a constant coefficient differential equation for which we know everything from the previous discussion in Part IV: of this tutorial. The characteristic equation for the above constant coefficient differential equation
\begin{equation} \label{EqEuler.5} a\,\nu^2 + \left( b - a \right) \nu + c = 0 \end{equation}
is called the indicial equation for the Euler homogeneous equation \eqref{EqEuler.3}.

Euler's equation \eqrefl{EqEuler.1} can also be solved by trial solution y = xν. Upon substituting it into the differential equation \eqrefl{EqEuler.3}, we get
$a\, \nu \left( \nu-1 \right) x^2 x^{\nu -2} + b\,\nu\,x^{\nu} + c\,x^{\nu} =0 .$
Canceling the common multiple xν, we get the indicial equation
$P(\nu ) = a\, \nu\left( \nu -1 \right) + b\, \nu + c = 0.$
If roots ν1 and ν2 of the indicial equation are distinct real numbers, then the general solution of Euler's equation is given by
$y(x) = C_1 |x|^{\nu_1} + C_2 |x|^{\nu_2}$
for some arbitrary real constants C1 and C2. If the roots ν1 and ν2 are equal (ν1 = ν2), then the general solution of Euler's equation is given by
$y(x) = C_1 |x|^{\nu_1} + C_2 |x|^{\nu_1} \,\ln |x| .$
If roots ν1 and ν2 of the indicial equation are complex numbers, then the general solution of Euler's equation is
$y(x) = \left[ C_1 \cos \left( \beta\,\ln |x| \right) + C_2 \sin \left( \beta\,\ln |x| \right) \right] |x|^{\alpha} ,$
where
$\alpha = \frac{a-b}{2a} \qquad\mbox{and} \qquad \beta = \frac{\sqrt{4ac - (b-a)^2}}{2a} .$
We summarize properties of this equation in the following table.
Solutions of the indicial equation  Fundamental set of solutions
Simple roots m1, m2  $$y_1 = x^{m_1} , \ y_2 = x^{m_2} , \ldots$$
Double roots $$m_1 = m_2$$  $$y_1 = x^{m_1} , \ y_2 = x^{m_1} \ln x$$
Triple roots $$m_1 = m_2 = m_3$$  $$y_1 = x^{m_1} , \ y_2 = x^{m_1} \ln x , \ y_3 = x^{m_1} \left( \ln x \right)^2$$
Complex roots $$m_1 = \overline{m_2} = \alpha + \beta {\bf j}$$  $$y_1 = x^{m_1} \cos \left( \beta\,\ln x \right) , \ y_2 = x^{m_1} \sin \left( \beta\,\ln x \right)$$

Example 1: Consider the differential equation

$\frac{{\text d}^2 y}{{\text d} x^2} + \frac{2}{x}\,\frac{{\text d}y}{{\text d}x} - \frac{6}{x^2} \, y = 0 .$
The corresponding indicial equation
$\nu^2 + \nu -6 =0$
has two distinct real roots ν1 = 3 and ν = −2. Therefore, the given Euler equation has the general solution:
$y(x) = C_1 x^3 + C_2 \frac{1}{x^2} ,$
where C1 and C2 are arbitrary constants.    ■

Example 2: Consider the initial value problem

$3\,x^2 y'' -7\,x\,y' + 7\,y = 0, \qquad y(0) = a, \quad y' (0) = b,$
where 𝑎 and b are some real numbers. Note that both initial conditions are specified at the singular point x = 0. Substituting for y(x) = xm, we get an indicial equation
$3 \left( m^2 - m \right) -7\,m + 7 = 0 .$
It has two distinct real roots m = 1 and m = 7/3. Therefore, the given Euler equation has the general solution:
$y(x) = C_1 x^{7/3} + C_2 \, x ,$
where C1 and C2 are arbitrary constants. To satisfy the initial conditions, we have to solve the system of equations
$C_1 0 + c_2 0 = a, \qquad C_2 = b .$
So 𝑎 must be zero and the given initial value problem has one-parameter set of solutions
$y (x) = C_1 x^{7/3} + b\, x .$
Note that if the arbitrary real constant C1 ≠ 0, its solution is not analytic.    ■

Example 3: Consider the differential equation

$\frac{{\text d}^2 y}{{\text d} x^2} - \frac{3}{x}\,\frac{{\text d}y}{{\text d}x} + \frac{4}{x^2} \, y = 0 .$
The corresponding indicial equation
$\nu^2 -4\, \nu +4 =0$
has one double root ν = 2. Therefore, the given Euler equation has the general solution:
$y(x) = C_1 |x|^2 + C_2 |x|^2 \,\ln |x| ,$
where C1 and C2 are arbitrary constants.    ■

Example 4: Consider the differential equation

$\frac{{\text d}^2 y}{{\text d} x^2} - \frac{1}{x}\,\frac{{\text d}y}{{\text d}x} + \frac{5}{x^2} \, y = 0 .$
The corresponding indicial equation
$\nu^2 -2\, \nu +5 =0$
has two complex conjugate roots ν± = -1 ± 2. The the general solution of the given Euler's equation is
$y(x) = \left[ C_1 \cos \left( 2\ln |x| \right) + C_2 \sin \left( 2\ln |x| \right) \right] |x|^{-1} = \left[ C_1 \cos \left( \ln x^2 \right) + C_2 \sin \left( \ln x^2 \right) \right] |x|^{-1} ,$
where C1 and C2 are arbitrary constants.    ■

Example 5:    ■

Singularities of Euler's Equation

Euler's equation \eqref{EqEuler.1} has a regular singular point at the origin because the leading coefficient vanishes at that point. Usually, its solution does not exist (unless the indicial equation has positive integer roots) in a neighborhood |x| < ρ (for some positive ρ) of the origin x = 0. Therefore, the initial conditions at x = 0 are not suitable for Euler's equations because existence and uniqueness theorems fail in this case. However, one condition at x = 0 can be imposed considering it as a boundary condition on some interval, say (0, ℓ), where ℓ ≤ ∞.

There is generally another singularity at the point at infinity in the complex plane ℂ, whose nature is found by mapping the point at infinity to the origin via substitution x = 1/t. The change of variable of differentiation has the effect

\begin{align*} \frac{{\text d}y}{{\text d}x} &= -t^2 \frac{{\text d}u(t)}{{\text d}t} = -t^2 \dot{u} \\ \frac{{\text d}^2 y}{{\text d}x^2} &= t^4 \frac{{\text d}^2 u(t)}{{\text d}t^2} + 2 t^3 \frac{{\text d}u(t)}{{\text d}t} = t^4 \ddot{u} + 2 t^3 \dot{u} , \end{align*}
where u(t) = y(t-1). Then the second order Euler's equation \eqref{EqEuler.4} becomes
\begin{equation} \label{EqInfty.1} a t^2 \frac{{\text d}^2 u(t)}{{\text d}t^2} + \left( 2a -b \right) t\, \frac{{\text d}u(t)}{{\text d}t} + c\, u = 0, \end{equation}
and the singularity at infinity is seen to be regular. For a regular singular point at infinity, the approximation is written in terms of an inverse power x−1 with the indicial equation
\begin{equation} \label{EqInfty.2} a\lambda \left( \lambda +1 \right) - b\,\lambda + c = 0 . \end{equation}

Example 6: We consider several typical cases and analyze the behavior of solutions to Euler's equations at infinity.

Example 6A: Euler's equation

$x^2 y'' + 5x\,y' + 3\,y = 0$
has the general solution
$y = C_1 x^{-1} + C_2 x^{-3} ,$
with some arbitrary constants C1 and C2 because its indicial equation ν² + 4ν + 3 = 0 has two real roots ν = −1 and ν = −3.

For regular singular point at infinity, we make substitution x = t−1, which leads to

$t^2 \ddot{u} -4\,\dot{u} + 3\, u = 0.$
Its indicial equation λ² &mimus;4λ + 3 = 0 has two real roots λ = 1 and λ = 3. Therefore, at infinity the solution behaves as
$u(t) = C_1 t + C_2 t^3 \qquad \Longrightarrow \qquad y = C_1 x^{-1} + C_2 x^{-3} .$

Example 6B: Euler's equation

$x^2 y'' + 7x\,y' + 9\,y = 0$
has the general solution
$y (x) = C_1 x^{-3} + C_2 x^{-3} \ln x .$
The corresponding indicial equation ν² + 6ν + 9 = (ν +3)² = 0 has one double root ν = −3.

Upon substitution x = t−1, we obtain

$t^2 \ddot{u} -5\,\dot{u} + 9\,u = 0 , \qquad u(t) = y \left( x^{-1} \right) .$
The corresponding indicial equation
$\lambda \left( \lambda + 1 \right) - 7\,\lambda + 9 = 0$
has one double root λ = 3, and the general solution around infinity has the form
$u(t) = C_1 t^3 + C_2 t^3 \ln t \qquad Longrightarrow \qquad y(x) = u\left( x^{-1}\right) = C_1 x^{-3} + C_2 x^{-3} \ln x .$

Example 6C: The inicial equation ν² + 4ν + 13 = 0 for Euler's equation

$x^2 y'' +5x\,y' + 13\,y = 0$
has two complex conjugate roots ν = −2 ±3j, where j is the unit vector in the positive vertical direction on the complex plane ℂ, with j² = −1. Hence its general solution becomes
$y (x) = C_1 x^{-2} \cos \left( 3\ln x \right) + C_2 x^{-2} \sin \left( 3\ln x \right) .$
Upon transformation x = t−1, we obtain
$t^2 \ddot{u} + t \left( 2 - 5 \right) \dot{u} + 13\, u = 0 .$
The corresponding indicial equation
$\lambda \left( \lambda + 1 \right) - 5 \lambda + 13 =0$
has two complex conjugate roots λ = −2 ±3j. So its general solution around infinity is
$y(x) = u\left( x^{-1} \right) = C_1 t^2 \cos \left( 3 \ln t \right) + C_2 t^2 \sin \left( 3 \ln t \right) = C_1 x^{-2} \cos \left( 3\ln x \right) + C_2 x^{-2} \sin \left( 3\ln x \right) .$
■

Factorization of Euler's Equation

Euler's operator (of second order) can be factorized as follows
\begin{equation} \label{EqEuler.6} L \left[ x,\texttt{D} \right] = x^{-m-n} \texttt{D} x^m \,\texttt{D} \left[ \left( \cdot \right) \right] = \texttt{D}^2 + \frac{2n+m}{x}\,\texttt{D} + \frac{n(m+n-1)}{x^2}\,\texttt{I} , \end{equation}
where m, n are some real numbers, and
$\texttt{D} = \frac{\text d}{{\text d} x} \qquad \mbox{and} \qquad \texttt{I} = \texttt{D}^0$
are the derivative operator and the identical operator, respectively. It is also sometimes convenient to eliminate fractions and consider a similar operator:
\begin{equation} \label{EqEuler.7} L \left[ x,\texttt{D} \right] = x^{-m-n} \texttt{D} x^m \,\texttt{D} \left[ \left( \cdot \right) \right] = \texttt{D}^2 + \frac{2n+m}{x}\,\texttt{D} + \frac{n(m+n-1)}{x^2}\,\texttt{I} , \end{equation}
where m, n are some real numbers, and
$\texttt{D} = \frac{\text d}{{\text d} x} \qquad \mbox{and} \qquad \texttt{I} = \texttt{D}^0$
are the derivative operator and the identical operator, respectively. It is also sometimes convenient to eliminate fractions and consider a similar operator:
\begin{equation} \label{EqEuler.8} L \left[ x,\texttt{D} \right] = x^{-m-n} \texttt{D} x^m \,\texttt{D} \left[ \left( \cdot \right) \right] = \texttt{D}^2 + \frac{2n+m}{x}\,\texttt{D} + \frac{n(m+n-1)}{x^2}\,\texttt{I} , \end{equation}
where m, n are some real numbers, and
$\texttt{D} = \frac{\text d}{{\text d} x} \qquad \mbox{and} \qquad \texttt{I} = \texttt{D}^0$
are the derivative operator and the identical operator, respectively. It is also sometimes convenient to eliminate fractions and consider a similar operator:
\begin{equation} \label{EqEuler.9} x^2 L \left[ x, \texttt{D} \right] = x^{2-m-n} \texttt{D} x^m \,\texttt{D} \left[ x^n \left( \cdot \right) \right] = x^2 \texttt{D}^2 + \left( 2n+m \right) \texttt{D} + n(m+n-1)\,\texttt{I} . \end{equation}
Simplify[D[(x^m)*D[f[x]*x^n, x], x]]
x^(-2 + m + n) (n (-1 + m + n) f[x] + x ((m + 2 n) Derivative[f][x] + x (f^$Prime]\[Prime])[x])) General equidimensional operator of the second order also can be factorized: \begin{equation} \label{EqEuler.10} \left( \alpha x + \beta \right)^2 L \left[ x, \texttt{D} \right] = \left( \alpha x + \beta \right)^{2-m-n} \texttt{D} \left( \alpha x + \beta \right)^m \,\texttt{D} \left( \alpha x + \beta \right)^n \left[ \left( \cdot \right) \right] = \left( \alpha x + \beta \right)^2 \texttt{D}^2 + \alpha \left( \alpha x + \beta \right) \left( 2n+m \right) \texttt{D} + \alpha^2 \left( \alpha x + \beta \right)^2 n(m+n-1)\,\texttt{I} . \end{equation} We want to express an arbitrary Euler's operator \[ L \left[ x, \texttt{D} \right] = \frac{{\text d}^2}{{\text d}x^2} + \frac{p}{x}\,\frac{{\text d}}{{\text d}x} + \frac{q}{x^2} = \texttt{D}^2 + \frac{p}{x}\, \texttt{D} + \frac{q}{x^2}\, \texttt{I} ,$
where p and q are some real numbers, in the factorized form. Therefore, we need to solve the system of algebraic equations:
$\begin{cases} p &= m+2n , \\ q &= n \left( n+m-1 \right) , \end{cases} \qquad \Longrightarrow \qquad \begin{cases} n&= \frac{1}{2} \left[ p-1 \pm \sqrt{(1-p)^2 - 4\,q} \right] , \\ m &= 1 \pm \sqrt{(p-1)^2 - 4\,q} . \end{cases}$
Solve[{p == 2*n + m, q == n*(n + m - 1)}, {n, m}]
{{n -> 1/2 (-1 + p - Sqrt[1 - 2 p + p^2 - 4 q]), m -> 1 + Sqrt[1 - 2 p + p^2 - 4 q]}, {n -> 1/2 (-1 + p + Sqrt[1 - 2 p + p^2 - 4 q]), m -> 1 - Sqrt[1 - 2 p + p^2 - 4 q]}}
Therefore, the Euler operator admits factorization only when
\begin{equation} \label{EqEuler.11} (p-1)^2 \ge 4\,q . \end{equation}
Otherwise, the factorization system of algebraic equations leads to complex roots that we do not consider. Note that factorization \eqref{EqEuler.8} or \eqref{EqEuler.10} is not unique. The value n in these formulas is one of the roots of the indicial equation.

Example 7: Consider the singular differential operator

$L \left[ x,\texttt{D} \right] = \frac{{\text d}^2}{{\text d} x^2} + \frac{5}{x}\,\frac{{\text d}}{{\text d}x} = \texttt{D}^2 + \frac{5}{x}\,\texttt{D} .$
$L \left[ x,\texttt{D} \right] = x^{-5} \texttt{D}\, x^5 \,\texttt{D} .$
To find its inverse, we need to solve the differential equation
$L \left[ x,\texttt{D} \right] y = w \qquad \Longrightarrow \qquad x^5 \texttt{D}\, y = \left( x^5 \texttt{D}\, y \right)_{x= x_0} + \int_{x_0}^x t^5 w(t)\,{\text d} t .$
Next integration yields
$L^{-1} \left[ x,\texttt{D} \right] w = y\left( x_0 \right) + y' \left( x_0 \right) \frac{1}{4} \left( x_0 - \frac{x_0^5}{x^4} \right) + \int_{x_0}^x s^{-5} {\text d} s \int_{x_0}^s {\text d} t \, t^5 w(t) .$
The double integral can be reduced to one integral by interchanging the order of integration
$L^{-1} \left[ x,\texttt{D} \right] w = y\left( x_0 \right) + y' \left( x_0 \right) \frac{1}{4} \left( x_0 - \frac{x_0^5}{x^4} \right) - \frac{1}{4} \int_{x_0}^x {\text d} t \left( t^5 x^{-4} - t \right) w(t) .$
■

Example 8: Let us consider Euler's equation

$x^2 y'' -x\,y' + y=f(x) ,$
where primes correspond to derivatives: y' = dy/dx. Its indicial equation r² −2r + 1 = 0 has one double root r = 1. Solving the factorization system of equations
$m + 2n = -1, \qquad n \left( m+n-1 \right) = 1 ,$
Solve[{p + 2*q == -1, q*(p + q - 1) == 1}, {p, q}]
{{p -> 1, q -> -1}}
we see that we have the only one factorization for the given Euler's equation:
$x^2 \texttt{D}^2 - x\,\texttt{D} + \texttt{I} = x^2 \texttt{D}\, x\, \texttt{D}\,x \, \texttt{I} .$
Dividing by x², we get
$\texttt{D}\, x\, \texttt{D}\,x \,y = x^{-2} f(x) .$
Integration yields
$x\, \texttt{D}\,x \,y = \int x^{-2} f(x) \,{\text d}x + c_1 \qquad \Longrightarrow \qquad \texttt{D}\,x \,y = x^{-1} \int x^{-2} f(x) \,{\text d}x + c_1 x^{-1} .$
Next integration provides us the general solution in any domain not containing the origin.    ■

Nonhomogeneous Euler Equations

It is convenient to isolate the highest derivative in the Euler equation, which leads to
$\frac{{\text d}^2 y}{{\text d} x^2} + \frac{p}{x}\, \frac{{\text d} y}{{\text d}x} + \frac{q}{x^2}\,y = g(x) ,$
with some real constants p, q, and given function g(x). We denote the left-hand side of the above equation by $$L \left[ y(x) \right] = y'' (x) + p\, y' (x)/x + q\,y(x)/x^2 ,$$ the linear differential operator with variable coefficients. Since it contains the reciprocal of x, the origin x = 0 is a singular point for the Euler equation. This means that we can obtain its solutions either for negative values of the argument, x < 0, or for positive values x > 0. The initial condition can be chosen at any point other than the origin. Therefore, we consider the Euler equations only for positive values x > 0.

1. Dettman, J.W., Power Series Solutions of Ordinary Differential Equations, The American Mathematical Monthly, 1967, Vol. 74, No. 3, pp. 428--430.
2. Grigorieva, E., Methods of Solving Sequence and Series Problems, Birkhäuser; 1st ed. 2016.