In this section we illustrate calculations that would be awkward to do (as far as I know) in non-symbolic computer algebra systems like MAGMA or GAP.
We compute the gcd of
and
for arbitrary
.
sage: f = maxima('2*x^(n+4) - x^(n+2)') sage: g = maxima('4*x^(n+1) + 3*x^n') sage: f.gcd(g) x^n
You can plot 3d graphs (via gnuplot):
sage: maxima('plot3d(x^2-y^2, [x,-2,2], [y,-2,2], [grid,12,12])') [displays a 3 dimensional graph]
You can formally evaluate sums (note the nusum
command):
sage: S = maxima('nusum(exp(1+2*i/n),i,1,n)') sage: S.display2d() 2/n + 3 2/n + 1 %e %e ----------------------- - ----------------------- 1/n 1/n 1/n 1/n (%e - 1) (%e + 1) (%e - 1) (%e + 1)
We formally compute the limit as
of
as follows:
sage: T = S*maxima('2/n') sage: T.tlimit('n','inf') %e^3 - %e
See About this document... for information on suggesting changes.