# Cauchy–Euler equation

In mathematics, an Euler–Cauchy equation, or Cauchy–Euler equation, or simply Euler's equation, is a linear homogeneous ordinary differential equation with variable coefficients. It is sometimes referred to as an equidimensional equation. Because of its particularly simple equidimensional structure, the differential equation can be solved explicitly.

## The equation

Let y$^{(n)}$(x) be the nth derivative of the unknown function y(x). Then a Cauchy–Euler equation of order n has the form $a_{n}x^{n}y^{(n)}(x)+a_{n-1}x^{n-1}y^{(n-1)}(x)+\dots +a_{0}y(x)=0.$
The substitution $x=e^{u}$ (that is, $u=\ln(x)$; for $x<0$, in which one might replace all instances of $x$ by $|x|$, extending the solution's domain to $\mathbb {R} \setminus \{0\}$) can be used to reduce this equation to a linear differential equation with constant coefficients. Alternatively, the trial solution $y=x^{m}$ can be used to solve the equation directly, yielding the basic solutions.

### Second order – solving through trial solution

The most common Cauchy–Euler equation is the second-order equation, which appears in a number of physics and engineering applications, such as when solving Laplace's equation in polar coordinates. The second order Cauchy–Euler equation is
$x^{2}{\frac {d^{2}y}{dx^{2}}}+ax{\frac {dy}{dx}}+by=0.$
We assume a trial solution $y=x^{m}.$
Differentiating gives ${\frac {dy}{dx}}=mx^{m-1}$ and ${\frac {d^{2}y}{dx^{2}}}=m\left(m-1\right)x^{m-2}.$
Substituting into the original equation leads to requiring that $x^{2}\left(m\left(m-1\right)x^{m-2}\right)+ax\left(mx^{m-1}\right)+b\left(x^{m}\right)=0$
Rearranging and factoring gives the indicial equation $m^{2}+\left(a-1\right)m+b=0.$
We then solve for m. There are three cases of interest:
* Case 1 of two distinct roots, m$_1$ and m$_2$;
* Case 2 of one real repeated root, m;
* Case 3 of complex roots, α ± βi.
In case 1, the solution is $y=c_{1}x^{m_{1}}+c_{2}x^{m_{2}}$
In case 2, the solution is $y=c_{1}x^{m}\ln(x)+c_{2}x^{m}$
To get to this solution, the method of reduction of order must be applied, after having found one solution y = x$^m$.
In case 3, the solution is $y=c_{1}x^{\alpha }\cos(\beta \ln(x))+c_{2}x^{\alpha }\sin(\beta \ln(x))$ $\alpha =\operatorname {Re} (m)$ $\beta =\operatorname {Im} (m)$
For $c_{1},c_{2}\in \mathbb {R}$.
This form of the solution is derived by setting x = e$^t$ and using Euler's formula.

### Second order – solution through change of variables

$x^{2}{\frac {d^{2}y}{dx^{2}}}+ax{\frac {dy}{dx}}+by=0$
We operate the variable substitution defined by
$t=\ln(x).$ $y(x)=\varphi (\ln(x))=\varphi (t).$
Differentiating gives ${\frac {dy}{dx}}={\frac {1}{x}}{\frac {d\varphi }{dt}}$ ${\frac {d^{2}y}{dx^{2}}}={\frac {1}{x^{2}}}\left({\frac {d^{2}\varphi }{dt^{2}}}-{\frac {d\varphi }{dt}}\right).$
Substituting $\varphi (t)$ the differential equation becomes ${\frac {d^{2}\varphi }{dt^{2}}}+(a-1){\frac {d\varphi }{dt}}+b\varphi =0.$
This equation in $\varphi (t)$ is solved via its characteristic polynomial $\lambda ^{2}+(a-1)\lambda +b=0.$
Now let $\lambda _{1}$ and $\lambda _{2}$ denote the two roots of this polynomial. We analyze the case in which there are distinct roots and the case in which there is a repeated root:
If the roots are distinct, the general solution is $\varphi (t)=c_{1}e^{\lambda _{1}t}+c_{2}e^{\lambda _{2}t},$ where the exponentials may be complex.
If the roots are equal, the general solution is $\varphi (t)=c_{1}e^{\lambda _{1}t}+c_{2}te^{\lambda _{1}t}.$
In both cases, the solution $y(x)$ can be found by setting $t=\ln(x)$.
Hence, in the first case, $y(x)=c_{1}x^{\lambda _{1}}+c_{2}x^{\lambda _{2}},$ and in the second case, $y(x)=c_{1}x^{\lambda _{1}}+c_{2}\ln(x)x^{\lambda _{1}}.$

### Second order - solution using differential operators

Observe that we can write the second-order Cauchy-Euler equation in terms of a linear differential operator $L$ as $Ly=(x^{2}D^{2}+axD+bI)y=0,$ where $D={\frac {d}{dx}}$ and $I$ is the identity operator.
We express the above operator as a polynomial in $xD$, rather than $D$. By the product rule, $(xD)^{2}=xD(xD)=x(D+xD^{2})=x^{2}D^{2}+xD.$ So, $L=(xD)^{2}+(a-1)(xD)+bI.$
We can then use the quadratic formula to factor this operator into linear terms. More specifically, let $\lambda _{1},\lambda _{2}$ denote the (possibly equal) values of $-{\frac {a-1}{2}}\pm {\frac {1}{2}}{\sqrt {(a-1)^{2}-4b}}.$ Then, $L=(xD-\lambda _{1}I)(xD-\lambda _{2}I).$
It can be seen that these factors commute, that is $(xD-\lambda _{1}I)(xD-\lambda _{2}I)=(xD-\lambda _{2}I)(xD-\lambda _{1}I)$. Hence, if $\lambda _{1}\neq \lambda _{2}$, the solution to $Ly=0$ is a linear combination of the solutions to each of $(xD-\lambda _{1}I)y=0$ and $(xD-\lambda _{2}I)y=0$, which can be solved by separation of variables.
Indeed, with $i\in \{1,2\}$, we have $(xD-\lambda _{i}I)y=x{\frac {dy}{dx}}-\lambda _{i}y=0$. So, ${\begin{aligned}x{\frac {dy}{dx}}&=\lambda _{i}y\\\int {\frac {1}{y}}\,dy&=\lambda _{i}\int {\frac {1}{x}}\,dx\\\ln y&=\lambda _{i}\ln x+C\\y&=c_{i}e^{\lambda _{i}\ln x}=c_{i}x^{\lambda _{i}}.\end{aligned}}$ Thus, the general solution is $y=c_{1}x^{\lambda _{1}}+c_{2}x^{\lambda _{2}}$.
If $\lambda =\lambda _{1}=\lambda _{2}$, then we instead need to consider the solution of $(xD-\lambda I)^{2}y=0$. Let $z=(xD-\lambda I)y$, so that we can write $(xD-\lambda I)^{2}y=(xD-\lambda I)z=0.$ As before, the solution of $(xD-\lambda I)z=0$ is of the form $z=c_{1}x^{\lambda }$. So, we are left to solve $(xD-\lambda I)y=x{\frac {dy}{dx}}-\lambda y=c_{1}x^{\lambda }.$ We then rewrite the equation as ${\frac {dy}{dx}}-{\frac {\lambda }{x}}y=c_{1}x^{\lambda -1},$ which one can recognize as being amenable to solution via an integrating factor.
Choose $M(x)=x^{-\lambda }$ as our integrating factor. Multiplying our equation through by $M(x)$ and recognizing the left-hand side as the derivative of a product, we then obtain ${\begin{aligned}{\frac {d}{dx}}(x^{-\lambda }y)&=c_{1}x^{-1}\\x^{-\lambda }y&=\int c_{1}x^{-1}\,dx\\y&=x^{\lambda }(c_{1}\ln(x)+c_{2})\\&=c_{1}\ln(x)x^{\lambda }+c_{2}x^{\lambda }.\end{aligned}}$

### Example

Given $x^{2}u''-3xu'+3u=0\,,$ we substitute the simple solution x$^m$: $x^{2}\left(m\left(m-1\right)x^{m-2}\right)-3x\left(mx^{m-1}\right)+3x^{m}=m\left(m-1\right)x^{m}-3mx^{m}+3x^{m}=\left(m^{2}-4m+3\right)x^{m}=0\,.$
For x$^m$ to be a solution, either x = 0, which gives the trivial solution, or the coefficient of x$^m$ is zero. Solving the quadratic equation, we get m = 1, 3. The general solution is therefore
    $u=c_{1}x+c_{2}x^{3}\,.$

## Difference equation analogue

There is a difference equation analogue to the Cauchy–Euler equation. For a fixed m > 0, define the sequence f$_m$(n) as $f_{m}(n):=n(n+1)\cdots (n+m-1).$
Applying the difference operator to $f_{m}$, we find that ${\begin{aligned}Df_{m}(n)&=f_{m}(n+1)-f_{m}(n)\\&=m(n+1)(n+2)\cdots (n+m-1)={\frac {m}{n}}f_{m}(n).\end{aligned}}$
If we do this k times, we find that ${\begin{aligned}f_{m}^{(k)}(n)&={\frac {m(m-1)\cdots (m-k+1)}{n(n+1)\cdots (n+k-1)}}f_{m}(n)\\&=m(m-1)\cdots (m-k+1){\frac {f_{m}(n)}{f_{k}(n)}},\end{aligned}}$
where the superscript $^{(k)}$ denotes applying the difference operator k times. Comparing this to the fact that the k-th derivative of x$^m$ equals $m(m-1)\cdots (m-k+1){\frac {x^{m}}{x^{k}}}$ suggests that we can solve the N-th order difference equation $f_{N}(n)y^{(N)}(n)+a_{N-1}f_{N-1}(n)y^{(N-1)}(n)+\cdots +a_{0}y(n)=0,$ in a similar manner to the differential equation case. Indeed, substituting the trial solution $y(n)=f_{m}(n)$ brings us to the same situation as the differential equation case, $m(m-1)\cdots (m-N+1)+a_{N-1}m(m-1)\cdots (m-N+2)+\dots +a_{1}m+a_{0}=0.$
One may now proceed as in the differential equation case, since the general solution of an N-th order linear difference equation is also the linear combination of N linearly independent solutions. Applying reduction of order in case of a multiple root m$_1$ will yield expressions involving a discrete version of ln, $\varphi (n)=\sum _{k=1}^{n}{\frac {1}{k-m_{1}}}.$
(Compare with: ln⁡(x−m$_1$)=∫$_{1+m1}$$^x$ dt/t−m$_1$.{\textstyle \ln(x-m_{1})=\int _{1+m_{1}}^{x}{\frac {dt}{t-m_{1}}}.})
In cases where fractions become involved, one may use $f_{m}(n):={\frac {\Gamma (n+m)}{\Gamma (n)}}$ instead (or simply use it in all cases), which coincides with the definition before for integer m.