Talk:Recurrence relation

message: Section "Solving / General methods" (bottom) mentions shifting the sequence by a value, obtained from the steady state solution of the recurrence rule. It would be nice if someone qualified fills in
1) why does this work, and
2) what happens if there is no stable state, i.e. when 1-A-B = 0.
Thanks!
Pasmao (talk) 17:46, 18 April 2012 (UTC)
thread_title:  Non-homogeneous recurrence & steady state 

message: It is stated without justification that difference equations are "a specific type of recurrence relation." In what way are difference equations only a subset of recurrence relations? As far as I know, they are one and the same. If this is not the case, some explanation of how they differ is in order. Otherwise, my edit would be reasonable. --Roy W. Wright 21:57, 18 November 2006 (UTC)
replies: text: The equation a_{n+1} = \tan a_n \,  is not called a difference equation, but it is a recurrence relation. -- Jitse Niesen (talk) 05:29, 19 November 2006 (UTC)
replies: text: Why is that not a difference equation? I would have called it a first-order, autonomous, nonlinear difference equation. It can also be written in "difference" notation as d(a_n)=a_n-\arctan(a_n), which seems to meet the definition given in this article.--Rinconsoleao (talk) 18:24, 12 February 2009 (UTC)

text: True, the definition given in many texts would exclude that relation. Then might it be appropriate to say in the article that a difference equation is a specific type of recurrence relation of the form a_{n+1} = a_n + F(a_n, ...) \,? -- Roy W. Wright 09:08, 23 November 2006 (UTC)
replies: text: I tend to see recurrence relations as just one where a function with certain parameters can be expressed as some function of the parameters, including the same function or a function that somehow links back to this function without a circular reference. Therefore, I see this article as inadequate, having explained mostly on only linear recurrences. -- 165.21.154.115 (talk) 12:47, 12 June 2008 (UTC)

text: IME(xperience), MathWorld is not reliable.  It presents as fact quite a few serious mistakes that can be identified immediately by an expert.  (They are fixed once identified, but there are always more.)  This may or may not be one of them, but in any case, the MathWorld definition does not give substantive support to an argument.  Zaslav (talk) 00:59, 24 October 2011 (UTC)
replies: text: I have no opinion on the matter, not having encountered the subject of difference equations in my studies. I would just like to note that the subject must have somehow drifted from its origins: in the definition given in the lead of Rational difference equation, every one of the four arithmetic operations is used, except subtraction. Marc van Leeuwen (talk) 07:34, 24 October 2011 (UTC)
thread_title:  Difference equations? 

message: Can someone contribute an explicit solution to the recurrence
P(n+1) = n*[ P(n) + P(n-1) ] where P(0) = 1 & P(1) = 0. 
P(n)/n!  is among other things the probability that if   n   numbered
balls are distributed randomly into   n   numbered pockets no ball
will end up in the proper pocket. It is easy to see computationally
that as n increases    P(n)/n!   tends toward  1/e.
22:21, 1 April 2007 (UTC)
thread_title:  A simple recurrence with non constant coefficients 

message: solve the followng recurrence relations:-
1. T(k)+3kTk-1)=0,T(0)=1
2. T(n)=3T(floor(n/2)),T(0)=1[ceiling function i.e. ceilin g of 8.2=8]  —Preceding unsigned comment added by Piyush aus (talk • contribs) 10:22, 7 December 2007 (UTC)
thread_title:  problems 

message: The body of this article should go under the heading of linear recurrence relations because that is all that there really is. The logistic equation in the intro is great stuff but nothing non-linear happens after that. I suggest a short recurrence relations article elsewhere with pointers.
For now I'll just clean up the start of the linear homogeneous constant coefficients case.
--Gentlemath (talk) 06:56, 21 February 2009 (UTC)
thread_title:  Needs work 

message: Statement only accurate if the roots of the indicial polynomial are distinct; otherwise sequences of the form n r^n are required, which are not geometric series. — Arthur Rubin  (talk) 22:12, 21 February 2010 (UTC)
thread_title:  geometric 

message: I had deleted a reference to a self-published book (Bruce R. Gilson, The Fibonacci Sequence and Beyond, CreateSpace). An editor (BRG) has reinstated it. I'd like other editors' opinions. Thanks, Goochelaar (talk) 23:26, 4 March 2010 (UTC)
replies: text: The other reference seems a personal web site, as well.  I've tagged with .  The statement supported by reference one seems to follow from the theorem, which I hope is taken from some source.  — Arthur Rubin  (talk) 10:22, 5 March 2010 (UTC)
thread_title:  Self-published references? 

message: The above discussion over several years shows that some people use "difference equations" to refer to a subset of recurrence relations and some use it to refer to all recurrence relations.  I hope I've resolved this in a neutral way with this edit: At the first mention of difference equations in the introduction, I've replaced a non-neutral sentence with "The term difference equation sometimes (and for the purposes of this article) refers to a specific type of recurrence relation. Note however that "difference equation" is frequently used to refer to any recurrence relation." Duoduoduo (talk) 20:02, 20 May 2010 (UTC)
thread_title:  Neutral resolution of Difference equation vs. Recurrence relation

message: I believe this article as it currently appears is mostly too high level for anyone who doesn't already have a command of this material.  Partly this is due to its organization.  I think that the contents ought to be arranged like this (with more sub-sections added -- the following is bare-bones):
I.  Example
II. Linear recurrences
:A. First-order
:B. Second-order
:C. Higher-order
III.Non-linear recurrences
IV. Relation to difference equations
V.  Applications
This way the reader  can see the big picture before diving into the details.  The above sections and sub-sections II A,B,C and III would give the solution by focusing on (i) the steady-state solution, and (ii) the terms involving powers of eigenvalues, which would be presented along with the characteristic equation.  The first-order section would show (maybe even graphically) the monotonic approach to the steady state. The second-order linear section would show that with complex eigenvalues one gets a trigonometric solution, which can involve fluctuations. Duoduoduo (talk) 20:24, 20 May 2010 (UTC)
thread_title: Organization of article

message: The title is misleading.  This article at present is almost entirely about linear, constant-coefficient recurrences.  The title could be "Linear recurrence relations with constant coefficients".  Either that should be the new title and there should be a separate general article, or this article needs a whole lot more content.  (I tend to favor the first solution, unless someone adds the new content very soon.) Zaslav (talk) 01:03, 24 October 2011 (UTC)
replies: text: Agreed. User:Linas (talk) 07:39, 1 December 2013 (UTC)
thread_title:  Too narrow; needs more 

message: I think the section on Stability of nonlinear first-order recurrences is confusing. It is somehow intuitive that the recurrence converges to a fixed point x^* if the slope in the neighborhood of x^* is less than unity. However, what does "slope" and taking f'(x^*) mean exactly? What's the derivative of a recurrence?
For example, take the logistic map x_n = f(x_{n-1}) = 1 - \alpha x_{n-1}^2. Although f is differentiable, if one plots the recurrence it is clear that the recurrence is in fact not differentiable. The slope at any x is not defined unless x is a fixed point, in which case the slope is 0.
Furthermore, take for example \alpha=1 and x = 0. Then f'(x) = -2x = 0 which is less than unity. However, x = 0 is certainly no fixed point; the system will oscillate indefinitely between 1 and 0.  — Preceding unsigned comment added by Msnel (talk • contribs) 17:47, 19 April 2012 (UTC)
thread_title:  Derivative of a nonlinear map 

message: Matrix powers of the form A^t are useful for solving linear difference equations that look like: 
 x_{t+1} = A x{t} + B u(t) ,
where x(t) is the state space, u(t) is the input, A is the state-space matrix, and B(t) is the input matrix.
This method was taught to me by a Hungarian mathematician and I'm not even sure what it is called. The problem is to find A^t .
Anyways I will include an example and steps below. Given
A = 
\begin{pmatrix}
1 & 1 & 0 & 0 \\
0 & 1 & 1 & 0 \\
0 & 0 & 1 & -1/8 \\
0 & 0 & 1/2 & 1/2
\end{pmatrix}
First, compute the eigenvalues.
\lambda_1 = 3/4
 and 
\lambda_2 = 1
each with an algebraic multiplicity of two.
Now, take the exponential of each eigenvalue multiplied by  t :  \lambda_i^t. Multiply by an unknown matrix  B_i . If the eigenvalues have an algebraic multiplicity greater than 1, then repeat the process, but multiply by a factor of  t  for each repetition. If one eigenvalue had a multiplicity of three, then there would be the terms:  B_{i_1} \lambda_i^t, B_{i_2} t \lambda_i^t, B_{i_3} t^2 \lambda_i^t . Sum all terms. I cannot post this to the primary article without some additional sources. I'm sure it must be published somewhere, I just do not know where.
In our example we get:
A^{t} = B_{1_1} (3/4)^t + B_{1_2} t (3/4)^t + B_{2_1} 1^t + B_{2_2} t 1^t
.
So how can we get enough equations to solve for all of the unknown matrices? Increment t.
\begin{align}
I A^{t} =& B_{1_1} (3/4)^t + B_{1_2} t (3/4)^t + B_{2_1} + B_{2_2} t  \\
A A^{t} =& B_{1_1} (3/4)^{(t+1)} + B_{1_2} {(t+1)} (3/4)^{(t+1)} + B_{2_1} + B_{2_2} {(t+1)}  \\
A^2 A^{t} =& B_{1_1} (3/4)^{(t+2)} + B_{1_2} {(t+2)} (3/4)^{(t+2)} + B_{2_1} + B_{2_2} {(t+2)}  \\
A^3 A^{t} =& B_{1_1} (3/4)^{(t+3)} + B_{1_2} {(t+3)} (3/4)^{(t+3)} + B_{2_1} + B_{2_2} {(t+3)} 
\end{align}
Since the these equations must be true, regardless the value of t, we set t=0. Then we can solve for the unknown matrices.
\begin{align}
I =& B_{1_1} + B_{2_1} \\
A =& (3/4) B_{1_1} + (3/4) B_{1_2} + B_{2_1} + B_{2_2} \\
A^2 =& (3/4)^2 B_{1_1} + 2 (3/4)^2 B_{1_2} + B_{2_1} + 2 B_{2_2} \\
A^3 =& (3/4)^3 B_{1_1} + 3 (3/4)^3 B_{1_2} + B_{2_1} + 3 B_{2_2}
\end{align}
This can be solved using linear algebra (don't let the fact the variables are matrices confuse you). Once solved using linear algebra you have:
\begin{align}
B_{1_1} =& 128 A^3 - 336 A^2 + 288 A - 80 I \\
B_{1_2} =& \frac{64}{3} A^3 - \frac{176}{3} A^2 + \frac{160}{3} A - 16 I \\
B_{2_1} =&-128 A^3 + 336 A^2 - 288 A + 81 I\\
B_{2_2} =& 16 A^3 - 40 A^2 + 33 A - 9 I
\end{align}
Plugging in the value for A gives:
\begin{align}
B_{1_1} =& \begin{pmatrix}0 & 0 & 48 & -16\\ 0 & 0 & -8 & 2\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{pmatrix}\\
B_{1_2} =& \begin{pmatrix}0 & 0 & \frac{16}{3} & -\frac{8}{3}\\ 0 & 0 & -\frac{4}{3} & \frac{2}{3}\\ 0 & 0 & \frac{1}{3} & -\frac{1}{6}\\ 0 & 0 & \frac{2}{3} & -\frac{1}{3}\end{pmatrix}\\
B_{2_1} =& \begin{pmatrix}1 & 0 & -48 & 16\\ 0 & 1 & 8 & -2\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\end{pmatrix}\\
B_{2_2} =& \begin{pmatrix}0 & 1 & 8 & -2\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\end{pmatrix}
\end{align}
So the final answer would be:
{A}^{t}=\begin{pmatrix}1 & t & \frac{\left( 24\,t-144\right) \,{2}^{2\,t}+\left( 16\,t+144\right) \,{3}^{t}}{3\,{2}^{2\,t}} & -\frac{\left( 6\,t-48\right) \,{2}^{2\,t}+\left( 8\,t+48\right) \,{3}^{t}}{3\,{2}^{2\,t}}\\ 0 & 1 & -\frac{\left( 4\,t+24\right) \,{3}^{t}-3\,{2}^{2\,t+3}}{3\,{2}^{2\,t}} & \frac{\left( 2\,t+6\right) \,{3}^{t}-3\,{2}^{2\,t+1}}{3\,{2}^{2\,t}}\\ 0 & 0 & \frac{\left( t+3\right) \,{3}^{t-1}}{{2}^{2\,t}} & -t\,{2}^{-2\,t-1}\,{3}^{t-1}\\ 0 & 0 & t\,{3}^{t-1}\,{2}^{1-2\,t} & -\frac{\left( t-3\right) \,{3}^{t-1}}{{2}^{2\,t}}\end{pmatrix}
This method was taught as it is nearly the same procedure to calculate exp(A t) (useful for linear differential equations). Except that instead of incrementing t to get additional equations and using \lambda_i^t in the terms, one takes the derivative with respect to t to generate additional equations and using e^{(\lambda_i t)} in the terms.Mouse7mouse9 00:44, 31 January 2014 (UTC)
thread_title:  A method for discrete linear systems 

message: If
:P(x) = \sum_{n=0}^\infty p_n x^n
is the generating function of the inhomogeneity, the generating function
:A(x) = \sum_{n=0}^\infty a(n) x^n
of the inhomogeneous recurrence 
: a_n = \sum_{i=1}^s c_i a_{n-i}+p_n,\quad n\ge n_r,
with constant coefficients  is derived from
: \left (1-\sum_{i=1}^sc_ix^i \right )A(x)=P(x)+\sum_{n=0}^{n_r-1}[a_n-p_n]x^n-\sum_{i=1}^s c_ix^i\sum_{n=0}^{n_r-i-1}a_nx^n.
If P(x) is a rational generating function, A(x) is also one. The case discussed above, where pn = K is a constant, emerges as one example of this formula, with P(x) = K/(1−x). Another example, the recurrence a_n=10 a_{n-1}+n with linear inhomogeneity, arises in the definition of the schizophrenic numbers. The solution of homogeneous recurrences is incorporated as p = P = 0.
Is a(n) supposed to be  a_n?
Where did s, n_r, or even r, come from?  I thought that in this subsection, the inhomogeneity had been extended, from the finite polynomial of degree r, to an infinite series.
Jmichael ll (talk) 02:31, 21 July 2015 (UTC)
thread_title:  "Solving non-homogeneous recurrence relations" confusion 

message: In the context of recurrence relations, stability generally refers to the propensity of the relative error (w.r.t. the wanted sequence) to diminish or grow, rather than (as the article currently states), the converge or divergence of the values of the iterates. See Abramowitz and Stegun, and J. C. P. Miller's comments ibid. --catslash (talk) 22:39, 3 August 2015 (UTC)
thread_title:  Stability definition 

message: Substituted at 02:33, 5 May 2016 (UTC)
thread_title: Assessment comment

message: The current article defines a recurrence relation as an equation that expresses one term z of a sequence as function f  of previous terms.  It is unclear whether the intent is to allow (or require) f to also be explicitly a function of the index  n  of the term  z .  (For example, can one define a recurrence relation without mentioning the index by saying that in any consecutive sequence of terms  x,y,z  the relation   z = x^2 - 2xy   holds? )  
Since equations such as  z_{n} = 2 z_{n-1} - 3 n z_{n-2}  are commonly accepted as recurrence relations, I assume the intent of the definition is to allow  f  to depend explicitly on the index of the term on the left hand side of the equation.   However, this raises the possibility that an equation like  z_n = n^2 + n  can qualify as a recurrence relation via a loophole in the definition.  It can be regarded as  z_n = f(n,z_{n-1}) = n^2 + n  where  f  is a function that is constant with respect to  z_{n-1} .  
If we want to prohibit equations like  z_n = n^2 + n  from satisfying the definition of a recurrence relation, we need some language that excludes constant functions from counting as "functions of the previous terms".
Tashiro~enwiki (talk) 05:35, 4 August 2016 (UTC)
thread_title: Definition of Recurrence relation - dependence on index n ? 

message: An editor has identified a potential problem with the redirect :Recursion(Mathematics) and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 April 22#Recursion(Mathematics) until a consensus is reached, and readers of this page are welcome to contribute to the discussion.  Steel1943 (talk) 06:01, 22 April 2022 (UTC)
thread_title:  "Recursion(Mathematics)" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]] 

message: In , mention could be made of the use of recurrent sequences by Erv Wilson, Kraig Grady and others to tune musical scales that feature the use of combination tones of previous notes as subsequent scale degrees.  However, doing this needs reliable sources, preferably third-party of course.  My nice to-do list includes looking for such sources; but don't wait on me! yoyo (talk) 23:39, 29 October 2022 (UTC)
thread_title:  Application to musical tuning theory 

message: Although the method described in References - Footnotes [3] is indeed nice, I would like to know if there is another reference (book or published article that can be quoted) that describes this method. MCarr (talk) 21:07, 27 May 2023 (UTC)
thread_title:  References for "Solving first-order non-homogeneous recurrence relations with variable coefficients"