Inconsistency when using previously defined variables as arguments to functions
Subject: Inconsistency when using previously defined variables as arguments to functions
From: thomas
Date: Wed, 26 Jan 2011 14:23:43 +0100
Thank you for your reply. :)
Even though that is a nice work-around, it doesn't really solve the
inconsistency-problem. And it's quite inconvinient to have to quote the
variables in each expression I want to differentiate, limit, etc.
Also I think that I'm probably not the only person who stumbled uppon
this problem: when calculating things like "limit(1/i, i, infinity);" I
might've already forgotten that I defined "i" in the first place, and
might then use an incorrect result.
Cheers
Thomas
On 01/26/2011 01:37 PM, Ilya Ryabinkin wrote:
> You may try noun form 'i istead of i
>
> Ilya
>
> On Wed, Jan 26, 2011 at 6:06 AM, thomas<thomas at geogebra.org> wrote:
>> Hi there!
>>
>> Some commands, such as "limit" or "sum" take a "target"-variable as an
>> argument. E.g. for limit or sum, this is the 2nd argument. However, there is
>> an inconsistency in the way maxima behaves when this variable was previously
>> defined:
>>
>>
>> $ maxima
>> Maxima 5.23.2 http://maxima.sourceforge.net
>> using Lisp SBCL 1.0.40.0.debian
>> Distributed under the GNU Public License. See the file COPYING.
>> Dedicated to the memory of William Schelter.
>> The function bug_report() provides bug reporting information.
>> (%i1) i:1;
>> (%o1) 1
>> (%i2) limit(1/i, i, infinity);
>>
>> limit: second argument must be a variable, not a constant; found: 1
>> -- an error. To debug this try: debugmode(true);
>> (%i3) sum(1/i, i, 1, 2);
>> 3
>> (%o3) -
>> 2
>>
>>
>> Since the 2nd argument in these commands is basically "local" to the
>> command, it is my understanding that "sum" behaves correctly in this case,
>> while "limit" (and others like "diff") should somehow be fixed. At least
>> that is my understanding. Would this be possible/feasible?
>>
>> If that's not the case: is there some way to work around this? I've tried
>> using local and a block, but that didn't seem to work out :( Any advice?
>>
>> Cheers
>>
>> Thomas
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>