       Re: Unrelated variable affects rsolve result

• To: mathgroup at smc.vnet.net
• Subject: [mg124690] Re: Unrelated variable affects rsolve result
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Tue, 31 Jan 2012 05:40:20 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201201301011.FAA17638@smc.vnet.net>

```Evaluate

?? K

K is a default generic name for a summation index in a symbolic sum.

Hence the often repeated rule: To avoid naming conflicts with existing
or future internal Mathematica variable names, never start a
user-defined variable name with a capital letter.

Bob Hanlon

On Mon, Jan 30, 2012 at 5:11 AM, Nils Kanning <nils at kanning.de> wrote:
> Hello,
> I am using Mathematica 8.0.1.0 and I observed a strange behavior of the
> function rsolve. The result rsolve produces is changed by a seemingly
> unrelated variable, which I define before calling rsolve. Especially
> rsolve seems to interfere with a variable called "K", whereas other
> variables (for example "k") do not cause problems.
>
> Here is some code, which illustrates this behavior:
>
> In:= k = {{1, 0}};
> In:= RSolve[ h[y] == 1 + h[y + 1], h[y], y]
> Out= {{h[y] -> -y + C}}
> In:= K = {{1, 0}};
> In:= RSolve[ h[y] == 1 + h[y + 1], h[y], y]
> During evaluation of In:= Sum::write: Tag List in {{1,0}} is
> Protected. >>
> Out= {{h[y] -> C + \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \({{1, 0}} = 0\), \(\(-1\) +
>       y\)]\(-1\)\)}}
>
> Is there a special meaning of "K" or does this variable just interfere
> with some internals of rsolve?
>
> Thanks,
> Nils
>

```

• Prev by Date: large lists with variable and if condition (vrs. 8.0.4)
• Next by Date: Re: Function Doesn't Evaluate Local Variables?
• Previous by thread: Unrelated variable affects rsolve result
• Next by thread: Re: Unrelated variable affects rsolve result