Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Recursion relation

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: Recursion relation
  • From: a_rubin at dsg4.dse.beckman.com (arthur rubin)
  • Date: Fri, 10 Jul 92 07:43:25 PDT

You (martind at puhep1.princeton.edu) write:
   I'm trying to implement the following recursion relation for a
certain index function c[i]:



   c[i] = r[i]  - a[i,i-1]*c[i-1]


where r[i] and a[i,i-1] are given functions.

  Namely, I'd like to have a function c[i+n_Integer] giving me the
expression of  

   c[i+n]

in terms of 


   r[i+n],r[i+n-1],...,r[i] and c[i-1].

  DOES ANYBODY KNOW A WAY TO DO THIS ???
------------------------------------------------------------------------------

c[X:i_Symbol + Optional[n_Integer]] := r[X] - a[X,X-1] c[X-1] /; n >= 0

or 
c[X] = cc[X+1]
cc[X:_ + _Integer?Positive] := r[X-1] - a[X-1,X-2] cc[X-1]
Format[cc[X_]] := HoldForm[c][X-1]





  • Prev by Date: Re: Even numbers
  • Next by Date: teaching
  • Previous by thread: Re: Recursion relation
  • Next by thread: seeking math.el beta testers