Simplifying rational expressions: higher degree terms