Difference/Recurrence Equations Explained

  • Thread starter Benny
  • Start date
  • Tags
    Difference
In summary,difference equations are equations involving summations with different indices. They seem to be equations involving summations with different indices where the indices are differentiable. I do not understand what they are about.
  • #1
Benny
584
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
  • #2
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]
 
  • #3
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:
  • #4
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?
 
  • #5
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.
 
  • #6
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:

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

or

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

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

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

which is just a simple geometric series with the solution

[tex]z_n = \left( \frac {1}{2} \right)^{n-1} z_1[/tex]

You should be able to go from there and find the general solution for [itex]y_n[/itex] using the defintion of [itex]z_n[/itex] that we used.
 
  • #7
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*}
\begin{split}
\mu_n y_n - \mu_0 y_0 &= \sum_{k = 0}^{n-1} E \mu_k \\
2^n y_n - y_0 &= \sum_{k = 0}^{n - 1} 2^{k+1} \\
&= 2^{n+1} - 2 \\
y_n &= 2^{-n} y_0 + 2 - 2^{1-n} \\
&= A 2^{-n} + 2
\end{split}
\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]
 
  • #8
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.
 
  • #9
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.
 

1. What are difference/recurrence equations?

Difference/recurrence equations are mathematical expressions that describe the relationship between a sequence of values. They are used to model situations where the value of a variable at a given time is dependent on its value at previous times.

2. How are difference/recurrence equations different from other types of equations?

Unlike other types of equations, difference/recurrence equations involve a sequence of values rather than a single value. They also use the previous value(s) of a variable to calculate its current value, rather than just using known constants and operations.

3. What are some real-world applications of difference/recurrence equations?

Difference/recurrence equations are commonly used in fields such as economics, biology, and physics to model natural phenomena and make predictions. They can be used to study population growth, disease spread, and chemical reactions, among other things.

4. How are difference/recurrence equations solved?

Difference/recurrence equations can be solved using various methods, including analytical methods (e.g. substitution, induction) and numerical methods (e.g. Euler's method, Runge-Kutta method). The method used will depend on the specific equation and its complexity.

5. What is the significance of difference/recurrence equations in scientific research?

Difference/recurrence equations are an important tool in scientific research, as they allow scientists to model and understand complex systems and make predictions about their behavior. They are also used in fields such as computer science and engineering to design algorithms and optimize processes.

Similar threads

  • Introductory Physics Homework Help
2
Replies
42
Views
3K
  • Introductory Physics Homework Help
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
30
Views
1K
  • Introductory Physics Homework Help
Replies
15
Views
415
  • Introductory Physics Homework Help
2
Replies
61
Views
3K
  • Introductory Physics Homework Help
Replies
1
Views
259
  • Introductory Physics Homework Help
Replies
1
Views
877
  • Introductory Physics Homework Help
Replies
5
Views
2K
  • Introductory Physics Homework Help
Replies
3
Views
804
Replies
11
Views
1K
Back
Top