Variable expressions with like terms