Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Differences between recursions and limit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60551] Re: Differences between recursions and limit
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 20 Sep 2005 05:19:06 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <dgm01k$njm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

look in the manual about dynamic programming
and change your definition to

x[0]=0;
x[k_] :=x[k]= .25 *(1 + x[k-1] + (x[k-1])^2 + 
(x[k-1])^3);

Regards
  Jens

"anbra1" <xyxanbra1 at tiscalixxxyxxx.it> schrieb im 
Newsbeitrag news:dgm01k$njm$1 at smc.vnet.net...
| Please,
| I want to know
| why these two recursions,doing the same thing,
| are the first one much more slow than the second
|
| -------------------------
|
| x[0]=0;
| x[k_] := .25 *(1 + x[k-1] + (x[k-1])^2 + 
(x[k-1])^3);
|
| For[k=1,k<12,Print[k," 
",SetPrecision[x[k],30]];k++]
|
| -------------------------
|
| a=0;
|
| For[k=1,k<12,k++,
|
| b= .25 (1 + a + a^2 + a^3);a:=b;Print[k," 
",SetPrecision[b,30]]]
|
| -------------------------
| Another question
| How can I calculate
| the limit of this recursion for k->Infinite ?
| Thank you all
|
| 



  • Prev by Date: Re: Re: Outputting MatrixForm to Word
  • Next by Date: Re: writing a function with unknown number of paramters
  • Previous by thread: Re: Re: Differences between recursions and limit
  • Next by thread: Re: Differences between recursions and limit