---
title: Cauchy-Euler equations
heading: When the coefficients grow with x, try a power of x
eyebrow: A8 · Lesson 22 · Cauchy-Euler equations
xp: 40
---

::: hook
Between the two conductors of a coaxial cable the potential depends only on the distance $r$ from the axis, and Laplace's equation reduces to $r^2V'' + rV' = 0$. The coefficients aren't constant, so lesson 17's $e^{rt}$ guess fails. But each derivative is multiplied by the matching power of $r$, and that pattern has its own guess: a power, $r^m$. The same equations describe the field around a wire, a spherical capacitor, heat through pipe insulation and the radial part of a drumhead problem, and they're the one family of variable-coefficient equations solved as easily as constant-coefficient ones.
:::

::: play
- The curve is $y = x^{m_1}$ and $y = x^{m_2}$ for the roots of $m(m - 1) + bm + c = 0$, the solutions of $x^2y'' + bxy' + cy = 0$.
- Slide $c$ up until the roots turn complex: the solution starts to oscillate, but in $\ln x$, so each swing takes longer than the last.
:::

```sim plot
view: graph
x: x = 0.1..10 log
y: y = -3..3
slider: b = -1..3 step 0.25 = 1
slider: c = -2..6 step 0.25 = 4
plot: x^((1 - b)/2)*cos(sqrt(abs(c - (b - 1)^2/4))*ln(x))*step(c - (b - 1)^2/4) + x^((1 - b)/2 + sqrt(abs((b - 1)^2/4 - c)))*step((b - 1)^2/4 - c) | label: first solution
readout: discriminant (b − 1)² − 4c = (b - 1)^2 - 4*c | digits: 3
```

::: predict
## Try $y = x^m$ in $x^2y'' - 2y = 0$. Which values of $m$ make it a solution?

- [ ] $m = 0$ and $m = 2$
- [x] $m = 2$ and $m = -1$
- [ ] $m = \pm\sqrt2$
- [ ] No power of $x$ works

::: reveal
$m = 2$ and $m = -1$. With $y = x^m$, $x^2y'' = m(m - 1)x^m$, so the equation becomes $(m(m - 1) - 2)x^m = 0$, and $m^2 - m - 2 = (m - 2)(m + 1) = 0$. Every term carries the same power of $x$, which is why a power works: the $x$'s cancel and leave an equation for $m$ alone.
:::
:::

::: nameit
## The equation and its indicial equation

A **Cauchy-Euler** (or equidimensional) equation has each derivative multiplied by the same power of $x$:

$$ax^2y'' + bxy' + cy = 0 \qquad (x > 0)$$

Putting $y = x^m$ in gives the **indicial equation**

$$am(m - 1) + bm + c = 0$$

## Three cases, like constant coefficients

- **Two real roots** $m_1 \neq m_2$: $y = C_1x^{m_1} + C_2x^{m_2}$.
- **A repeated root** $m$: $y = x^m(C_1 + C_2\ln x)$.
- **Complex roots** $\alpha \pm j\beta$: $y = x^\alpha\left(C_1\cos(\beta\ln x) + C_2\sin(\beta\ln x)\right)$.

## Why logarithms appear

Substitute $x = e^t$. Then $x\,dy/dx = dy/dt$ and $x^2\,d^2y/dx^2 = d^2y/dt^2 - dy/dt$, and the equation becomes $ay_{tt} + (b - a)y_t + cy = 0$, constant coefficients in $t$. Its solutions $e^{mt}$, $te^{mt}$ and $e^{\alpha t}\cos\beta t$ are $x^m$, $x^m\ln x$ and $x^\alpha\cos(\beta\ln x)$. So the three cases are lesson 17's three cases, seen on a logarithmic scale.

## Radial fields

For a field that depends only on distance, Laplace's equation is

- $r^2V'' + rV' = 0$ around a line (cylinders): $m = 0$ twice, so $V = C_1 + C_2\ln r$;
- $r^2V'' + 2rV' = 0$ around a point (spheres): $m = 0, -1$, so $V = C_1 + C_2/r$.
:::

::: example
## A coaxial cable has an inner conductor of radius 1 mm at 100 V and an outer one of radius 3.5 mm at 0 V. Find $V(r)$ and the field at the inner conductor.

::: solution
1. **General solution.** $V = C_1 + C_2\ln r$, with $V(1\ \text{mm}) = 100$ and $V(3.5\ \text{mm}) = 0$, gives
   $$V(r) = 100\,\frac{\ln(3.5\ \text{mm}/r)}{\ln 3.5}$$
2. **The field.**
   $$\begin{aligned} E &= -dV/dr \\ &= \frac{100}{r\ln 3.5} \end{aligned}$$
   which is largest at the inner conductor.
3. **Field at the inner conductor.**
   $$\begin{aligned} E &= \frac{100}{0.001 \times 1.253}\ \text{V/m} \\ &= 79.8\ \text{kV/m} \end{aligned}$$
4. **Where the voltage is half.** Halfway in voltage is at $r = \sqrt{ab}$ = 1.87 mm, closer in than halfway across, because the logarithm crowds the voltage drop near the thin conductor. That's why a cable's breakdown starts at its center wire.

**Answer:** $V(r) = 100\ln(3.5\ \text{mm}/r)/\ln 3.5$, and the field at the inner conductor is 79.8 kV/m.
:::
:::

::: example
## A spherical capacitor has an inner sphere of radius 1 cm and an outer one of 2 cm, with air between. Find its capacitance from the radial equation.

::: solution
1. **General solution.** $V = C_1 + C_2/r$. With $V(a) = V_0$ and $V(b) = 0$,
   $$V = V_0\frac{1/r - 1/b}{1/a - 1/b}$$
2. **Field at the inner sphere.**
   $$E = \frac{V_0}{a^2(1/a - 1/b)}$$
3. **Charge, from Gauss's law.**
   $$Q = 4\pi\varepsilon_0a^2E$$
4. **Capacitance.**
   $$\begin{aligned} C &= \frac{Q}{V_0} \\ &= \frac{4\pi\varepsilon_0 ab}{b - a} \end{aligned}$$
5. **Put in the numbers.**
   $$\begin{aligned} C &= 4\pi(8.854 \times 10^{-12}) \\ &\quad \times \frac{(0.01)(0.02)}{0.01} \\ &= 2.23\ \text{pF} \end{aligned}$$
6. **Isolated sphere.** As $b \to \infty$ this becomes $4\pi\varepsilon_0a$, the capacitance of an isolated sphere: about 1.1 pF for this one.

**Answer:** $C = 4\pi\varepsilon_0ab/(b - a)$, which is 2.23 pF.
:::
:::

::: example
## Solve $x^2y'' + xy' + 4y = 0$ with $y(1) = 1$ and $y'(1) = 0$. Where is its first zero?

::: solution
1. **Indicial equation.**
   $$\begin{aligned} m(m - 1) + m + 4 &= m^2 + 4 \\ &= 0 \end{aligned}$$
   so $m = \pm 2j$.
2. **General solution.**
   $$\begin{aligned} y &= C_1\cos(2\ln x) \\ &\quad + C_2\sin(2\ln x) \end{aligned}$$
3. **Fit the start.** At $x = 1$, $\ln x = 0$, so $C_1 = 1$. The derivative
   $$\begin{aligned} xy' &= -2C_1\sin(2\ln x) \\ &\quad + 2C_2\cos(2\ln x) \end{aligned}$$
   gives $C_2 = 0$, so $y = \cos(2\ln x)$.
4. **First zero.** It first reaches zero at $2\ln x = \pi/2$:
   $$\begin{aligned} x &= e^{\pi/4} \\ &= 2.193 \end{aligned}$$
5. **Later zeros.** The next zero is at $e^{3\pi/4}$ = 10.55: each swing takes $e^{\pi/2}$ = 4.8 times as long in $x$ as the one before.

**Answer:** $y = \cos(2\ln x)$, and its first zero is at $x = e^{\pi/4} = 2.193$.
:::
:::

::: check
given: b = -1 | 0 | 2 | 4; c = -2 | -4 | -6
answer: ((1 - b) + sqrt((b - 1)^2 - 4*c))/2
tolerance: 0.5%

## What is the larger root of the indicial equation for $x^2y'' + \given{b}xy' + \given{c}y = 0$?

::: right
Right. $m(m - 1) + \given{b}m + \given{c} = m^2 + (\given{b} - 1)m + \given{c} = 0$, whose larger root is {answer}.
:::

::: misses
- [(-b + sqrt(b^2 - 4*c))/2] That uses $m^2 + bm + c$. The $y''$ term contributes $m(m - 1)$, not $m^2$.
- [((1 - b) - sqrt((b - 1)^2 - 4*c))/2] That's the smaller root.
- [any] Not yet. Put $y = x^m$ in: $m(m - 1) + \given{b}m + \given{c} = 0$.
:::
:::

::: check
kind: parts
given: a = 0.5 | 1 | 2; ratio = 2.3 | 3.5 | 5; V0 = 50 | 100 | 1000

## A coaxial line has an inner conductor of radius {a} mm at {V0} V and an outer conductor {ratio} times as large at 0 V.

::: part
answer: V0/(a*1e-3*ln(ratio))
unit: V/m
tolerance: 0.5%

### What is the field at the surface of the inner conductor?

::: misses
- [V0/(a*1e-3*ratio)] That divides by the radius ratio instead of its logarithm. $V = C_1 + C_2\ln r$, so $E = C_2/r$ with $C_2 = V_0/\ln(b/a)$.
- [V0/(a*1e-3*(ratio - 1))] That's the field if the voltage fell uniformly across the gap. Near the thin conductor it falls much faster.
- [any] Not yet. $E = V_0/(r\ln(b/a))$ at $r = a$, in meters.
:::
:::

::: part
answer: a*sqrt(ratio)
unit: mm
tolerance: 0.5%

### At what radius is the potential half of {V0} V?

::: misses
- [a*(1 + ratio)/2] That's halfway across the gap. The potential goes as $\ln r$, so halfway in voltage is halfway in $\ln r$.
- [any] Not yet. Solve $\ln(b/r) = \tfrac12\ln(b/a)$: $r = \sqrt{ab}$.
:::
:::

::: right
Right. Half the voltage drops between the inner conductor and the geometric mean of the radii, which is much closer to the center than halfway.
:::
:::

::: check
given: a = 1 | 2 | 5; r = 1.5 | 2 | 4; let b = a*r
answer: 4*pi*8.854e-12*a*b*1e-2/(b - a)
unit: F
tolerance: 0.5%

## A spherical capacitor has an inner radius of {a} cm and an outer radius of {b} cm, with air between. What is its capacitance?

::: right
Right. $C = 4\pi\varepsilon_0ab/(b - a)$ with the radii in meters: {answer}.
:::

::: misses
- [4*pi*8.854e-12*a*b/(b - a)] That keeps the radii in centimeters. Convert them to meters: $ab/(b - a)$ has the units of a length.
- [4*pi*8.854e-12*a*1e-2] That's an isolated sphere, with the outer sphere at infinity.
- [any] Not yet. Solve $r^2V'' + 2rV' = 0$ for $V = C_1 + C_2/r$, then $C = 4\pi\varepsilon_0ab/(b - a)$.
:::
:::

::: check
kind: derivation
vars: m = -3..3, b = -3..3, c = -3..3, x = 0.5..3

## Derive the indicial equation of $x^2y'' + bxy' + cy = 0$ by trying $y = x^m$.

::: step
answer: m*(m - 1)*x^m

### What is $x^2y''$?
:::

::: step
answer: b*m*x^m

### What is $bxy'$?
:::

::: step
answer: m*(m - 1) + b*m + c

### Add the three terms and divide by $x^m$. What must be zero?
:::

::: right
Right. Every term has $x^m$ in it, which is the whole reason a power works: it cancels and leaves an equation for $m$ alone.
:::
:::

::: check
given: beta = 1 | 2 | 3 | 0.5
answer: exp(pi/(2*beta))
tolerance: 0.5%

## A solution is $y = \cos(\given{beta}\ln x)$. Where is its first zero beyond $x = 1$?

::: right
Right. $\given{beta}\ln x = \pi/2$ gives $x = e^{\pi/(2 \cdot \given{beta})}$ = {answer}.
:::

::: misses
- [pi/(2*beta)] That's the value of $\ln x$. Exponentiate to get $x$.
- [exp(pi/beta)] That's where $\beta\ln x = \pi$, the second zero's halfway point, not the first zero.
- [any] Not yet. Solve $\given{beta}\ln x = \pi/2$.
:::
:::

::: check
kind: python
given: b = 1 | 3; c = 4 | 10; X = 5 | 20

## Integrate $x^2y'' + \given{b}xy' + \given{c}y = 0$ from $x = 1$, with $y(1) = 1$ and $y'(1) = 0$, to `X` = {X} with RK4 on the state $(y, y')$, using 20 000 steps. Set `y_num` to the result and `y_exact` to the exact solution there: $x^\alpha(\cos(\beta\ln x) - \frac{\alpha}{\beta}\sin(\beta\ln x))$ with $\alpha = (1 - b)/2$ and $\beta = \sqrt{c - (b - 1)^2/4}$.

```python starter
import math
y_num = 1
y_exact = 1
print(y_num, y_exact)
```

```python solution
import math
def f(x, s):
    y, v = s
    return [v, -(b * x * v + c * y) / x**2]
n = 20000
h = (X - 1) / n
x, s = 1.0, [1.0, 0.0]
for _ in range(n):
    k1 = f(x, s)
    k2 = f(x + h / 2, [s[i] + h / 2 * k1[i] for i in range(2)])
    k3 = f(x + h / 2, [s[i] + h / 2 * k2[i] for i in range(2)])
    k4 = f(x + h, [s[i] + h * k3[i] for i in range(2)])
    s = [s[i] + h / 6 * (k1[i] + 2 * k2[i] + 2 * k3[i] + k4[i]) for i in range(2)]
    x += h
y_num = s[0]
al = (1 - b) / 2
be = math.sqrt(c - (b - 1)**2 / 4)
L = math.log(X)
y_exact = X**al * (math.cos(be * L) - al / be * math.sin(be * L))
print(y_num, y_exact)
```

```python tests
import math
al = (1 - b) / 2; be = math.sqrt(c - (b - 1)**2 / 4); L = math.log(X)
ex = X**al * (math.cos(be * L) - al / be * math.sin(be * L))
assert abs(y_exact - ex) < 1e-12, "y_exact is x^α (cos(β ln x) − (α/β) sin(β ln x)) at X."
assert abs(y_num - ex) < 1e-6, f"RK4 should reach {ex:.8f}. Divide by x² to write y'' = −(bxy' + cy)/x²."
```

::: right
Right. The exact solution's $-\frac{\alpha}{\beta}\sin$ term is what makes $y'(1) = 0$, and RK4 agrees with it to many digits. The swings stretch out in $x$ because they're evenly spaced in $\ln x$.
:::
:::

::: check
kind: choice

## Why does $\ln x$ appear in the repeated-root solution $x^m(C_1 + C_2\ln x)$?

- [x] With $x = e^t$ the equation has constant coefficients, and its repeated-root solution $te^{mt}$ is $x^m\ln x$
- [ ] Because $\ln x$ is the only function whose derivative is $1/x$
- [ ] It's an approximation valid for large $x$
- [ ] To make the solution real

::: right
Right. The substitution $x = e^t$ turns the equation into one with constant coefficients in $t$, and every one of its solutions translates back: $e^{mt} = x^m$, $te^{mt} = x^m\ln x$.
:::

::: misses
- [2] True, but it doesn't explain why the repeated root needs it. The substitution $x = e^t$ does.
- [3] The solution is exact for every $x > 0$.
- [4] Real roots already give real solutions. The logarithm is what a repeated root needs for a second, independent solution.
:::
:::

::: explain
## Halfway in voltage between the conductors of a coaxial cable is much closer to the inner conductor than to the outer. Explain why, from the equation.

::: model
The potential solves $r^2V'' + rV' = 0$, whose solutions are $V = C_1 + C_2\ln r$, so the voltage changes evenly in $\ln r$, not in $r$. Equal steps in $\ln r$ are equal ratios of radius, and near the thin inner conductor a small distance is a large ratio: going from 1 mm to 2 mm doubles $r$, while going from 2 mm to 3.5 mm doesn't even double it. Physically, the same field lines pass through every cylinder around the axis, and they're crowded onto the small circumference near the center, so the field, and the voltage drop per millimeter, is largest there.
:::
:::

::: practice

::: check
given: b = 0 | 1 | 2; c = -6 | -2
answer: ((1 - b) - sqrt((b - 1)^2 - 4*c))/2
tolerance: 0.5%

## What is the smaller root of the indicial equation for $x^2y'' + \given{b}xy' + \given{c}y = 0$?

::: misses
- [((1 - b) + sqrt((b - 1)^2 - 4*c))/2] That's the larger root.
- [any] Solve $m^2 + (\given{b} - 1)m + \given{c} = 0$.
:::
:::

::: check
given: a = 0.5 | 1 | 2; ratio = 2 | 3 | 5
answer: 2*pi*8.854e-12/ln(ratio)
unit: F/m
tolerance: 0.5%

## What is the capacitance per meter of an air coaxial line with outer radius {ratio} times the inner radius, {a} mm?

::: misses
- [2*pi*8.854e-12/ratio] Divide by the logarithm of the ratio, from $V = C_1 + C_2\ln r$.
- [any] $C' = 2\pi\varepsilon_0/\ln(b/a)$.
:::
:::
:::
