2.1: Difference Equations
- Page ID
- 379
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Differential equation are great for modeling situations where there is a continually changing population or value. If the change happens incrementally rather than continuously then differential equations have their shortcomings. Instead we will use difference equations which are recursively defined sequences. Examples of incrementally changes include salmon population where the salmon spawn once a year, interest that is compound monthly, and seasonal businesses such as ski resorts.
A first order difference equation is a recursively defined sequence in the form
\[y_{n+1} = f(n,y_n) \;\;\; n=0,1,2,\dots . \]
What makes this first order is that we only need to know the most recent previous value to find the next value. It also comes from the differential equation
\[ y' = g(n,y(n)). \]
Recalling the limit definition of the derivative this can be written as
\[ \lim_{h\rightarrow 0}\frac{y\left ( n+h \right ) - y\left ( n \right )}{h} \]
if we think of \(h\) and \(n\) as integers, then the smallest that \(h\) can become without being 0 is 1. The differential equation becomes
\[ y(n+1) - y(n) = g(n,y(n)) \]
\[ y(n+1) = y(n) +g(n,y(n)).\]
Now letting
\[ f(n,y(n)) = y(n) +g(n,y(n)) \]
and putting into sequence notation gives
\[ y_{n+1} = f(n,y_n). \]
If the first order difference depends only on \(y_n\) (autonomous in Diff EQ language), then we can write
\[ y_1 = f(y_0), y_2 = f(y_1) = f(f(y_0)), \]
\[ y_3 = f(y_2) = f(f(f(y_0))) = f ^3(y_0).\]
In general,
\[ y+n = f^n(y_0). \]
Solutions to a finite difference equation with
\[ y_{n+1} = y_n. \]
Are called equilibrium solutions. We find them by setting
\[ y_n = f(n,y_n) . \]
A finite difference equation is called linear if \(f(n,y_n)\) is a linear function of \(y_n\).
Solution
This is a linear finite difference equation with
\[ y _{n+1} = 0.3y_n + 1000. \]
We have
\[y_0 = 1000, \;\;\; y_1 = 0.3 y_0 + 1000, \;\;\; y_2 = 0.3 y_1 + 1000 = 0.3(0.3y_0 +1000)+ 1000 \]
\[y_3 = 0.3y_2 + 1000 = 0.3( 0.3(0.3y_0 +1000)+ 1000 )+1000 = 1000 + 0.3(1000) + 0.3^2(1000) + 0.3^3 y_0. \]
In general,
\[y_n = 1000 (1 + 0.3 + 0.3^2 + 0.3^3 + ... + 0.3^{n-1}) + 0.3^n y_0. \]
The first term is a geometric series, so the equation can be written as
\[ y_n = \dfrac{1000(1 - 0.3^n)}{1 - 0.3} + 0.3^ny_0 .\]
Notice that the limiting population will be \(\dfrac{1000}{0.7} = 1429\) salmon.
More generally for the linear first order difference equation
\[ y_{n+1} = ry_n + b .\]
The solution is
\[ y_n = \dfrac{b(1 - r^n)}{1-r} + r^ny_0 .\]
Recall the logistics equation
\[ y' = ry \left (1 - \dfrac{y}{K} \right ) . \]
After some work, it can be modeled by the finite difference logistics equation
\[ u_{n+1} = ru_n(1 - u_n). \]
The equilibrium can be found by solving
\[ u_n = ru_n(1 - u_n). \]
A quadratic that has solution
\[ u_n = 0 or u_n = \frac{r - 1}{r}. \]
To determine the stability of the equilibrium points, look at values of \(u_n\) very close to the equilibrium value. For the first point, \( u_n \) is much larger than \( (u_n)^2 \), so the logistics equation can be approximated by
\[u_{n+1} = ru_n(1-u_n) = ru_n - ru_n^2 \approx ru_n. \]
For \(|r| < 1\), this converges to 0, thus the equilibrium point is stable.
For the other equilibrium value, write
\[ u_n = \frac{r - 1}{r} + v_n . \]
So that the equilibrium value becomes
\[ v_n = 0 .\]
We can now substitute into the difference equation and chop off the nonlinear term to get
\[ v_{n+1} = (2 - r)v_n. \]
This converges to 0 for
\[|2 - r| < 1\]
or
\[1 < r < 3.\]
So the equilibrium point is stable in this range.
At \(r = 1\), we say that there is an exchange of stability. For \(r > 3\), the sequence exhibits strange behavior. In particular for \(3 < r < 3.57\) the sequence is periodic, but past this value there is chaos.
Contributors and Attributions
- Larry Green (Lake Tahoe Community College)
Integrated by Justin Marshall.