Difference/Recurrence Equations Explained

  • Thread starter Thread starter Benny
  • Start date Start date
  • Tags Tags
    Difference
Click For Summary

Homework Help Overview

The discussion revolves around the concept of difference equations, particularly their relationship to differential equations. Participants explore the nature of first and second order difference equations, their solutions, and the underlying principles that characterize them.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts to understand the meaning of a specific difference equation and its connection to differential equations. Some participants question the correctness of proposed solutions and suggest various methods for approaching the problem, including summation techniques and transformations of variables.

Discussion Status

Participants are actively engaging with the problem, offering different perspectives and methods for solving the difference equation. There is a mix of interpretations regarding the solutions, with some participants providing guidance on how to manipulate the equations and others seeking clarification on foundational concepts.

Contextual Notes

Some participants note the importance of initial conditions and the role of specific constants in the solutions. There is also mention of the need for clarity in the problem statement, as discrepancies in the equation can lead to different interpretations and solutions.

Benny
Messages
577
Reaction score
0
Hi I'm just wondering what difference/recurrence equations are about. From what I can recall from the bits and pieces I've readed, difference equations are somewhat similar or an analogue of differential equations. I've read through some things on first and second order difference equations but I don't really understand what they are about.

My book introduces difference equations as summations. They seem to be equations involving summations with different indices. I know what I've said is a little vague so here is an example question I have(not from the book I referred to).

Q. Find the general solution of the following difference equation.

[tex]y_{n + 1} - y_n = 2[/tex]

Answer: [tex]y_n = A\left( {\frac{1}{2}} \right)^n + 2[/tex]

Can someone explain to me what the equation actually means?. Any sort of explanation or references to useful websites would also be good. As I alluded to before I don't actually see the connection between difference equations and differential equations. Is it like when you have a real function f(x) and you the sequence f(n)? Any help would be appreciated.
 
Physics news on Phys.org
I have no idea what this could mean. Assuming that solution is correct:

[tex]y_{n+1} - y_{n} = A\left (\frac 12 \right )^{n+1} + 2 - A\left (\frac 12 \right )^n - 2 = -\frac 12A\left (\frac 12 \right )^n[/tex]

so

[tex]2 = -\frac 12A\left (\frac 12 \right )^n[/tex]

[tex]A = -2^{n+2}[/tex]

[tex]y_n = -4 + 2 = -2[/tex]
 
The two main ways difference and differential equations are related are
1. Analogous formula
2. differential equations can be seen as differential equations where the differences are taken to zero in a limit sense.
your equation
[tex]y_{n+1}-y_n=2[/tex]
perform indefinite summation on both sides
[tex]\sum_{n=0}^{n-1}(y_{n+1}-y_n)=\sum_{n=0}^{n-1}2[/tex]

[tex]y_{n}-y_0=2n[/tex]

[tex]y_n=y_0+2n[/tex]
where y0 is the constant to be found by initial conditions.
The equation means find the functions with the given difference.

http://mathworld.wolfram.com/RecurrenceEquation.html
 
Last edited:
What you have is an arithmetic series and your "answer" is incorrect. The correct solution is

[tex]y_n = y_1 + (n-1)\times 2[/tex]

where [itex]y_1[/itex] is an initial value. The answer you show looks like the solution of a geometric series. Did you copy the problem correctly?
 
I left out a factor 2 for the first term in the question. It should be [tex]2y_{n + 1} - y_n = 2[/tex] and the answer is the one that I included with my first post.
 
In that case, I would subtract [itex]y_n[/itex] from both sides to make it look like a difference equation and see where it leads:

[tex]2 (y_{n+1} - y_n}) = 2 - y_n[/tex]

or

[tex]y_{n+1} - y_n = \frac {2-y_n}{2}[/tex]

The right side suggests defining a new variable [itex]z_n[/itex] such that [itex]z_n = y_n - 2[/itex] or [itex]y_n = z_n + 2[/tex]. Substitute that into the equation:<br /> <br /> [tex]z_{n+1} + 2 - z_n - 2 = -\frac {1}{2} z_n[/tex]<br /> <br /> or<br /> <br /> [tex]z_{n+1} - z_n = -\frac {1}{2} z_n[/tex]<br /> <br /> Notice the additive constants are now gone! In fact, if we now just add [itex]z_n[/itex] to both side we obtain the simple relation<br /> <br /> [tex]z_{n+1} = \frac {1}{2} z_n[/tex]<br /> <br /> which is just a simple geometric series with the solution<br /> <br /> [tex]z_n = \left( \frac {1}{2} \right)^{n-1} z_1[/tex]<br /> <br /> You should be able to go from there and find the general solution for [itex]y_n[/itex] using the definition of [itex]z_n[/itex] that we used.[/itex]
 
We can do other things, inspired by the methods of differential equations.

First, some notation:

[tex]Ey_n := y_{n+1}[/tex]

Δ = E - 1
or, equivalently,

[tex]\Delta y_n := y_{n+1} - y_n[/tex]


So, you have the equation 2Ey - y = 2. We'd like to rewrite it as Tide suggested. The "easy" way is to recognize you can subtract y from both sides, but if you didn't notice that, you could use E = 1 + Δ to get:

2 (1 + Δ) y - y = 2
2y + 2Δy - y = 2
2Δy + y = 2
Δy + (1/2) y = 1


First, the "plug and chug" method: this will be uninspired, but it does give you a solution to any difference equation with summations and products. You can safely skip down to the next section if you like.

In an ordinary differential equation we look for an integrating factor μ... we can do the same here. Notice that:

Δ(μy) = Eμ Δy + Δμ y

So, what we want is (Δμ) / Eμ = (1/2). Using Δ = E - 1, we can rearrange this to form:

Eμ = 2μ

By picking an initial value for [itex]\mu_0[/itex], in the general case we can write μ as a product. Here, however, we can find the closed form solution:

[tex]\mu_n = 2^n[/tex]

So now, we have:

Δy + (1/2) y = 1
Δy + (Δμ)/(Eμ) y = 1
Eμ Δy + Δμ y = Eμ
Δ(μy) = Eμ

And now, we can take an antidifference (i.e. a sum). Notice that:

[tex] \sum_{k = 0}^{n-1} \Delta z_k = z_n - z_0[/tex]

We can apply this here to get:

[tex] \begin{equation*}<br /> \begin{split}<br /> \mu_n y_n - \mu_0 y_0 &= \sum_{k = 0}^{n-1} E \mu_k \\<br /> 2^n y_n - y_0 &= \sum_{k = 0}^{n - 1} 2^{k+1} \\<br /> &= 2^{n+1} - 2 \\<br /> y_n &= 2^{-n} y_0 + 2 - 2^{1-n} \\<br /> &= A 2^{-n} + 2<br /> \end{split}<br /> \end{equation*}[/tex]

Where the last step was just collecting the coefficients.

#################################################
#################################################

Just like with differential equations, we recognize special forms that come up frequently. Recall that we are trying to solve:

Δy + (1/2) y = 1

The homogenous part is Δh + (1/2) h = 0. This has constant coefficients, so we can immediately posit the solution [itex]h_n = r^n[/itex]. Plugging this in gives:

[tex](r - 1) r^n + (1/2) r^n = 0[/tex]

Which is easily solved to give r = (1/2). So, the homogenous solution is [itex]h_n = A (1/2)^n[/itex].

Now to find a particular solution of the original equation. Since the R.H.S. is also a constant, we can immediately posit a constant solution for y. (If the R.H.S. was a polynomial of degree n, we could posit a polynomial of degree n as a solution for y) This is easily seen to be y = 2.

So, the general solution is:

[tex]y_n = A (1/2)^n + 2[/tex]
 
Thanks for the help guys but I still don't really understand well enough the main thing which characterises difference equations. I just read my book again and it says that first order recurrence relations for which n = 1 are exemplified by [tex]u_{n + 1} = au_n + k[/tex] with u_0 specified. The solution of the homogeneous relation (where k = 0) is immediate, [tex]u_n = Ca^n[/tex].

I don't understand why the solution would be so 'obvious.' Can someone please show me how the given expression for u_n can be verified to be a solution of the homogeneous relation? Perhaps it will make it easier for me to understand it. Any help would be good.
 
If [itex]u_n = C a^n[/itex] then [itex]u_{n+1} = C a^{n+1}[/itex] and substituting into [itex]u_{n+1} = a u_n[/itex] gives

[tex]C a^{n+1} = a \times C a^n[/tex]

which is clearly true for any value of a. Therefore, [itex]C a^n[/itex] is the general solution.

To obtain the solution of the homogeneous equation from scratch simply step down with the index like this:

[tex]u_{n+1} = a u_n = a \times a u_{n-1} = a \times a \times a u_{n-2} ...[/tex]

and so on until you get to the first index on the right side. You should see the pattern that develops.
 
  • #10
Thanks again for your help Tide.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 42 ·
2
Replies
42
Views
7K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 30 ·
2
Replies
30
Views
3K
Replies
2
Views
1K
  • · Replies 61 ·
3
Replies
61
Views
6K
Replies
5
Views
3K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K