Re: Unexpected result with RSolve?

• To: mathgroup at smc.vnet.net
• Subject: [mg33652] Re: Unexpected result with RSolve?
• From: adam.smith at hillsdale.edu (Adam Smith)
• Date: Thu, 4 Apr 2002 19:40:22 -0500 (EST)
• References: <a8g3e2\$b3i\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Your trouble is a simple mistake in doing the transformation.

For the example from the Help:
RSolve[{a[n] == n a[n-1], a[0] == 1}, a[n], n]

You want to replace n with n+1.  This gives:
RSolve[{a[n + 1] == n+1 a[n], a[0] == 1}, a[n], n]
The "n+1 a[n]" vs. "n a[n]" makes a big difference.  With "n=0" yours
would say a[1] = 0*a[0] = 0*1 = 0.  Then all the rest equal n*0.

Here is the mathematica output for the correct form:

In[3]:=
RSolve[{a[n + 1] == (n+1) a[n], a[0] == 1}, a[n], n]

Out[3]=
{{a[n]-> n!}}

As you see it gives the expected results.

wouter.van.den.broeck at vub.ac.be wrote in message news:<a8g3e2\$b3i\$1 at smc.vnet.net>...
> 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?
>
> (note: I started of with the standard textbook example:
> RSolve[{a[n] == n a[n-1], a[0] == 1}, a[n], n]
> which returns
> {{a[n] -> n!}}
> so there's no need to correct me in this direction, I just explored a
> bit, and wonder why i'm getting that result with the variation above)
>
> TIA
>
> wouter vdb

```

• Prev by Date: Re: Step Info from NDSolve
• Next by Date: Re: List, FindRoot, Bessel
• Previous by thread: Re: Unexpected result with RSolve?
• Next by thread: Step Info from NDSolve