Difference equations - just a little clarification wanted

  • Thread starter Thread starter Benny
  • Start date Start date
  • Tags Tags
    Difference
Benny
Messages
577
Reaction score
0
Hi, I have a question regarding the solution of linear difference equations. Provided that the 'RHS' is not too complicated, will the same "method of undetermined coefficients" for differential equations work for difference equations.

For example consider the second order difference equation x_{n + 2} + 4x_{n + 1} + 4x_n = n. The homogeneous solution should be x_n = A\left( { - 2} \right)^n + Bn\left( { - 2} \right)^n. If this was a differential equation the trial function would be initally be y = Cx + D. But since something with an x is already in the homogeneous solution we would multiply by x^2 and the trial function would be y = Cx^3 + Dx^2. (I think that's what would be done in the method of undetermined coefficients...I usually don't use that procedure to solve DEs so I'm not entirely sure)

In the case of this difference equation the 'guess' particular solution would initially be x_n = C + Dn. But an 'n' is already in the homogeneous equation, so, generally, in such a situation would I multiply the trial function by some power of n? If so how would I decide which power of n to multiply the trial function by? Any help would be great thanks.
 
Physics news on Phys.org
Benny said:
Hi, I have a question regarding the solution of linear difference equations. Provided that the 'RHS' is not too complicated, will the same "method of undetermined coefficients" for differential equations work for difference equations.
Yes, that is exactly true.
For example consider the second order difference equation x_{n + 2} + 4x_{n + 1} + 4x_n = n. The homogeneous solution should be x_n = A\left( { - 2} \right)^n + Bn\left( { - 2} \right)^n. If this was a differential equation the trial function would be initally be y = Cx + D. But since something with an x is already in the homogeneous solution we would multiply by x^2 and the trial function would be y = Cx^3 + Dx^2. (I think that's what would be done in the method of undetermined coefficients...I usually don't use that procedure to solve DEs so I'm not entirely sure)
Now you've lost me. If this were the differential equation y"+ 4y'+ 4y= x, then the solution to the homogenous equation, y"+ 4y'+ 4y= 0, which has characteristic equation r2+ 4r+ 4= (r+ 2)2= 0 would be y(x)= Ce-2x+ Dxe-2x. Since the RHS, x, does NOT involve either e-2 or xe-2x, you would try a solution simply of the form y= Ax+ B. Then y'= A, y"= 0 so the equation becomes 0+4A+ 4Ax+4B= x. That is 4A= 1 and 4A+4B= 0: A= 1/4, B= -1/4. The general solution to the entire differential equation is y(x)= Ce-2x+ Dxe-2x+ (1/4)x- 1/4.
In the case of this difference equation the 'guess' particular solution would initially be x_n = C + Dn. But an 'n' is already in the homogeneous equation, so, generally, in such a situation would I multiply the trial function by some power of n? If so how would I decide which power of n to multiply the trial function by? Any help would be great thanks.
For the difference equation xn+2+ 4x1+ 4x= n,
the "homogenous" equation is xn+2+ 4x1+ 4x= 0. Its characteristic equation is r2+ 4r+ 4= (r+2)2= 0 as before so the general solution to the homogenous equation is, as you say, xn= A(-2)n+ Bn(-2)n.
If the right hand side involved (-2)n, then you would multiply by another "n": n2(-2)n. That is, to find a specific solution to xn+2+ 4xn+1+ 4xn= (-2)n, you would try a solution of the form
xn= Cn2(-2)n, Then
xn+1= C(n+1)2(-2)n+1
= -2Cn2(-2)n- 4Cn(-2)n-2A(-2)n
xn+2= C(n+2)2(-2)n+2
= 4Cn2(-2)n+ 16Cn(-2)n+ 16C(-2)n.
4xn+1= -8Cn2(-2)n-16Cn(-2)n+16A(-2)n
4xn= 4Cn2(-2)n
so the equation reduces to 8C(-2)n= (-2)n and we must have C= 1/8. The general solution to that difference equation is
xn= A(-2)n+ Bn(-2)n- (1/8)n2(-2)n = (A+ Bn- (1/8)n2)(-2)n.
However, for the equation you give: xn+2+ 4xn+1+ 4xn= n, the right hand side does NOT involve (-2)n so we would just try xn= Cn+ D. Then xn+1= Cn+ C+ D and
xn+2= Cn+ 2C+ D.
4xn+1= 4Cn+ 4C+ 4D
4xn= 4Cn
The equation becomes 9Cn+ 6C+ 5D= n so 9C= 1, 6C+ 5D= 0. C= 1/9,
D= -(6/9)/5= -2/15. The general solution to the difference equation xn+2+ 4xn+1+ 4xn= n is xn= A(-2)n+ Bn(-2)n+ (1/9)n- 2/15.
 
Last edited by a moderator:
Thanks for the clarification and extra information.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top