Solving First Order Difference Equations

In summary: I'm just trying to understand your reasoning.In summary, the conversation discusses the struggle of solving difference equations, particularly first order ones. The conversation also includes attempts at solving a specific equation, using an iterative approach and a summation method. One person also suggests a substitution method and explains the reasoning behind it. The conversation concludes with the person seeking clarification and understanding on the substitution method.
  • #1
Benny
584
0
I am currently struggling to solve Difference equations (especially the first order ones). Here is a 'simple' one which I cannot get the correct answer to despite trying many times. Here is what I think is my most decent attempt.
[tex]
2y_{n + 1} = y_n + 2
[/tex]
Rearranging gives [tex]y_{n + 1} = \frac{1}{2}y_n + 1[/tex].
Iterating: [tex]y_1 = \frac{1}{2}y_0 + 1,y_2 = \frac{1}{2}y_1 + 1 = \left( {\frac{1}{2}} \right)^2 y_0 + 1 + \frac{1}{2}[/tex]
[tex]
\Rightarrow y_n = \left( {\frac{1}{2}} \right)^n y_0 + \sum\limits_{i = 0}^{n - 1} {\left( {\frac{1}{2}} \right)} ^i
[/tex]
[tex]
= \left( {\frac{1}{2}} \right)^n y_0 + \sum\limits_{i = 0}^n {\left( {\frac{1}{2}} \right)} ^i - \left( {\frac{1}{2}} \right)^n
[/tex]
[tex]
= \left( {\frac{1}{2}} \right)^n y_0 + \frac{{1 - \left( {\frac{1}{2}} \right)^{n + 1} }}{{1 - \frac{1}{2}}} - \left( {\frac{1}{2}} \right)^n
[/tex]
[tex]
= \left( {\frac{1}{2}} \right)^n y_0 + 2 - \left( {\frac{1}{2}} \right)^n - \left( {\frac{1}{2}} \right)^n
[/tex]
The answer is what I obtained except without the two subtracted (1/2)^n terms at the end. By the way is there a way to solve first order difference equations without using an iterative approach like the one I used? Any help would be good thanks.

Edit: Hmm I just realized that I could've the substitution y_n = lambda^n to find the solution to homogeneous equation and then set y_n = constant to find particular solution. However I would still like to know how to do it through the summation method I used. Any help or suggestions for alternative solutions would be good thanks.
 
Last edited:
Physics news on Phys.org
  • #2
Benny said:
I am currently struggling to solve Difference equations (especially the first order ones). Here is a 'simple' one which I cannot get the correct answer to despite trying many times. Here is what I think is my most decent attempt.
[tex]
2y_{n + 1} = y_n + 2
[/tex]
Rearranging gives [tex]y_{n + 1} = \frac{1}{2}y_n + 1[/tex].
Iterating: [tex]y_1 = \frac{1}{2}y_0 + 1,y_2 = \frac{1}{2}y_1 + 1 = \left( {\frac{1}{2}} \right)^2 y_0 + 1 + \frac{1}{2}[/tex]
No, that's wrong. If
[tex] y_n = \left( {\frac{1}{2}} \right)^n y_0 + \sum\limits_{i = 0}^{n - 1} {\left( {\frac{1}{2}} \right)} ^i
[/tex][tex]y_1 = \frac{1}{2}y_0 + 1[/tex]
alright but then [tex]y_2= \frac{1}{2}y_1+ 1= \frac{1/2}\frac{1}{2}y_0+ \frac{1/2}+ 1= \left(\frac{1}{2}\right)^2y_0+ \frac{3}{2}[/tex]
 
Last edited by a moderator:
  • #3
Try setting [itex]y_n = z_n + 2[/itex].

(EDIT: Corrected constant.)
 
Last edited:
  • #4
HallsofIvy said:
No, that's wrong. If
[tex] y_n = \left( {\frac{1}{2}} \right)^n y_0 + \sum\limits_{i = 0}^{n - 1} {\left( {\frac{1}{2}} \right)} ^i
[/tex][tex]y_1 = \frac{1}{2}y_0 + 1[/tex]
alright but then [tex]y_2= \frac{1}{2}y_1+ 1= \frac{1/2}\frac{1}{2}y_0+ \frac{1/2}+ 1= \left(\frac{1}{2}\right)^2y_0+ \frac{3}{2}[/tex]

I don't understand which part you are saying is wrong. I know that my initial answer is incorrect but it seems to fit in with what I'm getting.

[tex]
y_1 \equiv \left( {\frac{1}{2}} \right)y_0 + 1
[/tex] from y_(n+1) = (1/2)y_(n) + 1

[tex]
y_2 \equiv \left( {\frac{1}{2}} \right)y_1 + 1 = \left( {\frac{1}{2}} \right)\left[ {\left( {\frac{1}{2}} \right)y_0 + 1} \right] + 1 = \left( {\frac{1}{2}} \right)^2 y_0 + 1 + \frac{1}{2}
[/tex]

If [tex]y_n = \left( {\frac{1}{2}} \right)^n y_0 + \sum\limits_{i = 0}^{n - 1} {\left( {\frac{1}{2}} \right)^i } [/tex] then:

[tex]
y_1 = \left( {\frac{1}{2}} \right)y_0 + \sum\limits_{i = 0}^{1 - 1} {\left( {\frac{1}{2}} \right)^i } = \left( {\frac{1}{2}} \right)y_0 + 1
[/tex]

Ok that seems right. Set n = 2 and what happens?

[tex]
y_2 = \left( {\frac{1}{2}} \right)^2 y_0 + \sum\limits_{i = 0}^{2 - 1} {\left( {\frac{1}{2}} \right)^i } = \left( {\frac{1}{2}} \right)^2 y_0 + \sum\limits_{i = 0}^1 {\left( {\frac{1}{2}} \right)^i } = \left( {\frac{1}{2}} \right)^2 y_0 + 1 + \frac{1}{2}
[/tex]

As before.

So if instead of using my formula and I simply interated I would get the same answer.

It is absolutely incorrect to 'replace' y_0 by y_1 in the first formula that I found. I know what the my formula is not correct but I don't see how it doesn't fit in with what I found.

Tide - Thanks for the help but if possible could you please explain the motivation behind that substitution?
 
  • #5
Benny,

Quite simple but I did type in the wrong number in my original post - which I'll edit. (The correct substitution is [itex]y_n = z_n + 2[/itex])

If you didn't have that +1 on the right side of your original equation then you would have a difference equation for a simple geometric series. Is there a way of eliminating the +1? Yes, try [itex]y_n = z_n + A[/itex] and find out whether there is any value of A that gets rid of the +1.

Making the substitution gives [itex]z_n + A = \frac {1}{2}z_n + \frac{1}{2} A + 1[/itex]. Therefore, if [itex]A = 2[/itex] we have [itex]z_{n+1} = \frac{1}{2}z_n[/itex] which is very easily solved. Don't forget to replace [itex]z_n[/itex] with [itex]y_n - 2[/itex] to find the required solution.
 
Last edited:
  • #6
Oh ok, I see what you did now. It seems kind of like setting y_n = C and then solving for C.
 
  • #7
Benny,

My typing fingers aren't working right today! This is the equation you get after making the substitution:

[tex]z_{n+1} = \frac{1}{2}z_n[/tex]

I had mistyped n instead of n+1 for the index on the left side.
 
  • #8
Thanks, I figured that it's what you meant to type before.
 

Related to Solving First Order Difference Equations

1. What is a first order difference equation?

A first order difference equation is a mathematical equation that describes the relationship between the current value of a variable and its previous value. It is used to model phenomena that involve change over time, such as population growth or economic trends.

2. How do you solve a first order difference equation?

To solve a first order difference equation, you need to find the general solution which describes the relationship between the current and previous values of the variable. This can be done by using techniques such as substitution, elimination, or the method of undetermined coefficients.

3. What are the applications of solving first order difference equations?

Solving first order difference equations has various applications in fields such as economics, engineering, and biology. It can be used to predict population growth, analyze stock market trends, or model the spread of diseases.

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

A first order difference equation involves discrete values of the variable, whereas a first order differential equation involves continuous values. Difference equations are used to model discrete phenomena, while differential equations are used to model continuous phenomena.

5. Can first order difference equations be solved analytically?

Yes, first order difference equations can be solved analytically by finding the general solution using mathematical techniques. However, in some cases, it may be necessary to use numerical methods to approximate the solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
305
  • Calculus and Beyond Homework Help
Replies
16
Views
645
  • Calculus and Beyond Homework Help
Replies
1
Views
420
  • Calculus and Beyond Homework Help
Replies
15
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
359
  • Calculus and Beyond Homework Help
Replies
3
Views
555
  • Calculus and Beyond Homework Help
Replies
9
Views
775
  • Calculus and Beyond Homework Help
Replies
4
Views
495
  • Calculus and Beyond Homework Help
Replies
6
Views
531
  • Calculus and Beyond Homework Help
Replies
3
Views
506
Back
Top