Difference equations - just a little clarification wanted

  • Thread starter Benny
  • Start date
  • Tags
    Difference
In summary, the same method of undetermined coefficients used for solving differential equations can also be applied to difference equations, but the trial function may need to be multiplied by a power of n if the right hand side involves (-2)n. The power of n to use can be determined through the process of solving the equation.
  • #1
Benny
584
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 [tex]x_{n + 2} + 4x_{n + 1} + 4x_n = n[/tex]. The homogeneous solution should be [tex]x_n = A\left( { - 2} \right)^n + Bn\left( { - 2} \right)^n [/tex]. 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
  • #2
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 [tex]x_{n + 2} + 4x_{n + 1} + 4x_n = n[/tex]. The homogeneous solution should be [tex]x_n = A\left( { - 2} \right)^n + Bn\left( { - 2} \right)^n [/tex]. 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:
  • #3
Thanks for the clarification and extra information.
 

1. What are difference equations?

Difference equations are mathematical equations that describe the relationship between a variable and its previous values. They are used to model processes that change over time, such as population growth, stock prices, or chemical reactions.

2. How are difference equations different from differential equations?

While both types of equations involve change over time, difference equations describe discrete changes while differential equations describe continuous changes. Difference equations use discrete intervals, such as days or months, while differential equations use infinitesimal intervals.

3. What real-world applications use difference equations?

Difference equations are used in a variety of fields, including economics, biology, physics, and engineering. They can be used to model the growth of populations, the spread of diseases, the motion of projectiles, and many other processes that change over time.

4. What is the difference between a first-order and a second-order difference equation?

A first-order difference equation involves only one variable and its previous value, while a second-order difference equation involves two variables and their previous values. First-order difference equations are simpler and easier to solve, while second-order difference equations can model more complex phenomena.

5. Can difference equations be solved analytically?

In some cases, difference equations can be solved analytically using algebraic methods. However, more complex difference equations often require numerical methods, such as iteration or computer simulations, to find a solution. It depends on the specific equation and its parameters.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
692
  • Calculus and Beyond Homework Help
Replies
7
Views
490
  • Calculus and Beyond Homework Help
Replies
6
Views
219
  • Calculus and Beyond Homework Help
Replies
7
Views
254
  • Calculus and Beyond Homework Help
Replies
6
Views
928
  • Calculus and Beyond Homework Help
Replies
1
Views
258
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Back
Top