Subject: The factor function is a little bit silly.
From: J.C. Pizarro
Date: Tue, 8 Apr 2008 00:27:47 +0200
> On Monday 07 April 2008 22:11, J.C. Pizarro wrote:
>
> >> Maybe you just have removed expand(...)?
> >
> > No, no, i didn't remove expand(...)!
>
> I guess you need to do it :-)
Yes, i need expand because it's very important for me.
I use expand(...) because i want not to write huge polynomials
that i want to factor them. So, expand does the job that i want.
It's equivalent to write automatically huge polynomials that i want
instead of manually.
>
> > but if i put sqrt2 instead of sqrt then the symbolic computation is
> > "different":
> >
> > (%i10) factor(expand((sqrt2(x+a)+b)^10));
> > 10
> > (%o10) (sqrt2(x + a) + b)
> >
> > It demonstrates that there is some strange symbolic computation.
>
> It's because Maxima doesn't know anything about the "sqrt2" and how it should
> be expanded. It's not more "strange" than something like
>
> factor(expand((foobarbaz(x+a)+b)^10)) => (foobarbaz(x+a)+b)^10
So, if Maxima knows about "sqrt" then it should factor the above formula
"symbolically" but it didn't wrong it because it believed that was
doing "numerically" sqrt(a) for all real points of a instead of "symbolically",
i supposed it.
Then it's a bug of Maxima in the symbolic computation when the name of
its symbol matches with the name of the (pre)defined function sqrt.
And when it doesn't matches, it works correctly.
> > I'm still waiting the answer of
> >
> > (%i11) factor(expand((x-y-z)^1000));
> >
> > [...]
> >
> > If i remove the expression "-z" then it solved in few seconds:
> >
> > (%i12) factor(expand((x-y)^1000));
>
> There's no difference in Maxima approach, it's just expansion of (a+b)^n takes
> less time than expansion of (a+b+c)^n.
In theory, it's not true (e.g. if the computation is realized in lazy mode or
intelligent mode), but in the practice, the longer time is due to its weaker
implementation that doesn't support the solving of stronger formulas.
> Why do you putting expand(...) inside factor(...)?
Because mathematically, the humans can solve it when the machines
can't due to its bad intelligence in the solving.
Paradoxically, "expand" is as "deriv", and "factor" is as "integrate".
Why do you putting integrate(...) inside deriv(...)?
Why do you putting deriv(...) inside integrate(...)?
Why do you putting divide(...) inside multiply(...)?
Why do you putting multiply(...) inside divide(...)?
...
They're paradoxically the same questions to your question.
The general answer is that any thing can't be ignored.
> --
> Alexey Beshenov <al at beshenov.ru>
> http://beshenov.ru/