RE: Unexpected result with RSolve?
- To: mathgroup at smc.vnet.net
- Subject: [mg33631] RE: [mg33629] Unexpected result with RSolve?
- From: "Curt Fischer" <cfisher at bio.titech.ac.jp>
- Date: Thu, 4 Apr 2002 19:39:48 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
-----Original Message----- From: wouter.van.den.broeck at vub.ac.be To: mathgroup at smc.vnet.net [mailto:wouter.van.den.broeck at vub.ac.be] Subject: [mg33631] [mg33629] Unexpected result with RSolve? Hey, There's probably a sound solution, but i'm struggling to grab it: RSolve[{a[n + 1] == n a[n], a[0] == 1}, a[n], n] returns: {{a[n] -> 0}} where, i believe it 'should' return {{a[n] -> (n-1)!}} Anyone care to give me some directions as to why this 'unexpected' result? ........... Dear Wouter, The result Mathematica gives for your example is correct. If a[0]==1, then you can solve for a[1] using the equation a[0+1]==0 a[0], which obviously gives a[1]==0. And so on for the other terms. One recursion relation which has the solution you were expecting, {a[n]->(n-1)!}, is In2: RSolve[{a[n+1]==n a[n],a[1]==1},a[n],n] Out2: {{a[n]->If[n\[GreaterEqual]1,(-1+n)!,0]}} In this case a[0] is zero because of the definition of the factorial function. -- Curt Fischer Tokyo Institute of Technology Dept. of Bioengineering