MathGroup Archive 1999

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

Search the Archive

Re: Bug in RSolve?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18972] Re: Bug in RSolve?
  • From: "Hossein Kazemi" <kazemi at javanet.com>
  • Date: Fri, 30 Jul 1999 01:33:56 -0400
  • References: <7ni5j0$5k2@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

After talking to Support at Wolfram, they agreed that RSolve fails to give
the correct answer in this case.  It seems that it fails whenever an
undefined function such as u[n] appears in the expression;  e.g.,

RSolve[x[n+1]==a+b x[n]+u[n],x[n],n]

Hossein Kazemi

Hossein Kazemi <kazemi at som.umass.edu> wrote in message
news:7ni5j0$5k2 at smc.vnet.net...
> Is this a bug in RSolve (Version 4.0)?
>
> In[1]:=
> << DiscreteMath`RSolve`
>
> In[2]:=
> RSolve[x[n] == 3 + 4 u[n], x[n], n];
>
> In[3]:=
> x[n_] = x[n] /. %[[1]];
>
> In[4]:=
> x[1]
>
> Out[4]=
> 3 - 4 u[-1] + 4 u[1]           What does u[-1] doing here?
>
> In[5]:=
> x[2]
>
> Out[5]=
> 3 - 4 u[-1] + 4 u[2]           What does u[-1] doing here?
>
> In[6]:=
> u[n_] := n
>
> In[7]:=
> x[2]
>
> Out[7]=
> 15
>
> This does not make any sense at all.  Clearly,
>
> x[2]= 3 + 4*2 = 11
>
>
>
>




  • Prev by Date: Image Analysis?
  • Next by Date: Re: saving a list.
  • Previous by thread: Bug in RSolve?
  • Next by thread: Mathematica writing style