The Student Room Group

Why do you have to multiply the Particular integral by x or x^2?

Why must the particular integral for a second order non homogeneous be multiplied by x or x^2 if part of it appears in the complementary function?
E.g.

y’’ - 4y’ + 4y = 8 e^(2x)

The CF is y = (A + Bx)*e^(2x)
And the book says that the PI should be of form Q * (x^2) * e^(2x).
My issue is why do we multiple the PI substitution by x if there’s a multiple of f(x) in the CF.
Is there a proof for this or a video, I’ve seen that it doesn’t work if you don’t but is there an actual proof?
Reply 1
Original post by Mathstermind
Why must the particular integral for a second order non homogeneous be multiplied by x or x^2 if part of it appears in the complementary function?
E.g.

y’’ - 4y’ + 4y = 8 e^(2x)

The CF is y = (A + Bx)*e^(2x)
And the book says that the PI should be of form Q * (x^2) * e^(2x).
My issue is why do we multiple the PI substitution by x if there’s a multiple of f(x) in the CF.
Is there a proof for this or a video, I’ve seen that it doesn’t work if you don’t but is there an actual proof?


Its similar to whar happens when you have a repeated root in the CF, ie
y'' - 4y' + 4y =....
The CF is
Ae^{2x} + Bxe^{2x}
Two reasons for accepting it:
1) substitute it into the equation and verify it is zero (homogeneous solution)
2) explore what happens when the differential equation has two roots which are not identical, but very close together. You get a solution like
Ae^{s_1 x} + Be^{s_2 x}
Where the two roots s_1 and s_2 are very close, but the coefficients A and B tend to +/- infinity as the roots get closer. Performing the difference (as a series) shows the expansion can be written as
Ae^{2x} + Bxe^{2x}
where A and B are now finite.

Edit: Note wolframalpha goes screwy when the roots (exponents) are close -can't lay my hands on another solver which is more robust, but its a good thing to examine.
https://www.wolframalpha.com/input/?i=y%27%27%28t%29+%2B+4y%27%28t%29%2B+3.99y%28t%29+%3D+sin+t%2C+y%280%29%3D0%2C+y%27%280%29%3D0
(edited 4 years ago)
Original post by Mathstermind
Why must the particular integral for a second order non homogeneous be multiplied by x or x^2 if part of it appears in the complementary function?
E.g.

y’’ - 4y’ + 4y = 8 e^(2x)

The CF is y = (A + Bx)*e^(2x)
And the book says that the PI should be of form Q * (x^2) * e^(2x).
My issue is why do we multiple the PI substitution by x if there’s a multiple of f(x) in the CF.
Is there a proof for this or a video, I’ve seen that it doesn’t work if you don’t but is there an actual proof?


The theory of ordinary differential equations is a bit of minefield but this (rather long) discussion of ODE's will hopefully help out.

We can represent the differential equation af+bf+cfaf''+bf'+cf in shorthand by simply writing D(f):=af+bf+cf\mathcal{D}(f):=af''+bf'+cf. I also denote functions in short as f=f(x)f=f(x) and f=f(x)f'=f'(x) etc.

The homogeneous case is D(f)=0\mathcal{D}(f)=0 and the inhomogeneous case is D(f)=g(x)\mathcal{D}(f)=g(x).

By the property of differentiation for the addition of two functions, i.e. (f1+f2)=f1+f2(f_{1}+f_{2})'=f_{1}'+f_{2}' we see that D(f1+f2)=D(f1)+D(f2)\mathcal{D}(f_{1}+f_{2}) = \mathcal{D}(f_{1})+\mathcal{D}(f_{2}).

In particular, if f1f_{1} is a solution to the homogenous case and f2f_{2} is a solution to the inhomogenous case then D(f1+f2)=D(f1)+D(f2)=0+g(x)=g(x)\mathcal{D}(f_{1}+f_{2}) = \mathcal{D}(f_{1})+\mathcal{D}(f_{2})=0+g(x)=g(x). So f1+f2f_{1}+f_{2} is also a solution to the inhomogeneous case. This is why you do the general solution to the homogenous case before finding the particular integral.

Suppose now we want to solve D(f)=Ceμx\mathcal{D}(f)=Ce^{\mu x} for some real number μ\mu. By finding a solution ff by assuming that f(x)=Aeλxf(x)=Ae^{\lambda x} we see from the characteristic equation obtained that λ=b±b24ac2a\displaystyle \lambda = \frac{-b\pm \sqrt{b^{2}-4ac}}{2a}. Hopefully, this all makes sense so far.

Now we've found our λ\lambda such that D(Aeλx)=0\mathcal{D}\left(Ae^{\lambda x}\right)=0

Using the product rule for differentiation and some rearranging we find that D(xf)=xD(f)+2af+bf\mathcal{D}(xf) = x\mathcal{D}(f)+2af'+bf. But by construction as ff is a solution to the homogenous case we have that D(f)=0\mathcal{D}(f)=0. Thus D(xf)=2af+bf\mathcal{D}(xf) = 2af'+bf. So D(xf)\mathcal{D}(xf) is actually a first order differential equation.

We now plan to solve D(xf)=eμx\mathcal{D}(xf)=e^{\mu x}. Again assume that f(x)=Aeλxf(x)=Ae^{\lambda x} and solve the homogenous case first. Remember we still have λ=b±b24ac2a\displaystyle \lambda = \frac{-b\pm \sqrt{b^{2}-4ac}}{2a} for D(f)=0\mathcal{D}(f)=0 - we cannot violate this in our solution.

We have that 2aλ+b=02a\lambda +b=0 so we have that λ=b2a\lambda = -\frac{b}{2a}. Now if b24ac=0b^{2}-4ac=0, we have a repeated root in the characteristic equation, then we already had that λ=b2a\lambda=-\frac{b}{2a} so we are safe.

If b24ac0b^{2}-4ac\neq 0 then we do not have that D(xf)=0\mathcal{D}(xf)=0.

We split this into two cases

Case 1: b24ac=0b^{2}-4ac=0

In this case λ=b2a\lambda=-\frac{b}{2a} and we will assume λ\lambda takes this value from now on.

We have that D(Aeλx)=0\mathcal{D}\left(Ae^{\lambda x}\right)=0 and D(Bxeλx)=0\mathcal{D}\left(Bxe^{\lambda x}\right)=0. So AeλxAe^{\lambda x} and BxeλxBxe^{\lambda x} are both solutions to the homogenous case. Hence our general solution to D(f)=0\mathcal{D}(f)=0 is (A+Bx)eλx(A+Bx)e^{\lambda x}.

Now we want to find our particular integral h(x)h(x) such that D(h)=Ceμx\mathcal{D}(h)=Ce^{\mu x} where C0C\neq 0.

Case 1 (I) μ=λ\mu=\lambda

In this case we make the guess that h=Meλxh=Me^{\lambda x} but we know that for this case that D(h)=0\mathcal{D}(h)=0 and D(xh)=0\mathcal{D}(xh)=0 so neither h(x)h(x) or xh(x)xh(x) can be our particular integral.

But again by clever rearrangement we have that D(x2h)=x2D(h)+2xD(xh)+2ah=0+0+2ah=2ah\mathcal{D}(x^{2}h)=x^{2} \mathcal{D}(h)+2x\mathcal{D}(xh)+2ah=0+0+2ah=2ah. Now we can easily see that D(x2Meλx)=2aMeλx\mathcal{D}(x^{2}Me^{\lambda x})=2aMe^{\lambda x}

So taking M=C2aM=\frac{C}{2a} gives our desired result P.I.

Case 1 (II) μλ\mu\neq\lambda

In this case we have that our guess h(x)=Meμxh(x)=M e^{\mu x} at the P.I. is not a solution to the homogenous case so D(h)=αh(x)\mathcal{D}(h)=\alpha h(x) for some constant α\alpha. Thus, the P.I. drops straight out.

Case 2: b24ac0b^{2}-4ac\neq 0

Essentially we have that D(xf)0\mathcal{D}(xf)\neq 0 and D(xf)=αf\mathcal{D}(xf)=\alpha f for some constant α\alpha. So find the P.I. this way.


I may just write this as a pdf to save the pain of LaTeX on TSR.
(edited 4 years ago)
Lel longest TSR post of my life. Praying that it makes sense.

As a tl;dr essentially multiplying by x reduces the order of differential equation by one. Then as long as no repeated root the P.I. drops out. Else we multiply by x again.

I'll clean it all up in a pdf file tomorrow.
(edited 4 years ago)
Original post by Mathstermind
Why must the particular integral for a second order non homogeneous be multiplied by x or x^2 if part of it appears in the complementary function?
E.g.

y’’ - 4y’ + 4y = 8 e^(2x)

The CF is y = (A + Bx)*e^(2x)
And the book says that the PI should be of form Q * (x^2) * e^(2x).
My issue is why do we multiple the PI substitution by x if there’s a multiple of f(x) in the CF.
Is there a proof for this or a video, I’ve seen that it doesn’t work if you don’t but is there an actual proof?


To my mind, the following is the most satisfactory explanation of where the 'x' comes from:

Firstly, consider a first order non-homogeneous equation of the form y' - ay = e^bx (1)

By use of an integrating factor (or recognition), we note that ddx(yeax)=(yay)eax\dfrac{d}{dx}(ye^{-ax}) = (y' - ay)e^{-ax} (2). If we multiply (1) by eaxe^{-ax} we get (yay)eax=e(ba)x(y' - ay)e^{-ax} = e^{(b-a)x} and then by (2) this becomes ddx(yeax)=e(ba)x\dfrac{d}{dx}(ye^{-ax}) = e^{(b-a)x}

Integrating both sides w.r.t. x, we get yeax=e(ba)xdxye^{-ax} = \int e^{(b-a)x} \,dx (3)

Now the key point here is that the RHS of (3) evaluates to 1bae(ba)x+C\frac{1}{b-a} e^{(b-a)x} + C, unless a=b, when the integrand is just 1, and so the integral becomes x + C.

This is precisely why the PI takes the form e^bx (don't forget that we need to multiply both sides of (3) by e^{ax} to get just y on the LHS) unless b = a when the PI takes the form xe^ax. (or xe^bx since a=b).

We now need to see how knowing how to solve a first order equation generalises to equations of 2nd (or higher) degree.

So, for a second order equation y'' + Ay' + By = P(x), note that if the aux equation has roots a, b, then if we write D for the differential operator ddx\frac{d}{dx}, we can rewrite this as (D-a)(D-b)y = P(x) (4). Without stressing too much about "what this means" (*), the point is that if we solve (D-a)z = P(x) (i.e. solve dzdxaz=P(x)\frac{dz}{dx} - az = P(x)), and then we solve (D-b)y = z, we end up with a solution to the 2nd order equation. [If]. The same idea works for higher order equations - we just factor into first order equations and solve them one-by-one.

(*) The reason for defining this operator is basically that otherwise the notation somewhat sucks. But you can easily verify that if we define z=dydxbyz = \frac{dy}{dx} - by, then dzdxaz=y(a+b)y+aby=y+Ay+By\dfrac{dz}{dx} - az = y'' - (a+b)y' +aby = y'' + Ay' +By.

(**) If you're wondering how you get an x^2 factor in your original equation, you'll get one x when you solve (D-b)z = e^2x, and another x when you solve (D-a)y = z. (In the latter case, the RH integral in (3) will be xdx\int x\,dx and so you get a multiple of x^2 after integration).
(edited 4 years ago)
The tl;dr version of the above: Suppose you have a 2nd order DE y'' + Ay' + By = P(x) with aux equation roots a, b. Then the substitution z = y' - ay reduces this equation to the DE z' - bz = P(x). Multiply both sides by e^(-bz) and integrate, noting that ddxzebz=(zbz)ebz\frac{d}{dx} ze^{-bz} = (z'-bz)e^{-bz} to find z. Then solve y'-ay = z to find y. Any 'x' factors come from noting that the integral of e(αβ)xe^{(\alpha-\beta)x} is simply x when alpha = beta.
Reply 6
Original post by DFranklin
The tl;dr version of the above: Suppose you have a 2nd order DE y'' + Ay' + By = P(x) with aux equation roots a, b. Then the substitution z = y' - ay reduces this equation to the DE z' - bz = P(x). Multiply both sides by e^(-bz) and integrate, noting that ddxzebz=(zbz)ebz\frac{d}{dx} ze^{-bz} = (z'-bz)e^{-bz} to find z. Then solve y'-ay = z to find y. Any 'x' factors come from noting that the integral of e(αβ)xe^{(\alpha-\beta)x} is simply x when alpha = beta.

Excellent posts! For the OP if you're struggling with the generality of the theory you could just try subtituting

y(x) = z(x)e^(2x)

into your differential equation, and see what type of equation you now have in z and x.
Original post by RichE
Excellent posts! For the OP if you're struggling with the generality of the theory you could just try subtituting

y(x) = z(x)e^(2x)

into your differential equation, and see what type of equation you now have in z and x.

Thanks (PRSOM). For the record (and as I think we're well past "statute of limitations" now!), a variant of this was one of my interview questions at Cambridge 30+ years ago; I needed a certain amount of prodding in the right direction, but it's certainly something I've not forgotten...!

Quick Reply

Latest