Jeroen Demeyer on Sun, 12 Feb 2006 14:02:01 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: x^n + x^n |
cino hilliard wrote:
x^n+x^n gives (04:00) gp > x^n+x^n *** gpow: need integer exponent if series valuation != 0. Maple gives x^n+x^n; 2x^n
The reason is that Maple is a different kind of program. PARI/GP is really just a fancy calculator, it does not know about symbolic expressions like x^n. However, it can work with polynomials and power series, which can act somewhat like symbolic expressions. For example,
(x + 1)^2 will give what you expect: x^2 + 2*x + 1.Maple on the other hand, can really do symbolic manipulations, so it really treats x^n as "x to the power n". I don't have Maple here, but I suppose you could differentiate x^n and get nx^(n-1) as the answer.
The upshot of this is that PARI/GP is really specialized on the mathematics, so it is much faster than Maple for mathematical computations (factoring a large number for example).
This is the idea, I'm sure someone else can explain better. Jeroen Demeyer