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 x sit in front of the derivatives instead.
1
Why y=xr works
Suppose we want to solve an equation where each derivative is multiplied by a matching power of x:
Cauchy-Euler equation:power of x matches derivative orderx2y′′−2xy′−4y=0
Our old exponential guess y=erx fails here because the x2 and x 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 x and x2 brings every term back to the same power of x.
Why y = xʳ works for Cauchy-Euler equations
y′′−3y′−4yx2y′′−2xy′−4y=0=0
y=erx⟶y=?
Testing y=xr works because the powers of x in the equation put back the powers lost from each derivative:
On their own, the derivatives y′=rxr−1 and y′′=r(r−1)xr−2 have different exponents from y=xr and curve differently. Multiplying by x and x2 turns xy′ and x2y′′ into simple multiples of y=xr for every choice of r, and when r=1 makes y=x a straight line, the (r−1) factor makes x2y′′ equal zero everywhere.
Taking derivatives of a power curve changes its shape, while multiplying by x and x2 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=0
Once xr 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=0
yxy′x2y′′=xr=rxr=r(r−1)xr
r=?,y=?
Text solution
Pull down the exponents for y=xrEach derivative brings down the current exponent before xr cancels out of the equation.
from x2y′′r(r−1)−2from xy′r−4from y(1)=0
Expand and factor for rDistributing r turns the left side into a quadratic we can factor to find the exponents.
r2−r−2r−4r2−3r−4(r−4)(r+1)r=4,r=0=0=0=−1
Put each root r into the exponent of xrBecause we guessed y=xr rather than erx, the roots become powers of x.
y=c1x4+c2x−1
So any combination of x4 and 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=0
One root gives us one power of x, so we need a way to build a second, genuinely different solution without changing the exponent r.
Repeated roots and why ln(x) appears
x2y′′+3xy′+y=0
y=c1x−1+c2?
Text solution
Replace the derivative terms with r's and factorPulling down the exponents of xr and combining like terms gives a repeated root.
Multiply the repeated power by ln(x) for the second solutionSince x=eln(x) turns xr into erln(x),ln(x) sits where x used to sit in erx, so a repeated root gets multiplied by ln(x).
y=c1x−1+c2x−1ln(x)
Multiplying by ln(x) gives a second independent curve, whereas multiplying x−1 by x would just add 1 to the exponent and give x0=1, which is the guess xr for r=0, and r=0 is not a root, so 1 does not solve the equation.
4
Complex roots
Replacing x with ln(x) also tells us what happens when the quadratic formula gives complex roots with i. Let's find the general solution to
x2y′′−3xy′+13y=0
Complex roots
x2y′′−3xy′+13y=0
y=?
Text solution
Solve for the complex roots with the quadratic formulaReplacing the derivatives with r's and simplifying leaves a negative number under the square root.
Split the real power from the imaginary partThe real part 2 stays outside as x2, while the imaginary part 3i becomes e3iln(x), putting 3ln(x) inside cosine and sine.
y=real part 2x2(c1cos(imaginarypart 33ln(x))+c2sin(3ln(x)))
So complex roots r=2±3i produce waves in ln(x):x2cos(3ln(x)) and x2sin(3ln(x)) each stay between x2 and −x2.
In the solution curve y=xαcos(βln(x)) for x>0, the real part α sets the outer curves ±xα, so as x increases the wave dies out when α<0, keeps the same height when α=0, and grows when α>0, while the imaginary part β sets how fast the wave oscillates. Because ln(x) changes quickly near zero and slowly for large x, the waves bunch up tightly near x=0 and stretch out as x 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) and r, check whether there is an extra constant in front of x2y′′ or whether the powers of x do not match the order of each derivative.
Two setup traps to watch out for
2x2y′′+5xy′+yxy′′+3y′=0=0→?→?
When a number sits in front of x2y′′, keep parentheses around r(r−1) so the number multiplies both terms when you expand:
2x2y′′+5xy′+y2r(r−1)+5r+12r2−2r+5r+1=0=0=0
And if every term is missing an x, multiply the entire equation by x first so the powers of x match the derivatives before replacing them with r's:
xy′′+3y′=0multiply by xx2y′′+3xy′=0
6
Transforming to constant coefficients with t=ln(x)
Sometimes we want to solve an equation like
x2y′′+5xy′+4y=0
by substituting t=ln(x) (or x=et) to turn it into a constant-coefficient equation in t. Guessing y=xr gets the final answer faster, but when a problem asks you to use t=ln(x), you need to write out the transformed differential equation in t as part of the work.
Transforming to constant coefficients with t = ln(x)
t=ln(x)
xy′x2y′′=?=?
Because dxdt=x1, switching the derivatives from x to t with the Chain Rule cancels the x and x2 coefficients completely:
xy′x2y′′=xdxdy=dtdy=x2dx2d2y=dt2d2y−dtdy
Text solution
Replace x2y′′ and xy′ with derivatives in tSubstituting the Chain Rule expressions removes every x and leaves a constant-coefficient equation in t.
(dt2d2y−dtdy)+5dtdy+4ydt2d2y+4dtdy+4y=0=0
Solve the constant-coefficient equation in tWith constant coefficients, the usual ert characteristic equation gives y(t).
Convert t back into xReplacing e−2t with x−2 and t with ln(x) gives the solution in terms of x.
y(x)=c1x−2+c2ln(x)x−2
This gives the same solution as the y=xr shortcut while showing why x2y′′ always turns into r2−r.
Switching the horizontal axis from x to t=ln(x) turns the Cauchy-Euler solutions xr,xrln(x), and xαcos(βln(x)) directly into the familiar constant-coefficient curves ert,tert, and evenly spaced waves eαtcos(β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=2x3
Because x2 and −2x multiply the derivatives on the left, the usual Undetermined Coefficients guesses in x fail for right-hand sides like ex or sin(x). So we use the method that works for any right-hand side: we find the homogeneous solution yh=c1y1+c2y2 first, and then build the particular solution yp=u1y1+u2y2 using Variation of Parameters:
Divide the whole equation by x2 to find f(x)Variation of Parameters requires 1⋅y′′ at the front, so we divide every term by x2 before taking f(x) from the right-hand side.
y′′−x2y′+x22yy′′−x2y′+x22y=x22x3=f(x)2x
Find the Wronskian W of y1=x and y2=x2Multiplying the diagonals of the determinant and subtracting gives W.
W=x1x22x=x(2x)−x2(1)=2x2−x2=x2
Integrate u1′ and u2′Plugging y1=x,y2=x2,W=x2, and f(x)=2x into the formulas leaves simple powers of x to integrate.
So c1x+c2x2 makes the left side equal zero, while x3 gives the 2x3 on the right-hand side.
Key concepts
Here is how all of these pieces fit together.
Lesson recap
y=xr
r1=r2r1=r2r=α±βi:::yyy=?=?=?
Use y=erx when only constants sit in front of the derivatives, and use y=xr when the power of x on each term matches the order of the derivative (ax2y′′+bxy′+cy=0). Because xr=erln(x), substituting t=ln(x) turns any Cauchy-Euler equation into a constant-coefficient equation in t, and the solutions follow the same three cases as erx with ln(x) in place of x. When the right-hand side is not zero, divide the entire equation by the ax2 in front of y′′ to find f(x), and then use Variation of Parameters.
8
Practice
1
Find the general solution to x2y′′−xy′−3y=0.
What does x2y′′ turn into when you plug in y=xr and pull down two exponents?
Replace x2y′′ with r(r−1),xy′ with r, and y with 1:
r(r−1)−r−3r2−r−r−3r2−2r−3=0=0=0
(Watch out: replacing x2y′′ with r2 instead of r(r−1) gives r2−r−3=0 and y=c1x(1+13)/2+c2x(1−13)/2; or canceling −r−r to 0 instead of −2r gives r2−3=0 and y=c1x3+c2x−3.)
Factor for r and place the roots as exponents on x:
(r−3)(r+1)r=3,r=0=−1
(Watch out: putting the roots into erx out of habit gives y=c1e3x+c2e−x instead of powers of x.)
Answer: y=c1x3+c2x−1
2
Find the general solution to x2y′′−5xy′+9y=0.
Once you find the repeated root r, what takes the place of x when building the second term in a Cauchy-Euler equation?
Write the first term with x3 and multiply by ln(x) for the second term. (Watch out: multiplying the repeated term by x instead of ln(x) turns x⋅x3 into x4, giving the wrong answer y=c1x3+c2x4.)
Answer: y=c1x3+c2x3ln(x)
3
Find the general solution to x2y′′+3xy′+5y=0.
After finding the complex roots r=α±βi, where does α go and what sits inside cosine and sine alongside β?
Replace the derivatives with r's and use the quadratic formula:
Use the real part −1 as the power on x out front and multiply the imaginary part 2 by ln(x) inside cosine and sine. (Watch out: writing 2x instead of 2ln(x) inside cosine and sine gives y=x−1(c1cos(2x)+c2sin(2x)), or using e−x out front gives y=e−x(c1cos(2x)+c2sin(2x)).)
Answer: y=x−1(c1cos(2ln(x))+c2sin(2ln(x)))
4
Find the general solution to 2xy′′+3y′−x1y=0.
Look at the powers of x in front of y′′,y′, and y. What should you multiply the entire equation by before replacing derivatives with r's?
Multiply the entire equation by x so the powers of x match the derivative orders:
2x2y′′+3xy′−y=0
Replace x2y′′ with r(r−1), keeping the 2 outside parentheses:
(Watch out: forgetting parentheses around r(r−1) so the 2 only multiplies r2 gives 2r2−r+3r−1=0, leading to the wrong roots r=2−1±3 and y=c1x(−1+3)/2+c2x(−1−3)/2.)
Answer: y=c1x1/2+c2x−1
5
Use the substitution t=ln(x) to rewrite x2y′′+3xy′−3y=0 as a constant-coefficient differential equation in t, then find the general solution y(x).
Watch out: replacing x2y′′ with just dt2d2y and forgetting the −dtdy term leaves dt2d2y+3dtdy−3y=0, which gives y(x)=c1x(−3+21)/2+c2x(−3−21)/2.
When you substitute xy′=dtdy, what two terms replace x2y′′?
Substitute x2y′′=dt2d2y−dtdy and xy′=dtdy, then combine the dtdy terms:
(dt2d2y−dtdy)+3dtdy−3ydt2d2y+2dtdy−3y=0=0
(Watch out: replacing x2y′′ with just dt2d2y and forgetting the −dtdy term leaves dt2d2y+3dtdy−3y=0, which gives y(x)=c1x(−3+21)/2+c2x(−3−21)/2.)
Solve the constant-coefficient equation in t and substitute et=x back in:
r2+2r−3(r−1)(r+3)r=1,ry(t)=0=0=−3=c1et+c2e−3t
Answer: dt2d2y+2(dtdy)−3y=0;y(x)=c1x+c2x−3
6
Find the general solution to x2y′′+xy′−y=4x2 using Variation of Parameters.
After finding y1 and y2 from the homogeneous equation, what must you divide the original equation by before taking f(x) from the right-hand side?
Divide the entire equation by x2 so it starts with 1⋅y′′:
y′′+x1y′−x21y=x24x2=f(x)4
(Watch out: taking f(x)=4x2 directly from the original equation without dividing by x2 first gives u1=32x3 and u2=−52x5, leading to the wrong answer y=c1x+c2x−1+154x4.)
Compute the Wronskian W and integrate u1′ and u2′: