Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*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 1998

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

Search the Archive

Re: recursive relation problem ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13674] Re: [mg13656] recursive relation problem ?
  • From: "Carl K.Woll" <carlw at fermi.phys.washington.edu>
  • Date: Sat, 15 Aug 1998 04:39:07 -0400
  • Organization: Department of Physics
  • References: <199808110856.EAA10627@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

The function in Mathematica that does what you want is RSolve, located
in the DiscreteMath package. First, load the package,

<<DiscreteMath`RSolve`

Then use RSolve to find the solution:

RSolve[ {f[n] == n f[n-1], f[0] == 1}, f[n], n ]

which returns the answer

{{ f[n] -> n! }}

Note that you only need one initial condition for this recurrence
relation instead of the two that you provided.

Carl Woll
Dept of Physics
U of Washington

cplai at geocities.com wrote:

> Dear all,
>
> I am studying data structure, and always encounter recursive relation
> equations. How do I use mathematica to give general solution of
> recursive relation.
>
> For example: f(0)=1; f(1)=1; f(x)=x*f(x-1);
>
> Regards
>
> William.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum





  • Prev by Date: Re: Request for help: working with multi-level lists
  • Next by Date: A hard Series problem.
  • Previous by thread: Re: recursive relation problem ?
  • Next by thread: Re: recursive relation problem ?