Maxima Function
reveal (expr, depth)
Replaces parts of expr at the specified integer depth with descriptive summaries.
Sums and differences are replaced by sum(n)
where n is the number of operands of the sum.
Products are replaced by product(n)
where n is the number of operands of the product.
Exponentials are replaced by expt.
Quotients are replaced by quotient.
Unary negation is replaced by negterm.
When depth is greater than or equal to the maximum depth of expr,
reveal (expr, depth) returns expr unmodified.
reveal evaluates its arguments.
reveal returns the summarized expression.
Example:
(%i1) e: expand ((a - b)^2)/expand ((exp(a) + exp(b))^2); 2 2 b - 2 a b + a (%o1) ------------------------- b + a 2 b 2 a 2 %e + %e + %e (%i2) reveal (e, 1); (%o2) quotient (%i3) reveal (e, 2); sum(3) (%o3) ------ sum(3) (%i4) reveal (e, 3); expt + negterm + expt (%o4) ------------------------ product(2) + expt + expt (%i5) reveal (e, 4); 2 2 b - product(3) + a (%o5) ------------------------------------ product(2) product(2) 2 expt + %e + %e (%i6) reveal (e, 5); 2 2 b - 2 a b + a (%o6) -------------------------- sum(2) 2 b 2 a 2 %e + %e + %e (%i7) reveal (e, 6); 2 2 b - 2 a b + a (%o7) ------------------------- b + a 2 b 2 a 2 %e + %e + %e