Subject: expand(), was: derivatives of matrix functions
From: Robert Dodier
Date: Fri, 5 Dec 2003 07:02:40 -0800 (PST)
I wrote:
> > Hmm, well, I have to say I found it quite surprising that
> > sum and integrate, for example, are not automatically
> > declared linear.
--- Stavros Macrakis <stavros.macrakis@verizon.net> wrote:
> But what if (a+b) is integrable as a sum, but a and b are not
> integrable separately, e.g. 1/LOG(x)-1/LOG(x)^2? You really
> don't want linearity applied!
If I entered "'integrate(1/log(x)-1/log(x)^2,x);expand(%);"
then I asked for linearity to be applied, and I should get it.
I agree that Maxima should not immediately turn 'integrate(a+b)
into 'integrate(a)+'integrate(b). But expand(%) should be
taken as sufficient evidence of intent to do just that.
> > What about having a global linearity flag? E.g.,
> > DECLARE_LINEAR_ALL_USUAL_SUSPECTS or something.
>
> You can put together a batch file to define all your
> favorite settings, [...]
Yes, I could do that -- now. It wouldn't help me while I'm
figuring out (over a period of weeks) how to make Maxima
do what I want.
As a general goal, Maxima should try to do the "right
thing" out of the box. Yes, that is vague and ill-defined.
I hope people are interested in defining it and making
it happen.
[...]
> There is more than one definition of "simplest". It depends
> on what you want to do with the expression, [...]
> Do you want f((a+b)/c) (linear f) to automatically become
> f(a/c)+f(b/c)? The answer is surely "sometimes".
Sometimes, sure. How can Maxima tell if "this time"
it's supposed to try hard to expand an expression?
I propose that if I execute "expand(expr)", that is
enough evidence that I really want expansion, and it
should go ahead and apply whatever it knows.
At present, expand(expr) might or might not actually
expand something. I can't believe that this is how
people expect an algebra system to work.
> [...] Perhaps there should be a generic Expand that
> knows about all possible kinds of expansion. But to
> control its application, it should only operate on the
> top level of an expression. [...]
That is an interesting idea: if I want to expand some
complex expression, I'll apply expand() repeatedly.
That seems like a useful operation.
best,
Robert Dodier
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/