I have a series of rules that I would like to apply to a series of expressions with variables, but cannot get Mathematica to correctly recognize that these rules should apply when my variables have exponents in them. For example, let's suppose I know that a b=1.
a b /. a b -> 1
(* 1 *)
a c b /. a b -> 1
(* c *)
So those work fine. Then I try:
a a b /. a b -> 1
(* a^2 b *)
In general, my rules are a good deal more complicated, but the problem is always the same. How do I get mathematica to recognize a^2 as a a so that it correctly applies the reduction rules?
PolynomialReduce. For complicated expressions that go beyond polynomials, maybe check this link – Daniel Lichtblau Aug 02 '14 at 21:02