The equation and the substitution
Before you start: you need the CF and PI methods from higher-order linear equations.
In a Cauchy–Euler (homogeneous linear) equation, each derivative is multiplied by the same power of \(x\) as its order: \(x^2\) with \(y''\), \(x\) with \(y'\). The coefficients are not constant, so the auxiliary equation does not apply directly. One substitution fixes that.
\[x^2\frac{d^2y}{dx^2} + a\,x\frac{dy}{dx} + b\,y = f(x)\]
Put \(x = e^z\) (so \(z = \log x\), \(x > 0\)) and write \(D = \dfrac{d}{dz}\). Then \[x\frac{dy}{dx} = Dy, \qquad x^2\frac{d^2y}{dx^2} = D(D - 1)\,y, \qquad x^3\frac{d^3y}{dx^3} = D(D - 1)(D - 2)\,y\]
The equation becomes \(\big[D(D - 1) + aD + b\big]y = f(e^z)\), which has constant coefficients.
Why \(x\dfrac{dy}{dx} = Dy\): by the chain rule \(\dfrac{dy}{dx} = \dfrac{dy}{dz}\cdot\dfrac{dz}{dx} = \dfrac{1}{x}\dfrac{dy}{dz}\). Differentiate once more: \[\frac{d^2y}{dx^2} = -\frac{1}{x^2}\frac{dy}{dz} + \frac{1}{x}\cdot\frac{1}{x}\frac{d^2y}{dz^2},\] so \(x^2y'' = D^2y - Dy = D(D - 1)y\).
A useful shortcut: the auxiliary equation is what you get by trying \(y = x^m\), since \(x^2(x^m)'' + ax(x^m)' + bx^m = \big[m(m - 1) + am + b\big]x^m\).
Method
- Replace \(xy'\) by \(Dy\), \(x^2y''\) by \(D(D - 1)y\), and \(x^3y'''\) by \(D(D - 1)(D - 2)y\).
- Change the right side to \(z\): \(x^k = e^{kz}\), \(\log x = z\), \(\sin(\log x) = \sin z\).
- Solve the constant-coefficient equation in \(z\): CF from the auxiliary equation, PI by the short methods.
- Put back \(z = \log x\) and \(e^{kz} = x^k\).
| Roots in \(m\) | CF in \(x\) |
|---|---|
| Distinct real \(m_1, m_2\) | \(c_1x^{m_1} + c_2x^{m_2}\) |
| Repeated \(m, m\) | \((c_1 + c_2\log x)\,x^m\) |
| Complex \(\alpha \pm i\beta\) | \(x^\alpha\big[c_1\cos(\beta\log x) + c_2\sin(\beta\log x)\big]\) |
Legendre's linear equation
The same idea works when the powers are of \((ax + b)\) instead of \(x\): \[(ax + b)^2y'' + A(ax + b)\,y' + By = f(x).\] Put \(ax + b = e^z\). Then \((ax + b)\,y' = a\,Dy\) and \((ax + b)^2y'' = a^2D(D - 1)\,y\). Note the extra factors \(a\) and \(a^2\).
Solved examples
Example 1: Distinct roots
EasySolve \(x^2y'' + xy' - 4y = 0\).
- \(D(D - 1) + D - 4 = D^2 - 4\). Roots \(m = \pm 2\).
- CF in \(z\): \(c_1e^{2z} + c_2e^{-2z}\). Put \(e^z = x\).
Answer\(y = c_1x^2 + \dfrac{c_2}{x^2}\)
Example 2: A repeated root
EasySolve \(x^2y'' - 3xy' + 4y = 0\).
- \(D(D - 1) - 3D + 4 = D^2 - 4D + 4 = (D - 2)^2\). Roots \(2, 2\).
- CF in \(z\): \((c_1 + c_2z)\,e^{2z}\).
Answer\(y = (c_1 + c_2\log x)\,x^2\)
Example 3: Complex roots
MediumSolve \(x^2y'' + xy' + 4y = 0\).
- \(D(D - 1) + D + 4 = D^2 + 4\). Roots \(\pm 2i\).
- CF in \(z\): \(c_1\cos 2z + c_2\sin 2z\).
Answer\(y = c_1\cos(2\log x) + c_2\sin(2\log x)\)
Example 4: A power of x on the right
MediumSolve \(x^2y'' - 3xy' + 5y = x^2\).
- \(D^2 - 4D + 5 = 0\) gives \(m = 2 \pm i\). CF \(= x^2\big[c_1\cos(\log x) + c_2\sin(\log x)\big]\).
- Right side \(= e^{2z}\). \(f(2) = 4 - 8 + 5 = 1\), so PI \(= e^{2z} = x^2\).
Answer\(y = x^2\big[c_1\cos(\log x) + c_2\sin(\log x)\big] + x^2\)
Example 5: log x on the right
MediumSolve \(x^2y'' - xy' + y = \log x\).
- \(D(D - 1) - D + 1 = (D - 1)^2\). CF \(= (c_1 + c_2\log x)\,x\).
- Right side \(= z\). PI \(= (1 - D)^{-2}z = (1 + 2D + 3D^2 + \cdots)\,z = z + 2\).
Answer\(y = (c_1 + c_2\log x)\,x + \log x + 2\)
Example 6: A failure case
Exam levelSolve \(x^2y'' + xy' + y = \sin(\log x)\).
- \(D^2 + 1 = 0\), roots \(\pm i\). CF \(= c_1\cos z + c_2\sin z\).
- Right side \(\sin z\), and \(D^2 \to -1\) makes the denominator zero. Use \(\dfrac{1}{D^2 + 1}\sin z = -\dfrac{z}{2}\cos z\).
Answer\(y = c_1\cos(\log x) + c_2\sin(\log x) - \tfrac{1}{2}\log x\,\cos(\log x)\)
Example 7: An exponential on the right
Exam levelSolve \(x^2y'' + 4xy' + 2y = e^x\).
- \(D(D - 1) + 4D + 2 = D^2 + 3D + 2 = (D + 1)(D + 2)\). CF \(= \dfrac{c_1}{x} + \dfrac{c_2}{x^2}\).
- Right side \(e^{e^z}\). Split: PI \(= \left[\dfrac{1}{D + 1} - \dfrac{1}{D + 2}\right]e^{e^z}\), and use \(\dfrac{1}{D + k}Q = e^{-kz}\int e^{kz}Q\,dz\).
- \(\dfrac{1}{D + 1}e^{e^z} = e^{-z}\int e^ze^{e^z}dz = e^{-z}e^{e^z}\).
- \(\dfrac{1}{D + 2}e^{e^z} = e^{-2z}\int e^{2z}e^{e^z}dz = e^{-2z}(e^z - 1)\,e^{e^z}\) (put \(t = e^z\), \(\int te^t\,dt = (t - 1)e^t\)).
- Difference: \(e^{e^z}\big[e^{-z} - e^{-z} + e^{-2z}\big] = e^{-2z}e^{e^z} = \dfrac{e^x}{x^2}\).
Answer\(y = \dfrac{c_1}{x} + \dfrac{c_2}{x^2} + \dfrac{e^x}{x^2}\)
Example 8: Legendre's equation
Exam levelSolve \((2x + 3)^2y'' - 2(2x + 3)\,y' - 12y = 6x\).
- Put \(2x + 3 = e^z\). Then \((2x + 3)y' = 2Dy\) and \((2x + 3)^2y'' = 4D(D - 1)y\).
- Left side: \(4D(D - 1) - 4D - 12 = 4(D^2 - 2D - 3) = 4(D - 3)(D + 1)\). Right side: \(6x = 3(e^z - 3) = 3e^z - 9\).
- So \((D^2 - 2D - 3)\,y = \tfrac{3}{4}e^z - \tfrac{9}{4}\). CF \(= c_1e^{3z} + c_2e^{-z}\).
- PI \(= \tfrac{3}{4}\cdot\dfrac{e^z}{1 - 2 - 3} - \tfrac{9}{4}\cdot\dfrac{1}{-3} = -\tfrac{3}{16}e^z + \tfrac{3}{4}\).
Answer\(y = c_1(2x + 3)^3 + \dfrac{c_2}{2x + 3} - \dfrac{3}{16}(2x + 3) + \dfrac{3}{4}\)
Do the conversion to \(D\) once, carefully, and write the full equation in \(z\) on its own line before solving. The wrong answer I see most often comes from writing \(x^2y''\) as \(D^2y\) instead of \(D(D - 1)y\).
Common mistakes
1. Writing \(x^2y''\) as \(D^2y\)
\(x^2y'' = D(D - 1)y = (D^2 - D)y\). For \(x^2y'' + xy' - 4y = 0\), using \(D^2\) gives \(D^2 + D - 4\), with ugly irrational roots. The right form is \(D^2 - 4\).
2. Leaving the answer in \(z\)
\(y = c_1e^{2z} + c_2e^{-2z}\) is not finished. Put back \(e^z = x\) and \(z = \log x\): \(y = c_1x^2 + c_2x^{-2}\).
3. Forgetting the \(a\) in Legendre's equation
For \(ax + b = e^z\), \((ax + b)y' = a\,Dy\), not \(Dy\). In Example 8 dropping the factors gives \(D^2 - 3D - 12\) instead of \(4(D^2 - 2D - 3)\), and the roots come out wrong.
Practice questions
Try each one on paper before you open the answer.
Q1Solve \(x^2y'' - 2y = 0\).
\(D^2 - D - 2 = (D - 2)(D + 1)\).
\(y = c_1x^2 + \dfrac{c_2}{x}\).
Q2Solve \(x^2y'' + 3xy' + y = 0\).
\(D^2 + 2D + 1 = (D + 1)^2\).
\(y = \dfrac{c_1 + c_2\log x}{x}\).
Q3Solve \(x^2y'' - xy' + 2y = 0\).
\(D^2 - 2D + 2 = 0\), roots \(1 \pm i\).
\(y = x\big[c_1\cos(\log x) + c_2\sin(\log x)\big]\).
Q4Solve \(x^3y''' + 3x^2y'' + xy' = 0\).
\(D(D - 1)(D - 2) + 3D(D - 1) + D = D^3\). Roots \(0, 0, 0\).
\(y = c_1 + c_2\log x + c_3(\log x)^2\).
Q5Solve \(x^2y'' + xy' - y = x^2\).
\(D^2 - 1\), CF \(= c_1x + \dfrac{c_2}{x}\). PI \(= \dfrac{e^{2z}}{4 - 1} = \dfrac{x^2}{3}\).
\(y = c_1x + \dfrac{c_2}{x} + \dfrac{x^2}{3}\).
Q6Solve \((x + 1)^2y'' + (x + 1)y' + y = 4\cos\big(\log(x + 1)\big)\).
Put \(x + 1 = e^z\): \((D^2 + 1)y = 4\cos z\). Failure case: PI \(= 4\cdot\dfrac{z}{2}\sin z = 2z\sin z\).
\(y = c_1\cos\log(x + 1) + c_2\sin\log(x + 1) + 2\log(x + 1)\sin\log(x + 1)\).
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
What is a Cauchy–Euler equation?
A linear equation in which each derivative \(\dfrac{d^ky}{dx^k}\) is multiplied by \(x^k\), such as \(x^2y'' + axy' + by = f(x)\). It is also called the homogeneous linear equation or the equidimensional equation.
Why do we substitute x = e^z?
Because it turns \(x\dfrac{d}{dx}\) into \(\dfrac{d}{dz}\), and the equation becomes one with constant coefficients. Then the auxiliary equation and the short methods for the PI all work.
What is Legendre's linear equation?
The same type of equation with powers of \((ax + b)\) instead of \(x\). Put \(ax + b = e^z\); then \((ax + b)y' = aDy\) and \((ax + b)^2y'' = a^2D(D - 1)y\).
What if x is negative?
Put \(x = -e^z\) instead. The working is identical and the answer is the same with \(\log x\) replaced by \(\log|x|\) and \(x^m\) by \(|x|^m\).