There are lots of other weird cases. Does %i only mean the 'variable'
within the special scope of diff etc.?
Does that then mean that val: %i$ diff(val,%i) is going to be different
from diff(%i,%i)? Is diff(val,val) going to be 1? But is that the same val
of which it is true that val^2 = -1. What about diff(val^2,val)? Does the
val^2 evaluate/simplify to -1 or not?
I do get your point that it would be nice to say: "I am using %pi as a
variable whose name is ?, not as a symbol for some constant."
Mathematicians do things like that all the time.
Actually, you can do that -- just unintern $%pi. But that has to be a more
global statement than just saying that diff(%pi,%pi) is going to perform
magic to make it happen locally. And even then there remains the problem
of what Maxima is supposed to do to denote the %pi that is about 3.14. If
you unintern, Maxima will happily return the internal symbol $%pi which
looks identical to the user's symbol $%pi but isn't *eq* to it. Hardly the
sort of thing I'd want to inflict on the poor naive user who
*accidentally* used
%e, %i, and %pi as variables.
-s
On Tue, Jul 30, 2013 at 12:40 AM, Stavros Macrakis <macrakis at alum.mit.edu>wrote:
> So what is your proposed value for diff(%i^2,%i)? ... I could *imagine* a
> system where %i^2 would not simplify to -1 before 'diff' saw it, but that
> is a very different system from the existing Maxima.
>
> What is the value of integrate(sqrt(%i),%i,-1,0) in your system? Is it
> 2/3*%i? The "outer" %i denotes something different from the "inner" %i.
> That seems... confusing.
>
>
> On Mon, Jul 29, 2013 at 11:50 PM, Robert Dodier <robert.dodier at gmail.com>wrote:
>
>> On 2013-07-27, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
>>
>> > I hope you're pulling my leg.
>>
>> Of course not.
>>
>> > Although Maxima is a permissive system in many ways -- and that is a
>> good
>> > thing -- allowing nonsensical operations without warning is bound to
>> cause
>> > problems. If the user really wants to use the symbol %pi for a
>> variable,
>> > they can subst something else for it.
>>
>> It isn't nonsense -- the sense of it is that the symbol is being used in
>> a limited context with some meaning other than the one that generally
>> prevails. I claim that plot2d, as do sum and integrate, establishes such
>> a context. The difficulty, of course, is that Maxima is pretty clumsy
>> about handling context in general. But it is still useful to daydream
>> about what Maxima could do in a perfect world.
>>
>> "Everybody" knows that %pi represents the ratio of circumference to
>> diameter, but what if you use a more obscure symbol?
>> What if one share package declares %foo as a constant and another
>> package uses it as a variable? Whose problem is it to change the symbol?
>>
>> > Besides the question of inconsistent results, there is the simple
>> pragmatic
>> > issue that I'm pretty confident that in the vast majority of cases where
>> > users try to use %i, etc. as variables, that is not actually their
>> intent.
>>
>> That is precisely the reason to allow it -- the user is, in effect,
>> declaring that they don't care about the special properties of the symbol.
>>
>> best
>>
>> Robert Dodier
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>
>