Inconsistency when using previously defined variables as arguments to functions
Subject: Inconsistency when using previously defined variables as arguments to functions
From: thomas
Date: Sun, 30 Jan 2011 14:53:32 +0100
Thanks for the suggestion :)
This does indeed work when simply using "limit". However, in my case (we
call Maxima from inside another application), the call issued is
actually "ev(limit('(1/n), 'n, inf),simp);", and in that case, it
doesn't work. Any advice?
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
>>