Differential EquationsNonhomogeneous and Higher-Order Equations3 of 4
Nonhomogeneous and Higher-Order Equations · 3

Cauchy-Euler Equations

We know how to solve differential equations when constant numbers sit in front of the derivatives, and now we need a way to solve equations when powers of xx sit in front of the derivatives instead.

1

Why y=xry = x^r works

Suppose we want to solve an equation where each derivative is multiplied by a matching power of xx:

x2y′′−2xy′−4y=0⏟Cauchy-Euler equation:power of x matches derivative order\displaystyle \underbrace{x^2 \ydd{y''} - 2x \yd{y'} - 4\ysol{y} = 0}_{\begin{gathered}\scriptstyle\text{Cauchy-Euler equation:} \\ \scriptstyle\text{power of } x \text{ matches derivative order}\end{gathered}}

Our old exponential guess y=erx\ysol{y} = \ysol{e^{rx}} fails here because the x2x^2 and xx stay attached to the derivatives, so the terms cannot combine. Instead, we need a function whose exponent drops by one each time we take a derivative, so that multiplying by xx and x2x^2 brings every term back to the same power of xx.

Why y = xʳ works for Cauchy-Euler equations
y′′−3y′−4y=0x2y′′−2xy′−4y=0\displaystyle \begin{aligned} \ydd{y''} - 3\yd{y'} - 4\ysol{y} &= 0 \\ x^2\ydd{y''} - 2x\yd{y'} - 4\ysol{y} &= 0 \end{aligned}
y\displaystyle \ysol{y} =erx⟶y\displaystyle = \ysol{e^{rx}} \quad\longrightarrow\quad \ysol{y} =  ?\displaystyle = \;?

Testing y=xr\ysol{y} = \ysol{x^r} works because the powers of xx in the equation put back the powers lost from each derivative:

y=xrxy′=x(rxr−1)=rxrx2y′′=x2(r(r−1)xr−2)=r(r−1)xr\displaystyle \begin{aligned} \ysol{y} &= \ysol{x^r} \\ x\yd{y'} &= x\left(\yd{rx^{r-1}}\right) = \yd{r}\ysol{x^r} \\ x^2\ydd{y''} &= x^2\left(\ydd{r(r-1)x^{r-2}}\right) = \ydd{r(r-1)}\ysol{x^r} \end{aligned}

On their own, the derivatives y′=rxr−1\yd{y'} = \yd{rx^{r-1}} and y′′=r(r−1)xr−2\ydd{y''} = \ydd{r(r - 1)x^{r-2}} have different exponents from y=xr\ysol{y} = \ysol{x^r} and curve differently. Multiplying by xx and x2x^2 turns xy′x\yd{y'} and x2y′′x^2\ydd{y''} into simple multiples of y=xr\ysol{y} = \ysol{x^r} for every choice of rr, and when r=1r = 1 makes y=x\ysol{y} = \ysol{x} a straight line, the (r−1)\ydd{(r - 1)} factor makes x2y′′x^2\ydd{y''} equal zero everywhere.

Taking derivatives of a power curve changes its shape, while multiplying by xx and x2x^2 bends the derivatives right back into scaled copies of the original curve.
2

Distinct real roots

Now let's finish solving our first equation:

x2y′′−2xy′−4y\displaystyle x^2 \ydd{y''} - 2x \yd{y'} - 4\ysol{y} =0\displaystyle = 0

Once xr\ysol{x^r} divides out of every term, each derivative term leaves behind only the exponents that came down in front.

Solving equations with distinct real roots
x2y′′−2xy′−4y\displaystyle x^2\ydd{y''} - 2x\yd{y'} - 4\ysol{y} =0\displaystyle = 0
y=xrxy′=r xrx2y′′=r(r−1) xr\displaystyle \begin{aligned} \ysol{y} &= \ysol{x^r} \\ x\yd{y'} &= \yd{r}\,\ysol{x^r} \\ x^2\ydd{y''} &= \ydd{r(r-1)}\,\ysol{x^r} \end{aligned}
r\displaystyle r =  ?,y\displaystyle = \;?,\qquad \ysol{y} =  ?\displaystyle = \;?
Text solution
Pull down the exponents for y=xr\ysol{y} = \ysol{x^r}Each derivative brings down the current exponent before xr\ysol{x^r} cancels out of the equation.
r(r−1)⏟from x2y′′−2r⏟from xy′−4(1)⏟from y\displaystyle \underbrace{\ydd{r(r - 1)}}_{\text{from } x^2\ydd{y''}} - 2\underbrace{\yd{r}}_{\text{from } x\yd{y'}} - 4\underbrace{\ysol{(1)}}_{\text{from } \ysol{y}} =0\displaystyle = 0
Expand and factor for rrDistributing rr turns the left side into a quadratic we can factor to find the exponents.
r2−r−2r−4=0r2−3r−4=0(r−4)(r+1)=0r=4,r=−1\displaystyle \begin{aligned} \ydd{r^2} - \yd{r} - 2\yd{r} - 4 &= 0 \\ \ydd{r^2} - 3\yd{r} - 4 &= 0 \\ (\bone{r - 4})(\btwo{r + 1}) &= 0 \\ \bone{r = 4}, \quad \btwo{r} &= \btwo{-1} \end{aligned}
Put each root rr into the exponent of xr\ysol{x^r}Because we guessed y=xr\ysol{y} = \ysol{x^r} rather than erx\ysol{e^{rx}}, the roots become powers of xx.
y\displaystyle \ysol{y} =c1x4+c2x−1\displaystyle = \bone{c_1 x^4} + \btwo{c_2 x^{-1}}

So any combination of x4\bone{x^4} and x−1\btwo{x^{-1}} makes the left side of the equation equal zero.

3

Repeated roots

Next, let's solve an equation where factoring the quadratic gives the same root twice:

x2y′′+3xy′+y\displaystyle x^2 \ydd{y''} + 3x \yd{y'} + \ysol{y} =0\displaystyle = 0

One root gives us one power of xx, so we need a way to build a second, genuinely different solution without changing the exponent rr.

Repeated roots and why ln(x) appears
x2y′′+3xy′+y\displaystyle x^2\ydd{y''} + 3x\yd{y'} + \ysol{y} =0\displaystyle = 0
y\displaystyle \ysol{y} =c1x−1+c2    ?  \displaystyle = \bone{c_1x^{-1}} + \btwo{c_2\;\boxed{\;?\;}}
Text solution
Replace the derivative terms with rr's and factorPulling down the exponents of xr\ysol{x^r} and combining like terms gives a repeated root.
r(r−1)+3r+1=0r2−r+3r+1=0r2+2r+1=0(r+1)2=0r=−1 (repeated)\displaystyle \begin{aligned} \ydd{r(r - 1)} + 3\yd{r} + 1 &= 0 \\ \ydd{r^2} - \yd{r} + 3\yd{r} + 1 &= 0 \\ \ydd{r^2} + 2\yd{r} + 1 &= 0 \\ (r + 1)^2 &= 0 \\ r &= -1 \text{ (repeated)} \end{aligned}
Multiply the repeated power by ln⁡(x)\btwo{\ln(x)} for the second solutionSince x=eln⁡(x)x = e^{\ln(x)} turns xr\ysol{x^r} into erln⁡(x)\ysol{e^{r\ln(x)}}, ln⁡(x)\ln(x) sits where xx used to sit in erx\ysol{e^{rx}}, so a repeated root gets multiplied by ln⁡(x)\btwo{\ln(x)}.
y\displaystyle \ysol{y} =c1x−1+c2x−1ln⁡(x)\displaystyle = \bone{c_1 x^{-1}} + \btwo{c_2 x^{-1}\ln(x)}

Multiplying by ln⁡(x)\btwo{\ln(x)} gives a second independent curve, whereas multiplying x−1\bone{x^{-1}} by xx would just add 11 to the exponent and give x0=1x^0 = 1, which is the guess xr\ysol{x^r} for r=0r = 0, and r=0r = 0 is not a root, so 11 does not solve the equation.

y1=x−1\htmlClass{lc-green}{y_1} = \htmlClass{lc-green}{x^{-1}}
1\htmlClass{lc-mute}{1}
1\htmlClass{lc-mute}{1}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
y2=x−1ln⁡(x)\htmlClass{lc-violet}{y_2} = \htmlClass{lc-violet}{x^{-1}\ln(x)}
1\htmlClass{lc-mute}{1}
1\htmlClass{lc-mute}{1}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
4

Complex roots

Replacing xx with ln⁡(x)\ln(x) also tells us what happens when the quadratic formula gives complex roots with ii. Let's find the general solution to

x2y′′−3xy′+13y\displaystyle x^2 \ydd{y''} - 3x \yd{y'} + 13\ysol{y} =0\displaystyle = 0
Complex roots
x2y′′−3xy′+13y\displaystyle x^2\ydd{y''} - 3x\yd{y'} + 13\ysol{y} =0\displaystyle = 0
y\displaystyle \ysol{y} =  ?\displaystyle = \;?
Text solution
Solve for the complex roots with the quadratic formulaReplacing the derivatives with rr's and simplifying leaves a negative number under the square root.
r(r−1)−3r+13=0r2−r−3r+13=0r2−4r+13=0r=4±(−4)2−4(1)(13)2=4±16−522=4±−362=4±6i2=2±3i\displaystyle \begin{gathered} \begin{aligned} \ydd{r(r - 1)} - 3\yd{r} + 13 &= 0 \\ \ydd{r^2} - \yd{r} - 3\yd{r} + 13 &= 0 \\ \ydd{r^2} - 4\yd{r} + 13 &= 0 \end{aligned} \\ \begin{aligned} r &= \frac{4 \pm \sqrt{(-4)^2 - 4(1)(13)}}{2} \\ &= \frac{4 \pm \sqrt{16 - 52}}{2} \\ &= \frac{4 \pm \sqrt{-36}}{2} \\ &= \frac{4 \pm 6i}{2} \\ &= \ysol{2} \pm 3i \end{aligned} \end{gathered}
Split the real power from the imaginary partThe real part 2\ysol{2} stays outside as x2\ysol{x^2}, while the imaginary part 3i3i becomes e3iln⁡(x)e^{3i\ln(x)}, putting 3ln⁡(x)3\ln(x) inside cosine and sine.
y=x2⏟real part 2(c1cos⁡(3⏟imaginarypart 3ln⁡(x))+c2sin⁡(3ln⁡(x)))\displaystyle \begin{aligned} \ysol{y} &= \underbrace{\ysol{x^2}}_{\text{real part } 2}\Big(\bone{c_1 \cos(}\underbrace{\bone{3}}_{\begin{gathered}\scriptstyle\text{imaginary} \\ \scriptstyle\text{part } 3\end{gathered}}\bone{\ln(x))} \\ &\qquad + \btwo{c_2 \sin(3\ln(x))}\Big) \end{aligned}

So complex roots r=2±3ir = \ysol{2} \pm 3i produce waves in ln⁡(x)\ln(x): x2cos⁡(3ln⁡(x))\ysol{x^2}\bone{\cos(3\ln(x))} and x2sin⁡(3ln⁡(x))\ysol{x^2}\btwo{\sin(3\ln(x))} each stay between x2\ysol{x^2} and −x2-\ysol{x^2}.

In the solution curve y=xαcos⁡(βln⁡(x))\ysol{y} = \ysol{x^\alpha}\bone{\cos(\beta\ln(x))} for x>0x > 0, the real part α\ysol{\alpha} sets the outer curves ±xα\pm \ysol{x^\alpha}, so as xx increases the wave dies out when α<0\ysol{\alpha} < 0, keeps the same height when α=0\ysol{\alpha} = 0, and grows when α>0\ysol{\alpha} > 0, while the imaginary part β\bone{\beta} sets how fast the wave oscillates. Because ln⁡(x)\ln(x) changes quickly near zero and slowly for large xx, the waves bunch up tightly near x=0x = 0 and stretch out as xx grows.

The real part of a complex root shapes the power envelope, while the imaginary part sets how tightly the waves pack toward zero.
5

Two setup traps to check first

Before plugging in r(r−1)\ydd{r(r - 1)} and r\yd{r}, check whether there is an extra constant in front of x2y′′x^2\ydd{y''} or whether the powers of xx do not match the order of each derivative.

Two setup traps to watch out for
2x2y′′+5xy′+y=0→  ?xy′′+3y′=0→  ?\displaystyle \begin{alignedat}{2} 2x^2\ydd{y''} + 5x\yd{y'} + \ysol{y} &= 0 &\quad &\to\;? \\ x\ydd{y''} + 3\yd{y'} &= 0 &\quad &\to\;? \end{alignedat}

When a number sits in front of x2y′′x^2\ydd{y''}, keep parentheses around r(r−1)\ydd{r(r - 1)} so the number multiplies both terms when you expand:

2x2y′′+5xy′+y=02r(r−1)+5r+1=02r2−2r+5r+1=0\displaystyle \begin{aligned} 2x^2\ydd{y''} + 5x\yd{y'} + \ysol{y} &= 0 \\ 2\ydd{r(r - 1)} + 5\yd{r} + 1 &= 0 \\ 2\ydd{r^2} - 2\yd{r} + 5\yd{r} + 1 &= 0 \end{aligned}

And if every term is missing an xx, multiply the entire equation by xx first so the powers of xx match the derivatives before replacing them with rr's:

xy′′+3y′\displaystyle x\ydd{y''} + 3\yd{y'} =0→multiply by xx2y′′+3xy′\displaystyle = 0 \quad \xrightarrow{\text{multiply by } x} \quad x^2\ydd{y''} + 3x\yd{y'} =0\displaystyle = 0
6

Transforming to constant coefficients with t=ln⁡(x)t = \ln(x)

Sometimes we want to solve an equation like

x2y′′+5xy′+4y\displaystyle x^2 \ydd{y''} + 5x \yd{y'} + 4\ysol{y} =0\displaystyle = 0

by substituting t=ln⁡(x)t = \ln(x) (or x=etx = e^t) to turn it into a constant-coefficient equation in tt. Guessing y=xr\ysol{y} = \ysol{x^r} gets the final answer faster, but when a problem asks you to use t=ln⁡(x)t = \ln(x), you need to write out the transformed differential equation in tt as part of the work.

Transforming to constant coefficients with t = ln(x)
t\displaystyle t =ln⁡(x)\displaystyle = \ln(x)
xy′=  ?x2y′′=  ?\displaystyle \begin{aligned} x\yd{y'} &= \;? \\ x^2\ydd{y''} &= \;? \end{aligned}

Because dtdx=1x\frac{dt}{dx} = \frac{1}{x}, switching the derivatives from xx to tt with the Chain Rule cancels the xx and x2x^2 coefficients completely:

xy′=xdydx=dydtx2y′′=x2d2ydx2=d2ydt2−dydt\displaystyle \begin{aligned} x\yd{y'} &= x\yd{\frac{dy}{dx}} = \yd{\frac{dy}{dt}} \\ x^2\ydd{y''} &= x^2\ydd{\frac{d^2y}{dx^2}} = \ydd{\frac{d^2y}{dt^2}} - \yd{\frac{dy}{dt}} \end{aligned}
Text solution
Replace x2y′′x^2\ydd{y''} and xy′x\yd{y'} with derivatives in ttSubstituting the Chain Rule expressions removes every xx and leaves a constant-coefficient equation in tt.
(d2ydt2−dydt)+5dydt+4y=0d2ydt2+4dydt+4y=0\displaystyle \begin{aligned} \left(\ydd{\frac{d^2y}{dt^2}} - \yd{\frac{dy}{dt}}\right) + 5\yd{\frac{dy}{dt}} + 4\ysol{y} &= 0 \\ \ydd{\frac{d^2y}{dt^2}} + 4\yd{\frac{dy}{dt}} + 4\ysol{y} &= 0 \end{aligned}
Solve the constant-coefficient equation in ttWith constant coefficients, the usual ert\ysol{e^{rt}} characteristic equation gives y(t)\ysol{y(t)}.
r2+4r+4=0(r+2)2=0r=−2 (repeated)y(t)=c1e−2t+c2te−2t\displaystyle \begin{aligned} \ydd{r^2} + 4\yd{r} + 4 &= 0 \\ (r + 2)^2 &= 0 \\ r &= -2 \text{ (repeated)} \\ \ysol{y(t)} &= \bone{c_1 e^{-2t}} + \btwo{c_2 t e^{-2t}} \end{aligned}
Convert tt back into xxReplacing e−2t\bone{e^{-2t}} with x−2\bone{x^{-2}} and t\btwo{t} with ln⁡(x)\btwo{\ln(x)} gives the solution in terms of xx.
y(x)\displaystyle \ysol{y(x)} =c1x−2+c2ln⁡(x)x−2\displaystyle = \bone{c_1 x^{-2}} + \btwo{c_2 \ln(x) x^{-2}}

This gives the same solution as the y=xr\ysol{y} = \ysol{x^r} shortcut while showing why x2y′′x^2\ydd{y''} always turns into r2−r\ydd{r^2} - \yd{r}.

Switching the horizontal axis from xx to t=ln⁡(x)t = \ln(x) turns the Cauchy-Euler solutions xr\ysol{x^r}, xrln⁡(x)\btwo{x^r\ln(x)}, and xαcos⁡(βln⁡(x))\ysol{x^\alpha}\bone{\cos(\beta\ln(x))} directly into the familiar constant-coefficient curves ert\ysol{e^{rt}}, tert\btwo{te^{rt}}, and evenly spaced waves eαtcos⁡(βt)\ysol{e^{\alpha t}}\bone{\cos(\beta t)}.

Stretching the horizontal axis into log spacing turns the Cauchy-Euler curves straight into the familiar constant-coefficient curves.
7

Nonhomogeneous equations with Variation of Parameters

Now we want to solve a nonhomogeneous Cauchy-Euler equation where the right-hand side is not zero:

x2y′′−2xy′+2y\displaystyle x^2 \ydd{y''} - 2x \yd{y'} + 2\ysol{y} =2x3\displaystyle = \force{2x^3}

Because x2x^2 and −2x-2x multiply the derivatives on the left, the usual Undetermined Coefficients guesses in xx fail for right-hand sides like ex\force{e^x} or sin⁡(x)\force{\sin(x)}. So we use the method that works for any right-hand side: we find the homogeneous solution yh=c1y1+c2y2\homog{y_h} = c_1 \homog{y_1} + c_2 \homog{y_2} first, and then build the particular solution yp=u1y1+u2y2\force{y_p} = u_1 \homog{y_1} + u_2 \homog{y_2} using Variation of Parameters:

u1′=−y2f(x)W,u2′=y1f(x)W,W=∣y1y2y1′y2′∣\displaystyle u_1' = -\frac{\homog{y_2} \force{f(x)}}{W}, \qquad u_2' = \frac{\homog{y_1} \force{f(x)}}{W}, \qquad W = \begin{vmatrix} \homog{y_1} & \homog{y_2} \\ \homog{y_1'} & \homog{y_2'} \end{vmatrix}
Nonhomogeneous equations with Variation of Parameters
x2y′′−2xy′+2y\displaystyle x^2\ydd{y''} - 2x\yd{y'} + 2\ysol{y} =2x3\displaystyle = \force{2x^3}
yh\displaystyle \homog{y_h} =  ?,yp\displaystyle = \;?,\qquad \force{y_p} =  ?\displaystyle = \;?
Text solution
Solve the homogeneous equation for y1\homog{y_1} and y2\homog{y_2}Setting the right side to zero gives the two powers of xx.
r(r−1)−2r+2=0r2−3r+2=0(r−1)(r−2)=0r=1,r=2yh=c1x⏟y1+c2x2⏟y2\displaystyle \begin{gathered} \begin{aligned} \ydd{r(r - 1)} - 2\yd{r} + 2 &= 0 \\ \ydd{r^2} - 3\yd{r} + 2 &= 0 \\ (r - 1)(r - 2) &= 0 \\ r = 1, \quad r &= 2 \end{aligned} \\ \homog{y_h} = c_1 \underbrace{\homog{x}}_{\homog{y_1}} + c_2 \underbrace{\homog{x^2}}_{\homog{y_2}} \end{gathered}
Divide the whole equation by x2x^2 to find f(x)\force{f(x)}Variation of Parameters requires 1⋅y′′1 \cdot \ydd{y''} at the front, so we divide every term by x2x^2 before taking f(x)\force{f(x)} from the right-hand side.
y′′−2xy′+2x2y=2x3x2y′′−2xy′+2x2y=2x⏟f(x)\displaystyle \begin{aligned} \ydd{y''} - \frac{2}{x}\yd{y'} + \frac{2}{x^2}\ysol{y} &= \force{\frac{2x^3}{x^2}} \\ \ydd{y''} - \frac{2}{x}\yd{y'} + \frac{2}{x^2}\ysol{y} &= \underbrace{\force{2x}}_{\force{f(x)}} \end{aligned}
Find the Wronskian WW of y1=x\homog{y_1} = \homog{x} and y2=x2\homog{y_2} = \homog{x^2}Multiplying the diagonals of the determinant and subtracting gives WW.
W=∣xx212x∣=x(2x)−x2(1)=2x2−x2=x2\displaystyle W = \begin{vmatrix} \homog{x} & \homog{x^2} \\ \homog{1} & \homog{2x} \end{vmatrix} = x(2x) - x^2(1) = 2x^2 - x^2 = x^2
Integrate u1′u_1' and u2′u_2'Plugging y1=x\homog{y_1} = \homog{x}, y2=x2\homog{y_2} = \homog{x^2}, W=x2W = x^2, and f(x)=2x\force{f(x)} = \force{2x} into the formulas leaves simple powers of xx to integrate.
u1′=−y2f(x)W=−x2(2x)x2=−2x  ⟹  u1=∫−2x dx=−x2u2′=y1f(x)W=x(2x)x2=2x2x2=2  ⟹  u2=∫2 dx=2x\displaystyle \begin{aligned} u_1' &= -\frac{\homog{y_2} \force{f(x)}}{W} = -\frac{\homog{x^2}(\force{2x})}{x^2} = -2x \\ &\implies u_1 = \int -2x\,dx = -x^2 \\ u_2' &= \frac{\homog{y_1} \force{f(x)}}{W} = \frac{\homog{x}(\force{2x})}{x^2} = \frac{2x^2}{x^2} = 2 \\ &\implies u_2 = \int 2\,dx = 2x \end{aligned}
Build yp\force{y_p} and add it to yh\homog{y_h}Combining u1y1+u2y2u_1 \homog{y_1} + u_2 \homog{y_2} gives the particular solution yp\force{y_p}, which adds to yh\homog{y_h} for the general solution.
yp=u1y1+u2y2=(−x2)(x)+(2x)(x2)=−x3+2x3=x3y=yh+yp=c1x+c2x2+x3\displaystyle \begin{aligned} \force{y_p} &= u_1 \homog{y_1} + u_2 \homog{y_2} \\ &= (-x^2)(\homog{x}) + (2x)(\homog{x^2}) \\ &= -x^3 + 2x^3 = \force{x^3} \\ \ysol{y} &= \homog{y_h} + \force{y_p} = c_1 \homog{x} + c_2 \homog{x^2} + \force{x^3} \end{aligned}

So c1x+c2x2c_1 \homog{x} + c_2 \homog{x^2} makes the left side equal zero, while x3\force{x^3} gives the 2x3\force{2x^3} on the right-hand side.

Key concepts

Here is how all of these pieces fit together.

Lesson recap
y\displaystyle \ysol{y} =xr\displaystyle = \ysol{x^r}
r1≠r2:y=  ?r1=r2:y=  ?r=α±βi:y=  ?\displaystyle \begin{alignedat}{2} \bone{r_1} \neq \btwo{r_2} &\text{:}\qquad & \ysol{y} &= \;? \\ r_1 = r_2 &\text{:} & \ysol{y} &= \;? \\ r = \ysol{\alpha} \pm \beta i &\text{:} & \ysol{y} &= \;? \end{alignedat}

Use y=erx\ysol{y} = \ysol{e^{rx}} when only constants sit in front of the derivatives, and use y=xr\ysol{y} = \ysol{x^r} when the power of xx on each term matches the order of the derivative (ax2y′′+bxy′+cy=0ax^2\ydd{y''} + bx\yd{y'} + c\ysol{y} = 0). Because xr=erln⁡(x)\ysol{x^r} = \ysol{e^{r\ln(x)}}, substituting t=ln⁡(x)t = \ln(x) turns any Cauchy-Euler equation into a constant-coefficient equation in tt, and the solutions follow the same three cases as erx\ysol{e^{rx}} with ln⁡(x)\ln(x) in place of xx. When the right-hand side is not zero, divide the entire equation by the ax2ax^2 in front of y′′\ydd{y''} to find f(x)\force{f(x)}, and then use Variation of Parameters.

8

Practice

1

Find the general solution to x2y′′−xy′−3y=0x^2\ydd{y''} - x\yd{y'} - 3\ysol{y} = 0.

What does x2y′′x^2\ydd{y''} turn into when you plug in y=xr\ysol{y} = \ysol{x^r} and pull down two exponents?

Replace x2y′′x^2\ydd{y''} with r(r−1)\ydd{r(r - 1)}, xy′x\yd{y'} with r\yd{r}, and y\ysol{y} with 1\ysol{1}:
r(r−1)−r−3=0r2−r−r−3=0r2−2r−3=0\displaystyle \begin{aligned} \ydd{r(r - 1)} - \yd{r} - 3 &= 0 \\ \ydd{r^2} - \yd{r} - \yd{r} - 3 &= 0 \\ \ydd{r^2} - 2\yd{r} - 3 &= 0 \end{aligned}
(Watch out: replacing x2y′′x^2\ydd{y''} with r2r^2 instead of r(r−1)\ydd{r(r - 1)} gives r2−r−3=0r^2 - r - 3 = 0 and y=c1x(1+13)/2+c2x(1−13)/2y = c_1 x^{(1+\sqrt{13})/2} + c_2 x^{(1-\sqrt{13})/2}; or canceling −r−r-r - r to 00 instead of −2r-2\yd{r} gives r2−3=0r^2 - 3 = 0 and y=c1x3+c2x−3y = c_1 x^{\sqrt{3}} + c_2 x^{-\sqrt{3}}.)
Factor for rr and place the roots as exponents on xx:
(r−3)(r+1)=0r=3,r=−1\displaystyle \begin{aligned} (\bone{r - 3})(\btwo{r + 1}) &= 0 \\ \bone{r = 3}, \quad \btwo{r} &= \btwo{-1} \end{aligned}
(Watch out: putting the roots into erx\ysol{e^{rx}} out of habit gives y=c1e3x+c2e−xy = c_1 e^{3x} + c_2 e^{-x} instead of powers of xx.)
Answer: y=c1x3+c2x−1\ysol{y} = \bone{c_1x^3} + \btwo{c_2x^{-1}}
2

Find the general solution to x2y′′−5xy′+9y=0x^2\ydd{y''} - 5x\yd{y'} + 9\ysol{y} = 0.

Once you find the repeated root rr, what takes the place of xx when building the second term in a Cauchy-Euler equation?

Replace the derivatives with rr's and factor:
r(r−1)−5r+9=0r2−r−5r+9=0r2−6r+9=0(r−3)2=0r=3 (repeated)\displaystyle \begin{aligned} \ydd{r(r - 1)} - 5\yd{r} + 9 &= 0 \\ \ydd{r^2} - \yd{r} - 5\yd{r} + 9 &= 0 \\ \ydd{r^2} - 6\yd{r} + 9 &= 0 \\ (r - 3)^2 &= 0 \\ r &= 3 \text{ (repeated)} \end{aligned}
Write the first term with x3\bone{x^3} and multiply by ln⁡(x)\btwo{\ln(x)} for the second term. (Watch out: multiplying the repeated term by xx instead of ln⁡(x)\btwo{\ln(x)} turns x⋅x3x \cdot x^3 into x4x^4, giving the wrong answer y=c1x3+c2x4y = c_1 x^3 + c_2 x^4.)
Answer: y=c1x3+c2x3ln⁡(x)\ysol{y} = \bone{c_1x^3} + \btwo{c_2x^3\ln(x)}
3

Find the general solution to x2y′′+3xy′+5y=0x^2\ydd{y''} + 3x\yd{y'} + 5\ysol{y} = 0.

After finding the complex roots r=α±βir = \alpha \pm \beta i, where does α\alpha go and what sits inside cosine and sine alongside β\beta?

Replace the derivatives with rr's and use the quadratic formula:
r(r−1)+3r+5=0r2−r+3r+5=0r2+2r+5=0r=−2±4−202=−2±4i2=−1±2i\displaystyle \begin{aligned} \ydd{r(r - 1)} + 3\yd{r} + 5 &= 0 \\ \ydd{r^2} - \yd{r} + 3\yd{r} + 5 &= 0 \\ \ydd{r^2} + 2\yd{r} + 5 &= 0 \\ r &= \frac{-2 \pm \sqrt{4 - 20}}{2} = \frac{-2 \pm 4i}{2} = \ysol{-1} \pm 2i \end{aligned}
Use the real part −1\ysol{-1} as the power on xx out front and multiply the imaginary part 22 by ln⁡(x)\ln(x) inside cosine and sine. (Watch out: writing 2x2x instead of 2ln⁡(x)2\ln(x) inside cosine and sine gives y=x−1(c1cos⁡(2x)+c2sin⁡(2x))y = x^{-1}(c_1\cos(2x) + c_2\sin(2x)), or using e−xe^{-x} out front gives y=e−x(c1cos⁡(2x)+c2sin⁡(2x))y = e^{-x}(c_1\cos(2x) + c_2\sin(2x)).)
Answer: y=x−1(c1cos⁡(2ln⁡(x))+c2sin⁡(2ln⁡(x)))\ysol{y} = \ysol{x^{-1}}(\bone{c_1\cos(2\ln(x))} + \btwo{c_2\sin(2\ln(x))})
4

Find the general solution to 2xy′′+3y′−1xy=02x\ydd{y''} + 3\yd{y'} - \tfrac{1}{x}\ysol{y} = 0.

Look at the powers of xx in front of y′′\ydd{y''}, y′\yd{y'}, and y\ysol{y}. What should you multiply the entire equation by before replacing derivatives with rr's?

Multiply the entire equation by xx so the powers of xx match the derivative orders:
2x2y′′+3xy′−y\displaystyle 2x^2\ydd{y''} + 3x\yd{y'} - \ysol{y} =0\displaystyle = 0
Replace x2y′′x^2\ydd{y''} with r(r−1)\ydd{r(r - 1)}, keeping the 22 outside parentheses:
2r(r−1)+3r−1=02r2−2r+3r−1=02r2+r−1=0(2r−1)(r+1)=0r=12,r=−1\displaystyle \begin{aligned} 2\ydd{r(r - 1)} + 3\yd{r} - 1 &= 0 \\ 2\ydd{r^2} - 2\yd{r} + 3\yd{r} - 1 &= 0 \\ 2\ydd{r^2} + \yd{r} - 1 &= 0 \\ (\bone{2r - 1})(\btwo{r + 1}) &= 0 \\ \bone{r = \frac{1}{2}}, \quad \btwo{r} &= \btwo{-1} \end{aligned}
(Watch out: forgetting parentheses around r(r−1)\ydd{r(r - 1)} so the 22 only multiplies r2r^2 gives 2r2−r+3r−1=02r^2 - r + 3r - 1 = 0, leading to the wrong roots r=−1±32r = \frac{-1 \pm \sqrt{3}}{2} and y=c1x(−1+3)/2+c2x(−1−3)/2y = c_1 x^{(-1+\sqrt{3})/2} + c_2 x^{(-1-\sqrt{3})/2}.)
Answer: y=c1x1/2+c2x−1\ysol{y} = \bone{c_1x^{1/2}} + \btwo{c_2x^{-1}}
5

Use the substitution t=ln⁡(x)t = \ln(x) to rewrite x2y′′+3xy′−3y=0x^2\ydd{y''} + 3x\yd{y'} - 3\ysol{y} = 0 as a constant-coefficient differential equation in tt, then find the general solution y(x)\ysol{y(x)}.

When you substitute xy′=dydtx\yd{y'} = \yd{\frac{dy}{dt}}, what two terms replace x2y′′x^2\ydd{y''}?

Substitute x2y′′=d2ydt2−dydtx^2\ydd{y''} = \ydd{\frac{d^2y}{dt^2}} - \yd{\frac{dy}{dt}} and xy′=dydtx\yd{y'} = \yd{\frac{dy}{dt}}, then combine the dydt\yd{\frac{dy}{dt}} terms:
(d2ydt2−dydt)+3dydt−3y=0d2ydt2+2dydt−3y=0\displaystyle \begin{aligned} \left(\ydd{\frac{d^2y}{dt^2}} - \yd{\frac{dy}{dt}}\right) + 3\yd{\frac{dy}{dt}} - 3\ysol{y} &= 0 \\ \ydd{\frac{d^2y}{dt^2}} + 2\yd{\frac{dy}{dt}} - 3\ysol{y} &= 0 \end{aligned}
(Watch out: replacing x2y′′x^2\ydd{y''} with just d2ydt2\frac{d^2y}{dt^2} and forgetting the −dydt-\yd{\frac{dy}{dt}} term leaves d2ydt2+3dydt−3y=0\frac{d^2y}{dt^2} + 3\frac{dy}{dt} - 3y = 0, which gives y(x)=c1x(−3+21)/2+c2x(−3−21)/2y(x) = c_1 x^{(-3+\sqrt{21})/2} + c_2 x^{(-3-\sqrt{21})/2}.)
Solve the constant-coefficient equation in tt and substitute et=xe^t = x back in:
r2+2r−3=0(r−1)(r+3)=0r=1,r=−3y(t)=c1et+c2e−3t\displaystyle \begin{aligned} \ydd{r^2} + 2\yd{r} - 3 &= 0 \\ (\bone{r - 1})(\btwo{r + 3}) &= 0 \\ \bone{r = 1}, \quad \btwo{r} &= \btwo{-3} \\ \ysol{y(t)} &= \bone{c_1 e^t} + \btwo{c_2 e^{-3t}} \end{aligned}
Answer: d2ydt2+2(dydt)−3y=0\ydd{\tfrac{d^2y}{dt^2}} + 2\left(\yd{\tfrac{dy}{dt}}\right) - 3\ysol{y} = 0; y(x)=c1x+c2x−3\ysol{y(x)} = \bone{c_1x} + \btwo{c_2x^{-3}}
6

Find the general solution to x2y′′+xy′−y=4x2x^2\ydd{y''} + x\yd{y'} - \ysol{y} = \force{4x^2} using Variation of Parameters.

After finding y1\homog{y_1} and y2\homog{y_2} from the homogeneous equation, what must you divide the original equation by before taking f(x)\force{f(x)} from the right-hand side?

Solve the homogeneous equation x2y′′+xy′−y=0x^2\ydd{y''} + x\yd{y'} - \ysol{y} = 0:
r(r−1)+r−1=0r2−1=0r=1,r=−1yh=c1x⏟y1+c2x−1⏟y2\displaystyle \begin{aligned} \ydd{r(r - 1)} + \yd{r} - 1 &= 0 \\ \ydd{r^2} - 1 &= 0 \\ r = 1, \quad r &= -1 \\ \homog{y_h} &= c_1 \underbrace{\homog{x}}_{\homog{y_1}} + c_2 \underbrace{\homog{x^{-1}}}_{\homog{y_2}} \end{aligned}
Divide the entire equation by x2x^2 so it starts with 1⋅y′′1 \cdot \ydd{y''}:
y′′+1xy′−1x2y\displaystyle \ydd{y''} + \frac{1}{x}\yd{y'} - \frac{1}{x^2}\ysol{y} =4x2x2\displaystyle = \force{\frac{4x^2}{x^2}} =4⏟f(x)\displaystyle = \underbrace{\force{4}}_{\force{f(x)}}
(Watch out: taking f(x)=4x2f(x) = 4x^2 directly from the original equation without dividing by x2x^2 first gives u1=23x3u_1 = \frac{2}{3}x^3 and u2=−25x5u_2 = -\frac{2}{5}x^5, leading to the wrong answer y=c1x+c2x−1+415x4y = c_1 x + c_2 x^{-1} + \frac{4}{15}x^4.)
Compute the Wronskian WW and integrate u1′u_1' and u2′u_2':
W=∣xx−11−x−2∣=x(−x−2)−x−1(1)=−2x−1u1′=−x−1(4)−2x−1=2  ⟹  u1=∫2 dx=2xu2′=x(4)−2x−1=−2x2  ⟹  u2=∫−2x2 dx=−23x3yp=(2x)(x)+(−23x3)(x−1)=2x2−23x2=43x2\displaystyle \begin{aligned} W &= \begin{vmatrix} \homog{x} & \homog{x^{-1}} \\ \homog{1} & \homog{-x^{-2}} \end{vmatrix} = x(-x^{-2}) - x^{-1}(1) = -2x^{-1} \\ u_1' &= -\frac{\homog{x^{-1}}(\force{4})}{-2x^{-1}} = 2 \\ &\implies u_1 = \int 2\,dx = 2x \\ u_2' &= \frac{\homog{x}(\force{4})}{-2x^{-1}} = -2x^2 \\ &\implies u_2 = \int -2x^2\,dx = -\frac{2}{3}x^3 \\ \force{y_p} &= (2x)(\homog{x}) + \left(-\frac{2}{3}x^3\right)(\homog{x^{-1}}) \\ &= 2x^2 - \frac{2}{3}x^2 = \force{\frac{4}{3}x^2} \end{aligned}
Answer: y=c1x+c2x−1+43x2\ysol{y} = c_1\homog{x} + c_2\homog{x^{-1}} + \force{\tfrac{4}{3}x^2}