Prec.Bas prec.BasNiv. sup.

1.4 Mathematics and Graphics 

Since GAP aims at discrete mathematics, it does not provide much of the calculus functionality listed in the following section.

e p i + oo  V~ -
 2 21/3
Axiom %e %pi%i %plusInfinitysqrt(2) 2**(1/3)
CoCoA Isqrt(2)
Derive #e pi #i inf SQRT(2) 2^(1/3)
DoCon
GAP E(4)infinity ER(2)11
Macsyma %e %pi%i inf sqrt(2) 2^(1/3)
Magnus
Maple exp(1)Pi I infinity sqrt(2) 2^(1/3)
Mathcad
MathematicaE Pi I Infinity Sqrt[2] 2^(1/3)
Maxima %e %pi%i inf sqrt(2) 2^(1/3)
MuPAD E PI I infinity sqrt(2) 2^(1/3)
Octave
Pari
Reduce e pi i infinity sqrt(2) 2^(1/3)
Singular
Yacas


Euler's constantNatural log Arctangentn!
Axiom log(x) atan(x) factorial(n)
CoCoA
Derive euler_ gamma LOG(x) ATAN(x) n!
DoCon
GAP LogInt(x,base) Factorial(n)
Macsyma %gamma log(x) atan(x) n!
Magnus
Maple gamma log(x) arctan(x) n!
Mathcad
MathematicaEulerGamma Log[x] ArcTan[x] n!
Maxima %gamma log(x) atan(x) n!
MuPAD EULER ln(x) atan(x) n!
Octave
Pari
Reduce Euler_ Gamma log(x) atan(x) factorial(n)
Singular
Yacas


Legendre polynomial Chebyshev polynomial of the 1st kind
Axiom legendreP(n, x) chebyshevT(n, x)
CoCoA
Derive LEGENDRE_ P(n, x) CHEBYCHEV_ T(n, x)
DoCon
GAP
Macsyma legendre_ p(n, x) chebyshev_ t(n, x)
Magnus
Maple orthopoly[P](n, x) orthopoly[T](n, x)
Mathcad
MathematicaLegendreP[n, x] ChebyshevT[n, x]
Maxima legendre_ p(n, x) chebyshev_ t(n, x)
MuPAD orthpoly::legendre(n, x)orthpoly::chebyshev1(n, x)
Octave
Pari
Reduce LegendreP(n, x) ChebyshevT(n, x)
Singular
Yacas


Fibonacci number Elliptic integral of the 1st kind
Axiom fibonacci(n)
CoCoA
Derive FIBONACCI(n) ELLIPTIC_ E(phi, k^2)
DoCon
GAP Fibonacci(n)
Macsyma fib(n) elliptic_ e(phi, k^2)
Magnus
Maple combinat[fibonacci](n)EllipticE(sin(phi), k)
Mathcad
MathematicaFibonacci[n] EllipticE[phi, k^2]
Maxima fib(n) elliptic_ e(phi, k^2)
MuPAD numlib::fibonacci(n)
Octave
Pari
Reduce EllipticE(phi, k^2)
Singular LIB "general.lib";
fibonacci(n);
Yacas


G(x) y(x) Cosine integral Bessel fun. (1st)
Axiom Gamma(x) psi(x) real(Ei(%i*x))besselJ(n, x)
CoCoA
Derive GAMMA(x) PSI(x) CI(x) BESSEL_ J(n, x)
DoCon
GAP
Macsyma gamma(x) psi[0](x) cos_ int(x) bessel_j[n](x)
Magnus
Maple GAMMA(x) Psi(x) Ci(x) BesselJ(n, x)
Mathcad
MathematicaGamma[x] PolyGamma[x]CosIntegral[x]BesselJ[n, x]
Maxima gamma(x) psi[0](x) cos_ int(x) bessel_j[n](x)
MuPAD gamma(x) psi(x) besselJ(n, x)
Octave
Pari
Reduce Gamma(x) Psi(x) Ci(x) BesselJ(n, x)
Singular
Yacas Gamma(n/2) or  
GammaNum(x)


Hypergeometric fun. 2F1(a, b; c; x) Dirac deltaUnit step fun.
Axiom
CoCoA
Derive GAUSS(a, b, c, x) STEP(x)
DoCon
GAP
Macsyma hgfred([a, b], [c], x) delta(x) unit_ step(x)
Magnus
Maple hypergeom([a, b], [c], x) Dirac(x) Heaviside(x)
Mathcad
MathematicaHypergeometricPFQ[{a,b},{c},x]<< Calculus`DiracDelta`
Maxima hgfred([a, b], [c], x) delta(x) unit_ step(x)
MuPAD dirac(x) heaviside(x)
Octave
Pari
Reduce hypergeometric({a, b}, {c}, x)
Singular
Yacas


Define |x| via a piecewise function
Axiom
CoCoA
Derive a(x):= -x*CHI(-inf, x, 0) + x*CHI(0, x, inf)
DoCon
GAP
Macsyma a(x):= -x*unit_ step(-x) + x*unit_ step(x)$
Magnus
Maple a:= x -> piecewise(x < 0, -x, x):
Mathcad
Mathematica<< Calculus`DiracDelta`
a[x_]:= -x*UnitStep[-x] + x*UnitStep[x]
Maxima a(x):= -x*unit_ step(-x) + x*unit_ step(x)$
MuPAD a:= proc(x) begin -x*heaviside(-x) + x*heaviside(x)
end_ proc:
Octave
Pari
Reduce
Singular
Yacas


Assume x is real Remove that assumption
Axiom
CoCoA
Derive x :epsilon Real x:=
DoCon
GAP
Macsyma declare(x, real)$ remove(x, real)$
Magnus
Maple assume(x, real); x:= 'x':
Mathcad
Mathematicax/: Im[x] = 0; Clear[x]
Maxima declare(x, real)$ remove(x, real)$
MuPAD assume(x, Type::RealNum):unassume(x, Type::RealNum):
Octave
Pari
Reduce
Singular
Yacas


Assume 0 < x < 1 Remove that assumption
Axiom
CoCoA
Derive x :epsilon (0, 1] x:=
DoCon
GAP
Macsyma assume(x > 0, x <= 1)$ forget(x > 0, x <= 1)$
Magnus
Maple assume(x > 0); x:= 'x':
additionally(x <= 1);
Mathcad
MathematicaAssumptions -> 0 < x <= 1 12
Maxima assume(x > 0, x <= 1)$ forget(x > 0, x <= 1)$
MuPAD assume(x > 0): assume(x <= 1):unassume(x):
Octave
Pari
Reduce
Singular
Yacas


Basic simplification of an expression e
Axiom simplify(e) or  normalize(e) or  complexNormalize(e)
CoCoA
Derive e
DoCon
GAP e
Macsyma ratsimp(e) or  radcan(e)
Magnus
Maple simplify(e)
Mathcad
MathematicaSimplify[e] or  FullSimplify[e]
Maxima ratsimp(e) or  radcan(e)
MuPAD simplify(e) or  normal(e)
Octave
Pari
Reduce e
Singular
Yacas


Use an unknown function Numerically evaluate an expr.
Axiom f:= operator('f); f(x)exp(1) :: Complex Float
CoCoA
Derive f(x):= Precision:= Approximate
f(x) APPROX(EXP(1))
Precision:= Exact
DoCon
GAP EvalF(123/456)
Macsyma f(x) sfloat(exp(1));
Magnus
Maple f(x) evalf(exp(1));
Mathcad
Mathematicaf[x] N[Exp[1]]
Maxima f(x) sfloat(exp(1));
MuPAD f(x) float(exp(1));
Octave
Pari
Reduce operator f; f(x) on rounded; exp(1);
off rounded;
Singular
Yacas


n mod m Solve e  =_ 0 mod m for x
Axiom rem(n, m) solve(e = 0 :: PrimeField(m), x)
CoCoA
Derive MOD(n, m) SOLVE_ MOD(e = 0, x, m)
DoCon
GAP n mod m solve using finite fields
Macsyma mod(n, m) modulus: m$ solve(e = 0, x)
Magnus
Maple n mod m msolve(e = 0, m)
Mathcad
MathematicaMod[n, m] Solve[{e == 0, Modulus == m}, x]
Maxima mod(n, m) modulus: m$ solve(e = 0, x)
MuPAD n mod m solve(poly(e = 0, [x], IntMod(m)), x)
Octave
Pari
Reduce on modular; load_ package(modsr)$ on modular;
setmod m$ nsetmod m$ m_solve(e = 0, x)
Singular n mod m
Yacas


Put over common denominatorExpand into separate fractions
Axiom a/b + c/d (a*d + b*c)/(b*d) :: _
MPOLY([a], FRAC POLY INT)
CoCoA
Derive FACTOR(a/b + c/d, Trivial)EXPAND((a*d + b*c)/(b*d))
DoCon
GAP a/b+c/d
Macsyma xthru(a/b + c/d) expand((a*d + b*c)/(b*d))
Magnus
Maple normal(a/b + c/d) expand((a*d + b*c)/(b*d))
Mathcad
MathematicaTogether[a/b + c/d] Apart[(a*d + b*c)/(b*d)]
Maxima xthru(a/b + c/d) expand((a*d + b*c)/(b*d))
MuPAD normal(a/b + c/d) expand((a*d + b*c)/(b*d))
Octave
Pari
Reduce a/b + c/d on div; (a*d + b*c)/(b*d)
Singular a/b + c/d (a*d + b*c)/(b*d)
Yacas


Manipulate the root of a polynomial
Axiom a:= rootOf(x**2 - 2); a**2
CoCoA
Derive
DoCon
GAP x:=X(Rationals,"x");
a:=RootOfDefiningPolynomial 
(AlgebraicExtension(Rationals,x^2-2));
a^2
Macsyma algebraic:true$ tellrat(a^2 - 2)$ rat(a^2);
Magnus
Maple a:= RootOf(x^2 - 2): simplify(a^2);
Mathcad
Mathematicaa = Root[#^2 - 2 &, 2] a^2
Maxima algebraic:true$ tellrat(a^2 - 2)$ rat(a^2);
MuPAD
Octave
Pari
Reduce load_ package(arnum)$ defpoly(a^2 - 2); a^2;
Singular
Yacas


Noncommutative multiplicationSolve a pair of equations
Axiom solve([eqn1, eqn2], [x, y])
CoCoA
Derive x :epsilon Nonscalar SOLVE([eqn1, eqn2], [x, y])
y :epsilon Nonscalar
x . y
DoCon
GAP *
Macsyma x . y solve([eqn1, eqn2], [x, y])
Magnus
Maple x &* y solve({eqn1, eqn2}, {x, y})
Mathcad
Mathematicax ** y Solve[{eqn1, eqn2}, {x, y}]
Maxima x . y solve([eqn1, eqn2], [x, y])
MuPAD solve({eqn1, eqn2}, {x, y})
Octave
Pari
Reduce operator x, y; solve({eqn1, eqn2}, {x, y})
noncom x, y;
x() * y()
Singular LIB "solve.lib";
solve(ideal(eqn1,eqn2));
Yacas


Decrease/increase angles in trigonometric functions
Axiom simplify(normalize(sin(2*x)))
CoCoA
Derive Trigonometry:= ExpandTrigonometry:= Collect
sin(2*x) 2*sin(x)*cos(x)
DoCon
GAP
Macsyma trigexpand(sin(2*x)) trigreduce(2*sin(x)*cos(x))
Magnus
Maple expand(sin(2*x)) combine(2*sin(x)*cos(x))
Mathcad
MathematicaTrigExpand[Sin[2*x]] TrigReduce[2*Sin[x]*Cos[x]]
Maxima trigexpand(sin(2*x)) trigreduce(2*sin(x)*cos(x))
MuPAD expand(sin(2*x)) combine(2*sin(x)*cos(x), sincos)
Octave
Pari
Reduce load_ package(assist)$
trigexpand(sin(2*x)) trigreduce(2*sin(x)*cos(x))
Singular
Yacas


Gröbner basis
Axiom groebner([p1, p2, ...])
CoCoA GBasis(Ideal(p1, p2, ...));
Derive
DoCon
GAP
Macsyma grobner([p1, p2, ...])
Magnus
Maple Groebner[gbasis]([p1, p2, ...], plex(x1, x2, ...))
Mathcad
MathematicaGroebnerBasis[{p1, p2, ...}, {x1, x2, ...}]
Maxima grobner([p1, p2, ...])
MuPAD groebner::gbasis([p1, p2, ...])
Octave
Pari
Reduce load_ package(groebner)$ groebner({p1, p2, ...})
Singular groebner(ideal(p1,p2 ...))
Yacas


Factorization of e over i =  V~ ---
  -1
Axiom factor(e, [rootOf(i**2 + 1)])
CoCoA
Derive FACTOR(e, Complex)
DoCon
GAP Factors(GaussianIntegers,e)
Macsyma gfactor(e); or  factor(e, i^2 + 1);
Magnus
Maple factor(e, I);
Mathcad
MathematicaFactor[e, Extension -> I]
Maxima gfactor(e); or  factor(e, i^2 + 1);
MuPAD QI:= Dom::AlgebraicExtension(Dom::Rational, i^2 + 1);
QI::name:= "QI": Factor(poly(e, QI));
Octave
Pari
Reduce on complex, factor; e; off complex, factor;
Singular ring C=(0,i),x,dp;minpoly=i2+1;factorize(e);
Yacas


Real part
Axiom real(f(z))
CoCoA
Derive RE(f(z))
DoCon
GAP (f(z)+GaloisCyc(f(z),-1))/2
Macsyma realpart(f(z))
Magnus
Maple Re(f(z))
Mathcad
MathematicaRe[f[z]]
Maxima realpart(f(z))
MuPAD Re(f(z))
Octave
Pari
Reduce repart(f(z))
Singular repart(f(z))
Yacas


Convert a complex expr. to rectangular form
Axiom complexForm(f(z))
CoCoA
Derive f(z)
DoCon
GAP
Macsyma rectform(f(z))
Magnus
Maple evalc(f(z))
Mathcad
MathematicaComplexExpand[f[z]]
Maxima rectform(f(z))
MuPAD rectform(f(z))
Octave
Pari
Reduce repart(f(z)) + i*impart(f(z))
Singular repart(f(z)) * repart(f(z)) + i*impart(f(z))
Yacas


Matrix additionMatrix multiplicationMatrix transpose
Axiom A + B A * B transpose(A)
CoCoA A + B; A * B; Transposed(A);
Derive A + B A . B A`
DoCon
GAP A + B A * B TransposedMat(A)
Macsyma A + B A . B transpose(A)
Magnus
Maple evalm(A + B) evalm(A &* B) linalg[transpose](A)
Mathcad
MathematicaA + B A . B Transpose[A]
Maxima A + B A . B transpose(A)
MuPAD A + B A * B transpose(A)
Octave
Pari
Reduce A + B A * B tp(A)
Singular A + B A * B transpose(A)
Yacas


Solve the matrix equation Ax = b
Axiom solve(A, transpose(b)) . 1 . particular :: Matrix ___
CoCoA
Derive
DoCon
GAP SolutionMat(TransposedMat(A),b)
Macsyma xx: genvector('x, mat_nrows(b))$
x: part(matlinsolve(A . xx = b, xx), 1, 2)
Magnus
Maple x:= linalg[linsolve](A, b)
Mathcad
Mathematicax = LinearSolve[A, b]
Maxima xx: genvector('x, mat_nrows(b))$
x: part(matlinsolve(A . xx = b, xx), 1, 2)
MuPAD
Octave
Pari
Reduce
Singular
Yacas


Sum:  sum i=1nf(i) Product:  prod i=1nf(i)
Axiom sum(f(i), i = 1..n) product(f(i), i = 1..n)
CoCoA L:=[]; L:=[];
Foreach I In 1..N Do Foreach I in 1..N Do
Append(L,F(I)); Append(L,F(I));
End; End;
Sum(L); Product(L);
Derive SUM(f(i), i, 1, n) PRODUCT(f(i), i, 1, n)
DoCon
GAP Sum([1..n],f) Product([1..n],f)
Macsyma closedform( closedform(
sum(f(i), i, 1, n)) product(f(i), i, 1, n))
Magnus
Maple sum(f(i), i = 1..n) product(f(i), i = 1..n)
Mathcad
MathematicaSum[f[i], {i, 1, n}] Product[f[i], {i, 1, n}]
Maxima closedform( closedform(
sum(f(i), i, 1, n)) product(f(i), i, 1, n))
MuPAD sum(f(i), i = 1..n) product(f(i), i = 1..n)
Octave
Pari
Reduce sum(f(i), i, 1, n) prod(f(i), i, 1, n)
Singular
Yacas


Limit: lim x-->0-f(x) Taylor/Laurent/etc. series
Axiom limit(f(x), x = 0, "left") series(f(x), x = 0, 3)
CoCoA
Derive LIM(f(x), x, 0, -1) TAYLOR(f(x), x, 0, 3)
DoCon
GAP
Macsyma limit(f(x), x, 0, minus) taylor(f(x), x, 0, 3)
Magnus
Maple limit(f(x), x = 0, left) series(f(x), x = 0, 4)
Mathcad
MathematicaLimit[f[x], x->0, Direction->1]Series[f[x],{x, 0, 3}]
Maxima limit(f(x), x, 0, minus) taylor(f(x), x, 0, 3)
MuPAD limit(f(x), x = 0, Left) series(f(x), x = 0, 4)
Octave
Pari
Reduce limit!-(f(x), x, 0) taylor(f(x), x, 0, 3)
Singular
Yacas


Differentiate: 3
ddfx(dx,yy2) Integrate:  integral 01f(x) dx
Axiom D(f(x, y), [x, y], [1, 2])integrate(f(x), x = 0..1)
CoCoA
Derive DIF(DIF(f(x, y), x), y, 2)INT(f(x), x, 0, 1)
DoCon
GAP
Macsyma diff(f(x, y), x, 1, y, 2) integrate(f(x), x, 0, 1)
Magnus
Maple diff(f(x, y), x, y$2) int(f(x), x = 0..1)
Mathcad
MathematicaD[f[x, y], x, {y, 2}] Integrate[f[x], {x, 0, 1}]
Maxima diff(f(x, y), x, 1, y, 2) integrate(f(x), x, 0, 1)
MuPAD diff(f(x, y), x, y$2) int(f(x), x = 0..1)
Octave
Pari
Reduce df(f(x, y), x, y, 2) int(f(x), x, 0, 1)
Singular diff(diff(diff(f,x),y),y)
Yacas


Laplace transform Inverse Laplace transform
Axiom laplace(e, t, s) inverseLaplace(e, s, t)
CoCoA
Derive LAPLACE(e, t, s)
DoCon
GAP
Macsyma laplace(e, t, s) ilt(e, s, t)
Magnus
Maple inttrans[laplace](e,t,s) inttrans[invlaplace](e,s,t)
Mathcad
Mathematica << Calculus`LaplaceTransform`
LaplaceTransform[e, t, s]InverseLaplaceTransform[e,s,t]
Maxima laplace(e, t, s) ilt(e, s, t)
MuPAD transform::laplace(e,t,s)transform::ilaplace(e, s, t)
Octave
Pari
Reduce load_ package(laplace)$ load_ package(defint)$
laplace(e, t, s) invlap(e, t, s)
Singular
Yacas


Solve an ODE (with the initial condition y'(0) = 1)
Axiom solve(eqn, y, x)
CoCoA
Derive APPLY_ IC(RHS(ODE(eqn, x, y, y_)), [x, 0], [y, 1])
DoCon
GAP
Macsyma ode_ibc(ode(eqn, y(x), x), x = 0, diff(y(x), x) = 1)
Magnus
Maple dsolve({eqn, D(y)(0) = 1}, y(x))
Mathcad
MathematicaDSolve[{eqn, y'[0] == 1}, y[x], x]
Maxima ode_ibc(ode(eqn, y(x), x), x = 0, diff(y(x), x) = 1)
MuPAD solve(ode({eqn, D(y)(0) = 1}, y(x)))
Octave
Pari
Reduce odesolve(eqn, y(x), x)
Singular
Yacas


Define the differential operator L = Dx + I and apply it to sin x
Axiom DD : LODO(Expression Integer, e +-> D(e, x)) := D();
L:= DD + 1; L(sin(x))
CoCoA
Derive
DoCon
GAP
Macsyma load(opalg)$ L: (diffop(x) - 1)$ L(sin(x));
Magnus
Maple id:= x -> x: L:= (D + id): L(sin)(x);
Mathcad
MathematicaL = D[#, x]& + Identity; Through[L[Sin[x]]]
Maxima load(opalg)$ L: (diffop(x) - 1)$ L(sin(x));
MuPAD L:= (D + id): L(sin)(x);
Octave
Pari
Reduce
Singular
Yacas


2D plot of two separate curves overlayed
Axiom draw(x, x = 0..1); draw(acsch(x), x = 0..1);
CoCoA
Derive [Plot Overlay]
DoCon
GAP
Macsyma plot(x, x, 0, 1)$ plot(acsch(x), x, 0, 1)$
Magnus
Maple plot({x, arccsch(x)}, x = 0..1):
Mathcad
MathematicaPlot[{x, ArcCsch[x]}, {x, 0, 1}];
Maxima plot(x, x, 0, 1)$ plot(acsch(x), x, 0, 1)$
MuPAD plotfunc(x, acsch(x), x = 0..1):
Octave
Pari
Reduce load_ package(gnuplot)$ plot(y = x, x = (0 .. 1))$
plot(y = acsch(x), x = (0 .. 1))$
Singular LIB "surf.lib";
plot(((x+3)^3+2*(x+3)^2-y^2)*(x^3-y^2)*((x-3)^3-2*(x-3)^2-y^2));13
Yacas


Simple 3D plotting
Axiom draw(abs(x*y), x = 0..1, y = 0..1);
CoCoA
Derive [Plot Overlay]
DoCon
GAP
Macsyma plot3d(abs(x*y), x, 0, 1, y, 0, 1)$
Magnus
Maple plot3d(abs(x*y), x = 0..1, y = 0..1):
Mathcad
MathematicaPlot3D[Abs[x*y], {x, 0, 1}, {y, 0, 1}];
Maxima plot3d(abs(x*y), x, 0, 1, y, 0, 1)$
MuPAD plotfunc(abs(x*y), x = 0..1, y = 0..1):
Octave
Pari
Reduce load_ package(gnuplot)$
plot(z = abs(x*y), x = (0 .. 1), y = (0 .. 1))$
Singular LIB "surf.lib"; plot(z^2-x^2*y);14
Yacas


 

Prec.Bas prec.HautNiv. sup.