simplifyFraction
Reduces a rational expression to lowest terms.
Category: Mathematics > Formula Manipulation and Simplification
Syntax
R = simplifyFraction(f)
Cancels the common factors of numerator and denominator.
Description
The function computes the greatest common divisor of the numerator and denominator polynomials and divides it out. It is cheaper and more predictable than simplify, which tries many rewriting rules.
Input arguments
f- Symbolic rational expression.
Output arguments
R- Equivalent fraction in which numerator and denominator share no factor.
Example
Cancel a common factor
syms x
simplifyFraction((x^2 - 1)/(x - 1))
Output
ans = x + 1