Solving differential equations when coefficients are not constants
By the end of this lesson, you will be able to:
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.
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.
An Euler equation (or Cauchy-Euler equation) is a second-order linear ODE of the form:
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 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:
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:
This is a constant coefficient equation in \(Y\)!
Assume solutions of the form \(y = x^r\) for the homogeneous equation \(a\,x^2\,y'' + b\,x\,y' + c\,y = 0\). Substitute:
The equation becomes:
Dividing by \(x^r\) (valid for \(x > 0\)):
This simplifies to the indicial equation:
For the equation \(a\,x^2\,y'' + b\,x\,y' + c\,y = 0\), compute the indicial equation \(ar^2 + (b-a)r + c = 0\):
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.
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\).
Suppose you're given a second-order linear ODE
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:
Substitute into the original equation. Since \(y_1\) satisfies the homogeneous equation, the coefficient of \(u\) vanishes, leaving:
Rearranging:
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\).
This method works for any variable coefficient second-order linear equation, not just Euler equations!
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:
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.
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:
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:
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).
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.
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.
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.
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\).
After canceling the homogeneous terms:
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.
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.
Step 4: Apply initial conditions.
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.
These problems are similar in style and difficulty to past exam questions. Click each problem to reveal the step-by-step 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.
Step 3: Factor out $x^r$. (Valid for $x \neq 0$)
Step 4: Indicial equation.
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:
Step 1: Assume $y = x^r$. Then $y' = rx^{r-1}$ and $y'' = r(r-1)x^{r-2}$.
Step 2: Substitute and simplify.
Step 3: Indicial equation.
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)$:
Step 1: Assume $y = x^r$. Derivatives: $y' = rx^{r-1}$, $y'' = r(r-1)x^{r-2}$.
Step 2: Substitute.
Step 3: Indicial equation.
Step 4: Factor. $(r-2)^2 = 0$, so $r = 2$ (repeated root).
Step 5: General solution. Using the repeated root formula:
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 = ?
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).
Test your understanding of Euler equations and reduction of order. Click "Check" to see feedback.
Progress: 0 / 5 completed
Find the general solution to \(x^2 y'' + 5xy' + 4y = 0\):
For the Euler equation \(2x^2 y'' - 3xy' + 2y = 0\), what is the indicial equation?
The Euler equation \(x^2 y'' + xy' + 4y = 0\) has indicial \(r^2 + 4 = 0\). What is the general solution?
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?
When an Euler equation has a repeated root \(r = r_0\), the general solution is: