2.4 Euler Equations & Variable Coefficient SODE

Solving differential equations when coefficients are not constants

What You'll Learn

By the end of this lesson, you will be able to:

  1. Identify and solve Euler equations using the indicial equation method
  2. Apply the transformation \(Y(t) = y(e^t)\) to convert to constant coefficients
  3. Understand the three solution cases: distinct real, repeated, and complex roots
  4. Use the method of reduction of order when one solution is known
  5. Solve variable coefficient equations by reducing to first order

Why Variable Coefficients Matter

Not all second-order differential equations have constant coefficients. When coefficients depend on the independent variable \(x\), the techniques from Chapter 2.1–2.3 no longer apply. This section covers two special methods for handling variable coefficient equations: the Euler equation method (which transforms to constant coefficients via a clever substitution) and the method of reduction of order (which reduces a second-order equation to first order when one solution is known).

Leonhard Euler revolutionized differential equations by discovering that equations with coefficients of the form \(ax^ny^{(n)}\) could be transformed into equations with constant coefficients. His genius for substitution transformed an impossible problem into a solvable one, exemplifying the power of the right change of variables.

— Leonhard Euler (1707–1783), Master of Infinite Series and Transformations
الَّذِي أَحْسَنَ كُلَّ شَيْءٍ خَلَقَهُ
"He Who has perfected everything He created."
— Quran, Surah As-Sajdah 32:7

Just as the universe exhibits beautiful structure and order despite seeming complexity, so too can variable coefficient equations reveal their hidden order through the right transformation. What appears irregular often reveals deep symmetry — a perfection in creation that rewards those who seek to understand it.

Theory: Euler Equations

Definition: The Euler Equation

An Euler equation (or Cauchy-Euler equation) is a second-order linear ODE of the form:

$$a\,x^2\,y'' + b\,x\,y' + c\,y = 0$$

where \(a, b, c\) are constants and \(a \neq 0\). The key feature is that each term has a power of \(x\) equal to the order of the derivative: \(x^2\) with \(y''\), \(x^1\) with \(y'\), and \(x^0\) with \(y\).

The Key Transformation

The power of the Euler equation is that we can transform it into a constant coefficient equation! Let \(x = e^t\), so \(t = \ln x\). Define \(Y(t) = y(e^t)\). Then:

$$\frac{dY}{dt} = \frac{dy}{dx} \cdot \frac{dx}{dt} = y' \cdot e^t$$
$$\frac{d^2Y}{dt^2} = \frac{d}{dt}(y' \cdot e^t) = y'' \cdot e^{2t} + y' \cdot e^t$$

Rearranging: \(y'' = e^{-2t}\left(\frac{d^2Y}{dt^2} - \frac{dY}{dt}\right)\) and \(y' = e^{-t}\frac{dY}{dt}\). Substituting into the original equation and simplifying yields:

$$a\,Y'' + (b - a)\,Y' + c\,Y = 0$$

This is a constant coefficient equation in \(Y\)!

The Indicial Equation

Assume solutions of the form \(y = x^r\) for the homogeneous equation \(a\,x^2\,y'' + b\,x\,y' + c\,y = 0\). Substitute:

$$y' = r\,x^{r-1}, \quad y'' = r(r-1)\,x^{r-2}$$

The equation becomes:

$$a\,r(r-1)\,x^r + b\,r\,x^r + c\,x^r = 0$$

Dividing by \(x^r\) (valid for \(x > 0\)):

$$a\,r(r-1) + b\,r + c = 0$$

This simplifies to the indicial equation:

$$ar^2 + (b - a)\,r + c = 0$$
Solution Cases for Euler Equations on \((0, \infty)\)

For the equation \(a\,x^2\,y'' + b\,x\,y' + c\,y = 0\), compute the indicial equation \(ar^2 + (b-a)r + c = 0\):

  1. Distinct Real Roots \(r_1 \neq r_2\):
    $$y = C_1\,x^{r_1} + C_2\,x^{r_2}$$
  2. Repeated Real Root \(r_1 = r_2 = r\):
    $$y = x^r(C_1 + C_2\,\ln x)$$
  3. Complex Roots \(r = \lambda \pm i\omega\) (with \(\omega > 0\)):
    $$y = x^{\lambda}\left[C_1\,\cos(\omega\,\ln x) + C_2\,\sin(\omega\,\ln x)\right]$$
Simplifying the Indicial Equation

The general form \(a\,r(r-1) + b\,r + c = 0\) expands to \(ar^2 + (b-a)r + c = 0\). You can use either form, but it's often easier to work with the second one directly and use the quadratic formula.

Domain Restriction

The logarithm \(\ln x\) in the repeated root case appears only for \(x > 0\). Euler equations are only valid on \((0, \infty)\) or \((-\infty, 0)\), never across \(x = 0\). If you need a solution on \((-\infty, 0)\), replace \(x\) with \(|x|\) or work with \((-x)^r\).

Theory: Reduction of Order

The Method

Suppose you're given a second-order linear ODE

$$P_0(x)\,y'' + P_1(x)\,y' + P_2(x)\,y = F(x)$$

and you already know one solution \(y_1(x)\) to the homogeneous equation \(P_0(x)\,y'' + P_1(x)\,y' + P_2(x)\,y = 0\). The method of reduction of order lets you find a second linearly independent solution and then the particular solution.

The idea: assume \(y = u(x) \cdot y_1(x)\) where \(u(x)\) is a new function to be determined. Compute:

$$y' = u'\,y_1 + u\,y_1'$$
$$y'' = u''\,y_1 + 2u'\,y_1' + u\,y_1''$$

Substitute into the original equation. Since \(y_1\) satisfies the homogeneous equation, the coefficient of \(u\) vanishes, leaving:

$$P_0(x)(u''\,y_1 + 2u'\,y_1') + P_1(x)(u'\,y_1) = F(x)$$

Rearranging:

$$P_0(x)\,y_1\,u'' + [2P_0(x)\,y_1' + P_1(x)\,y_1]\,u' = F(x)$$

Now let \(z = u'\). This is a first-order linear ODE in \(z\). Solve for \(z\), integrate to find \(u\), and then \(y = u \cdot y_1\).

Reduction of Order Method Summary
  1. Given \(y_1\) as a solution to the homogeneous equation
  2. Assume \(y = u(x) \cdot y_1(x)\) and compute \(y'\), \(y''\)
  3. Substitute into the DE; the \(u\) term cancels
  4. Let \(z = u'\); solve the resulting first-order ODE for \(z\)
  5. Integrate \(z\) to get \(u\), then \(y = u \cdot y_1\)

This method works for any variable coefficient second-order linear equation, not just Euler equations!

Step-by-Step: Solving Euler Equations

  1. Identify coefficients. From the equation \(a\,x^2\,y'' + b\,x\,y' + c\,y = 0\), read off \(a\), \(b\), and \(c\).
  2. Form the indicial equation. Write and solve: $$ar^2 + (b - a)\,r + c = 0$$
  3. Solve for the roots \(r_1, r_2\). Use the quadratic formula. Determine if you have distinct real, repeated, or complex roots.
  4. Apply the appropriate formula. Based on your roots, write down the general solution from the theorem box above.
  5. Apply initial conditions (if given). Use \(y(x_0) = y_0\) and \(y'(x_0) = y_0'\) to find \(C_1\) and \(C_2\).

Step-by-Step: Reduction of Order

  1. Given \(y_1\). You are given that \(y_1(x)\) is a solution to the homogeneous equation.
  2. Assume \(y = u \cdot y_1\). Let \(y = u(x) \cdot y_1(x)\) where \(u(x)\) is to be found. Compute: $$y' = u'\,y_1 + u\,y_1', \quad y'' = u''\,y_1 + 2u'\,y_1' + u\,y_1''$$
  3. Substitute into the DE. Plug \(y\), \(y'\), \(y''\) into the original equation. The \(u\) term will cancel because \(y_1\) is a homogeneous solution.
  4. Obtain a first-order ODE in \(u'\). Let \(z = u'\). You should get a first-order linear ODE in \(z\): $$a(x)\,z' + b(x)\,z = g(x)$$
  5. Solve the first-order ODE. Use the integrating factor method or other techniques for first-order equations.
  6. Integrate to find \(u\). Once you have \(z = u'\), integrate to get \(u(x)\).
  7. Form the general solution. \(y = u(x) \cdot y_1(x)\) is the general solution to the original equation.

Worked Examples

Click each example to reveal the full solution.

Step 1: Identify coefficients. \(a = 1\), \(b = -1\), \(c = -8\).

Step 2: Indicial equation. \(r(r-1) - r - 8 = 0\) → \(r^2 - 2r - 8 = 0\).

Step 3: Solve for roots. Factor: \((r - 4)(r + 2) = 0\) → \(r_1 = 4\), \(r_2 = -2\).

Step 4: Apply formula. Distinct real roots give:

$$y = C_1\,x^4 + C_2\,x^{-2}$$
Solution
$$\boxed{y = C_1\,x^4 + \frac{C_2}{x^2}}$$

Step 1: Identify. \(a = 6\), \(b = 5\), \(c = -1\).

Step 2: Indicial equation. \(6r(r-1) + 5r - 1 = 0\) → \(6r^2 - r - 1 = 0\).

Step 3: Solve. \((2r - 1)(3r + 1) = 0\) → \(r_1 = \frac{1}{2}\), \(r_2 = -\frac{1}{3}\).

Step 4: Solution.

$$y = C_1\,x^{1/2} + C_2\,x^{-1/3} = C_1\sqrt{x} + \frac{C_2}{\sqrt[3]{x}}$$

Step 1: Identify. \(a = 1\), \(b = -5\), \(c = 9\).

Step 2: Indicial equation. \(r(r-1) - 5r + 9 = 0\) → \(r^2 - 6r + 9 = 0\).

Step 3: Solve. \((r - 3)^2 = 0\) → \(r = 3\) (repeated).

Step 4: Solution. Repeated root gives:

$$y = x^3(C_1 + C_2\,\ln x)$$

Step 1: Identify. \(a = 1\), \(b = 3\), \(c = 2\).

Step 2: Indicial equation. \(r(r-1) + 3r + 2 = 0\) → \(r^2 + 2r + 2 = 0\).

Step 3: Solve. \(r = \frac{-2 \pm \sqrt{4-8}}{2} = \frac{-2 \pm 2i}{2} = -1 \pm i\).

So \(\lambda = -1\), \(\omega = 1\).

Step 4: Solution. Complex roots give:

$$y = \frac{1}{x}\left[C_1\,\cos(\ln x) + C_2\,\sin(\ln x)\right]$$

Step 1: Homogeneous solution. From \(x^2 y'' - xy' + y = 0\): indicial \(r(r-1) - r + 1 = 0\) → \(r^2 - 2r + 1 = 0\) → \((r-1)^2 = 0\) → \(r = 1\) (repeated).

$$y_c = x(C_1 + C_2\,\ln x)$$

Step 2: Particular solution. Use variation of parameters with \(y_1 = x\), \(y_2 = x\ln x\). After computation (Wronskian \(W = x^2\)), we get \(y_p = \frac{x^3}{4}\).

Step 3: General solution.

$$y = x(C_1 + C_2\,\ln x) + \frac{x^3}{4}$$

Step 1: Given. \(y_1 = x\) is a solution. Verify: \(y_1' = 1\), \(y_1'' = 0\). Check: \(x^2(0) - 3x(1) + 3x = 0\). ✓

Step 2: Assume \(y = ux\). Then \(y' = u'x + u\) and \(y'' = u''x + 2u'\).

Step 3: Substitute.

$$x^2(u''x + 2u') - 3x(u'x + u) + 3ux = 0$$
$$x^3 u'' + 2x^2 u' - 3x^2 u' - 3xu + 3xu = 0$$
$$x^3 u'' - x^2 u' = 0$$

Step 4: Let \(z = u'\). Then \(x^3 z' - x^2 z = 0\) → \(z' = \frac{z}{x}\) → \(\frac{dz}{z} = \frac{dx}{x}\).

Step 5: Solve. \(\ln|z| = \ln|x| + K\) → \(z = Cx\).

Step 6: Integrate. \(u = \int Cx\,dx = \frac{Cx^2}{2} + D\).

Step 7: General solution.

$$y = ux = x\left(\frac{Cx^2}{2} + D\right) = \frac{C}{2}x^3 + Dx$$

Setting \(C' = C/2\), we have \(\boxed{y = C_1 x + C_2 x^3}\), so the fundamental set is \(\{x, x^3\}\).

Step 1: Given. \(y_1 = e^x\) satisfies the homogeneous equation.

Step 2: Assume \(y = u e^x\). Then \(y' = u'e^x + ue^x\) and \(y'' = u''e^x + 2u'e^x + ue^x\).

Step 3: Substitute into \(xy'' - (2x+1)y' + (x+1)y = x^2\).

$$x(u''e^x + 2u'e^x + ue^x) - (2x+1)(u'e^x + ue^x) + (x+1)ue^x = x^2$$

After canceling the homogeneous terms:

$$xu''e^x + (2x - 2x - 1)u'e^x = x^2$$
$$xu'' e^x - u'e^x = x^2 \implies xu'' - u' = xe^{-x}$$

Step 4: Let \(z = u'\). Then \(xz' - z = xe^{-x}\), or \(z' - \frac{z}{x} = e^{-x}\).

Step 5: First-order linear ODE. Integrating factor: \(\mu = e^{-\ln x} = \frac{1}{x}\). After solving: \(z = xe^{-x} + Cx\).

Step 6: Integrate for \(u\). \(u = \int (xe^{-x} + Cx)\,dx\). Using integration by parts: \(u = -xe^{-x} - e^{-x} + \frac{Cx^2}{2} + D\).

Step 7: General solution.

$$y = u e^x = (-x - 1 + \frac{C}{2}x^2 e^{x} + De^x) \cdot e^x = (x+1) + C_1 x^2 + C_2 e^x$$

Step 1: Homogeneous solution. Indicial: \(r(r-1) + r - 1 = 0\) → \(r^2 - 1 = 0\) → \(r = \pm 1\). So \(y_c = C_1 x + C_2 x^{-1}\).

Step 2: Particular solution via reduction. Given \(y_1 = x\), assume \(y = ux\). After substitution and solving the resulting first-order equation in \(u'\), we find \(y_p = \frac{1}{2}x^2 + 1\).

Step 3: General solution.

$$y = C_1 x + \frac{C_2}{x} + \frac{x^2}{2} + 1$$

Step 4: Apply initial conditions.

$$y(1) = C_1 + C_2 + \frac{3}{2} = 2 \implies C_1 + C_2 = \frac{1}{2}$$

And \(y' = C_1 - \frac{C_2}{x^2} + x\), so \(y'(1) = C_1 - C_2 + 1 = -3\) → \(C_1 - C_2 = -4\).

Solving: \(C_1 = -\frac{7}{4}\), \(C_2 = \frac{9}{4}\).

Step 5: Particular solution.

$$y = -\frac{7}{4}x + \frac{9}{4x} + \frac{x^2}{2} + 1$$

📝 Exam-Style Practice Problems

These problems are similar in style and difficulty to past exam questions. Click each problem to reveal the step-by-step solution.

Practice 1: Solve $3x^2 y'' + 5xy' - y = 0$

Solution

Step 1: Set up indicial equation. Assume $y = x^r$. Then $y' = rx^{r-1}$ and $y'' = r(r-1)x^{r-2}$.

Step 2: Substitute into the equation.

$$3x^2 \cdot r(r-1)x^{r-2} + 5x \cdot rx^{r-1} - x^r = 0$$
$$3r(r-1)x^r + 5rx^r - x^r = 0$$

Step 3: Factor out $x^r$. (Valid for $x \neq 0$)

$$x^r[3r(r-1) + 5r - 1] = 0$$

Step 4: Indicial equation.

$$3r^2 - 3r + 5r - 1 = 0 \Rightarrow 3r^2 + 2r - 1 = 0$$

Step 5: Factor. $(3r - 1)(r + 1) = 0$, so $r = \frac{1}{3}$ or $r = -1$.

Step 6: General solution. Two distinct real roots give:

$$\boxed{y = c_1 x^{1/3} + c_2 x^{-1}}$$
Practice 2: Solve $x^2 y'' + 3xy' + y = 0$

Solution

Step 1: Assume $y = x^r$. Then $y' = rx^{r-1}$ and $y'' = r(r-1)x^{r-2}$.

Step 2: Substitute and simplify.

$$x^2 \cdot r(r-1)x^{r-2} + 3x \cdot rx^{r-1} + x^r = 0$$
$$r(r-1)x^r + 3rx^r + x^r = 0$$
$$x^r[r(r-1) + 3r + 1] = 0$$

Step 3: Indicial equation.

$$r^2 - r + 3r + 1 = 0 \Rightarrow r^2 + 2r + 1 = 0$$

Step 4: Factor. $(r+1)^2 = 0$, so $r = -1$ (repeated root).

Step 5: General solution. For a repeated root $r_0$, the formula is $y = x^{r_0}(c_1 + c_2 \ln x)$:

$$\boxed{y = c_1 x^{-1} + c_2 x^{-1}\ln x = \frac{c_1 + c_2\ln x}{x}}$$
Practice 3: Solve $x^2 y'' - 3xy' + 4y = 0$

Solution

Step 1: Assume $y = x^r$. Derivatives: $y' = rx^{r-1}$, $y'' = r(r-1)x^{r-2}$.

Step 2: Substitute.

$$x^2 \cdot r(r-1)x^{r-2} - 3x \cdot rx^{r-1} + 4x^r = 0$$
$$r(r-1)x^r - 3rx^r + 4x^r = 0$$
$$x^r[r(r-1) - 3r + 4] = 0$$

Step 3: Indicial equation.

$$r^2 - r - 3r + 4 = 0 \Rightarrow r^2 - 4r + 4 = 0$$

Step 4: Factor. $(r-2)^2 = 0$, so $r = 2$ (repeated root).

Step 5: General solution. Using the repeated root formula:

$$\boxed{y = c_1 x^2 + c_2 x^2 \ln x = x^2(c_1 + c_2\ln x)}$$

Interactive Visualizer: Euler Equation Explorer

Explore how changing the coefficients \(a\), \(b\), \(c\) affects the solutions and roots of \(ax^2 y'' + bxy' + cy = 0\).

Indicial Equation: ar² + (b-a)r + c = 0

Roots: r₁ = ?, r₂ = ?

Solution Form: y = ?

1.0
1.0
Exploration Tip

Notice how the discriminant \(\Delta = (b-a)^2 - 4ac\) determines the nature of the roots. When \(\Delta > 0\), you get distinct real roots (two power functions). When \(\Delta = 0\), a repeated root (logarithmic term appears). When \(\Delta < 0\), complex roots (oscillatory solutions with power envelope).

Practice Problems

Test your understanding of Euler equations and reduction of order. Click "Check" to see feedback.

Progress: 0 / 5 completed

Problem 1 — Euler Equation: Distinct Roots

Find the general solution to \(x^2 y'' + 5xy' + 4y = 0\):

Problem 2 — Identifying the Indicial Equation

For the Euler equation \(2x^2 y'' - 3xy' + 2y = 0\), what is the indicial equation?

Problem 3 — Complex Roots in Euler Equations

The Euler equation \(x^2 y'' + xy' + 4y = 0\) has indicial \(r^2 + 4 = 0\). What is the general solution?

Problem 4 — Reduction of Order Setup

For the equation \(x^2 y'' - xy' + y = 0\) with known solution \(y_1 = x\), if you assume \(y = ux\), what equation do you get for \(u'\) after substitution?

Problem 5 — Repeated Root Formula

When an Euler equation has a repeated root \(r = r_0\), the general solution is: