Sin and Cos Rules
axiom
x:=v1*sin(p1)+v2*sin(p2)
Type: Expression(Integer)
axiom
y:= a0 + a1*x + a2*x^2 + a3*x^3
Type: Expression(Integer)
axiom
sinCosProducts := rule
sin(x)*sin(y) == (cos(x-y) - cos(x+y))/2
cos(x)*cos(y) == (cos(x-y) + cos(x+y))/2
sin(x)*cos(y) == (sin(x-y) + sin(x+y))/2
sin(x)^2 == (1 - cos(2*x))/2
sin(x)^3 == sin(x)*(1 - cos(2*x))/2
Type: Ruleset(Integer,Integer,Expression(Integer))
axiom
sinCosProducts(y)
Type: Expression(Integer)
Integration
axiom
)clear completely
All user variables and function definitions have been cleared.
All )browse facility databases have been cleared.
Internally cached functions and constructors have been cleared.
)clear completely is finished.
integrate(%e ^(-x*x), x=%minusInfinity..%plusInfinity)
Type: Union(f1: OrderedCompletion
?(Expression(Integer)),
...)
axiom
integrate(integrate(x+y, x),y)
Type: Polynomial(Fraction(Integer))
axiom
integrate(exp(-b*h*sin(o))*sin(o),o=0..2*%pi)
Type: Union(fail: failed,...)
Gosper's algorithm is implemented in Axiom
axiom
p:Polynomial Integer:=1+x+x^2
Type: Polynomial(Integer)
axiom
sum(p,x=0..n)
Type: Fraction(Polynomial(Integer))
axiom
e:=binomial(2*k,k)/4^k
Type: Expression(Integer)
axiom
sum(e,k=0..n)
Type: Expression(Integer)
axiom
sum(%,n=0..n)
Type: Expression(Integer)
axiom
factor(4*n^2+8*n+3)
Type: Factored(Polynomial(Integer))
Examples from Petkovsek, Wilf, Zeilberger
exp(log(x)+log(y^-1)); | reduce |
Symbols, kernels, variables, expressions ... difficult to understand
axiom
e0:Expression Integer:=1+2*x^2+x
Type: Expression(Integer)
axiom
kernels(e0)
Type: List(Kernel(Expression(Integer)))
axiom
p0:=e0::(Polynomial Integer)
Type: Polynomial(Integer)
axiom
variables(p0)
Type: List(Symbol)
axiom
e1:Expression Integer:=x*sin(t)/cos(t)+1
Type: Expression(Integer)
axiom
kernels(e1)
Type: List(Kernel(Expression(Integer)))
axiom
solve(e1=0,x)
Type: List(Equation(Expression(Integer)))
axiom
e2:UP(x,Expression Integer):=sin(t)/cos(t)*x
Type: UnivariatePolynomial
?(x,
Expression(Integer))
Expressions and substitution
axiom
f:=operator 'f; e:=1+a*x**2+f(y)*x^3; eq:=[f(y)=r]; peq:=subst(e,eq)::(Polynomial Integer)=0;sol:=radicalSolve(peq,x);
Type: List(Equation(Expression(Integer)))
axiom
--[(lhs(s)=subst(rhs(s),r=f(y))) for s in sol]
--As a list there is no output shown
--x1=subst (rhs(sol.1),r=f(y))
--x2=subst (rhs(sol.2),r=f(y))
x3=subst (rhs(sol.3),r=f(y))
Type: Equation(Expression(Integer))
Parsing expressions ???
axiom
e:Expression Integer:=x*y
Type: Expression(Integer)
axiom
isMult(e)
Type: Union("failed",...)
axiom
e1:Expression Integer:=x
Type: Expression(Integer)
axiom
isMult(e1)
Type: Union(Record(coef: Integer,var: Kernel(Expression(Integer))),...)
axiom
isMult(e1*e)
Type: Union("failed",...)