Expand algebraic math functions.