Subject: The factor function is a little bit silly.
From: Alexey Beshenov
Date: Mon, 7 Apr 2008 19:47:39 +0400
On Monday 07 April 2008 15:45, J.C. Pizarro wrote:
> To fix this problem in the future: better artificial sustitution in the
> solving of factor or intelligent lazy computation as
> factor(expand(Alpha)) => Alpha.
You're passing a verb to factor(...), so it's not "silly" when Maxima
evaluates it and does expansion of such huge polynomial.
Your rule is obviously wrong, e.g.
factor(expand((x^2+4*x+4)^3)) => (x+2)^6
You can add your own rules of form
factor(expand((f)^n)) => (factor(f))^n,
but I guess it's not very useful---why not to remove expand(...) when it's not
needed?
> factor(expand((sqrt(x+a)+b)^10));
>
> i got once the imprecise solution
>
> 10 b x^4 sqrt(x+a) + 120 b^3 x^3 sqrt(x+a) + ... + 45 a^4 b^2 + a^5
>
> but i got many times (sqrt(x+a)+b)^10 .
>
> I think that the maxima system uses memoization that remember some internal
> answers of previous computations but it's non-deterministic.
Maybe you just have removed expand(...)?
factor(expand((sqrt(x+a)+b)^10)) =>
10*b*x^4*sqrt(x+a) + 120*b^3*x^3*sqrt(x+a) + ...,
factor(sqrt(x+a)+b)^10) =>
sqrt(x+a)+b)^10
--
Alexey Beshenov <al at beshenov.ru>
http://beshenov.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080407/b6f86af0/attachment.pgp