MathGroup Archive 2006

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

Search the Archive

Re: calculate Recurrence Equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68882] Re: [mg68713] calculate Recurrence Equations
  • From: János <janos.lobb at yale.edu>
  • Date: Tue, 22 Aug 2006 05:20:13 -0400 (EDT)
  • References: <200608170818.EAA24918@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Aug 17, 2006, at 4:18 AM, Frank Hechtner wrote:

> hi,
>
> i?m in trouble with my Recurrence Equations:
>
> i?ve defined the following function
>
> anteil[0] = 1
> anteil[n_] := anteil[n - 1] + (anteil[n - 1]*5 - 1)/100
>
> i want mathematica to calculate the values for anteil[30] and so on.
>
> Unfortunately mathematica needs for this calculation over 2 hours (and
> is still running, athlon x2 4600, 2 gb ram).
>
> I don?t see where are the difficulties for mathematica...
>
> Thanx for your help
>
> frank

Here is a newbie approach:

In[1]:=
eqn = a[n] == a[n - 1] +
     (a[n - 1]*5 - 1)/100
Out[1]=
a[n] == a[-1 + n] +
    (1/100)*(-1 + 5*a[-1 + n])

In[2]:=
Timing[RSolve[{eqn,
      a[0] == 1}, a[n], n] /.
    n -> 30]
Out[2]=
{0.3068269999999999*Second,
   {{a[30] -> 4909085745117164\
100520051333566036654601/1342\
17728000000000000000000000000\
0000000}}}

János


----------------------------------------------
Trying to argue with a politician is like lifting up the head of a  
corpse.
(S. Lem: His Master Voice)


  • Prev by Date: Re: Need good reference for writing Stylesheets
  • Next by Date: Re: Trigonometric simplification
  • Previous by thread: Re: calculate Recurrence Equations
  • Next by thread: Re: calculate Recurrence Equations