Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: defrule (<rulename>, <pattern>, <replacement>) Defines and names a replacement rule for the given pattern. If the rule named <rulename> is applied to an expression (by apply1, applyb1, or apply2), every subexpression matching the pattern will be replaced by the replacement. All variables in the replacement which have been assigned values by the pattern match are assigned those values in the replacement which is then simplified.
The rules themselves can be treated as functions which transform an expression by one operation of the pattern match and replacement. If the match fails, the rule function returns false.
(%o1) true (%i2)