The Field of Rational Expressions

As we have said before, the polynomials behave very much like integers. Both are closed under addition, subtraction (which presumes additive inverses and an additive identity exists), and multiplication, but not division (noting that occasionally divisors go into dividends "evenly"). Further, their additions and multiplications are associative and commutative.

Note that they also share other commonalities. For example, integers can be factored into products of irreducible values called primes, while polynomials can be factored into products of irreducible polynomials.

But on an aesthetic level, doesn't it seem that both integers and polynomials lack a certain symmetry? Specifically, recall that they both have additive inverses, but not multiplicative ones. In looking at commutative rings, one of the footnotes mentioned that in some modified clock arithmetics (ones where the number of hours is prime), one does have multiplicative inverses for all non-zero elements and a related multiplicative identity.

For example, in a $5$ hour clock arithmetic, the value $1$ serves as the multiplicative identity and $1^{-1} = 1$, $2^{-1} = 3$, $3^{-1} = 2$, and $4^{-1} = 4$. (The reader should convince themselves these claims are correct)

So we know that it is possible for commutative rings to have this additional structure.

Are there other commutative rings -- especially any that might be connected in some way to polynomials -- that have a multiplicative identity and inverses?

Just to be explicit about all the properties we desire -- we would like to find a set $F$ of things which are closed under both some "addition" and "multiplication" so that all of the following hold for any $a$, $b$, and $c$ in $F$:

  • Associativity of addition and multiplication: $a + (b + c) = (a + b) + c$ and $a(bc) = (ab)c$

  • Commutativity of addition and multiplication: $a + b = b + a$ and $ab = ba$

  • Additive and multiplicative identities: There exist two different elements in $F$ that we can call $0$ and $1$ whereby $a + 0 = a$ and $a \cdot 1 = a$ for every $a$ in $F$.

  • Additive and multiplicative inverses: For every $a$ in $F$, there exists an element in $F$ that we can denote by $(-a)$ and call the additive inverse of $a$, whereby $a + (-a) = 0$. Also, for every non-zero $a$ in $F$, there exists an element in $F$ that we can denote by $a^{-1}$ (or by $1/a$ if desired) and call the multiplicative inverse of $a$, whereby $a \cdot a^{-1} = 1$.

  • Distributivity of multiplication over addition: $a(b+c) = ab + ac$ and $(b+c)a = ba + ca$

Such wonderful structure fields have!
As a point of verbiage, when a set has all this structure attached to its arithmetic, we call it a field.

Of course, when we think about values with multiplicative inverses, fractions probably come to mind.

Indeed, the set of rational values, $\mathbb{Q}$, which are defined to be the set of all fractions with non-zero denominators forms a field! (The reader should convince themselves that this is true by considering each of the properties in the box above when $F = \mathbb{Q}$.)

Not surprisingly then, the set of rational expressions, which we define to be the set of all quotients of polynomials, behaves similarly.

In what follows, note that we initially restrict our attention to the arithmetic associated with the field of rational expressions which are quotients of two polynomials involving the same variable (and where the divisor is non-zero).

However, the arithmetic of rational expressions generalizes easily to quotients of polynomials of multiple variables too, as our later examples will demonstrate.

Simplifying to "Lowest Terms"

As the arithmetic of rational expressions (i.e., adding, subtracting, multiplying, and dividing them) will often result in initially much more complicated rational expressions, let us start by considering how we might simplify rational expressions.

The process mirrors that seen in simplifying rational values (i.e., normal fractions) to "lowest terms", where the numerator and denominator share no common factors other than one. One way to get to lowest terms form is to factor the numerator and denominator and then re-group any common factors found between the two to form a "multiplication by one", which can then be eliminated (i.e., "cancelled"), as shown below: $$\require{cancel}\begin{array}{rcl} \cfrac{385}{2730} &=& \cfrac{5 \cdot 7 \cdot 11}{2 \cdot 3 \cdot 5 \cdot 7 \cdot 13}\\ &=& \cancel{\cfrac{5 \cdot 7}{5 \cdot 7}} \cdot \cfrac{11}{2 \cdot 3 \cdot 13}\\ &=& \cfrac{11}{78} \end{array}$$

When factoring the numerator and denominator of a rational expression is easy to do, a similar process can be used to simplify a rational expression when it is defined, as seen below: $$\begin{array}{rcl} \cfrac{x^3 - 8}{x^2 - 5x + 6} &=& \cfrac{(x-2)(x^2 + 2x + 4)}{(x-2)(x-3)}\\ &=& \cancel{\cfrac{x-2}{x-2}} \cdot \cfrac{x^2 + 2x + 4}{x-3}\\ &=& \cfrac{x^2 + 2x + 4}{x-3} \end{array}$$

As it is a frequent source of confusion for folks, let us take a moment to discuss the importance of including that phrase "when it is defined" above.

Suppose you had defined two functions $f$ and $g$ as shown below: $$f(x) = \frac{x^3 - 8}{x^2-5x+6} = \frac{(x-2)(x^2+2x+4)}{(x-2)(x-3)} \quad \quad \textrm{and} \quad \quad g(x) = \frac{x^2 + 2x + 4}{x-3}$$

If no domain is specified, and we assume the implicit domain for each, these two functions are not equal! $g(x)$ is defined at $x=2$, while $f(x)$ is not!

However, if one only considers $x$ values where $f(x)$ (i.e, the more restrictive one) is defined -- then $g(x)$ will be defined as well, meaning $f(x) = g(x)$ for all such inputs $x$.

The Euclidean Algorithm

As the integers in a rational value increase in magnitude, doing the requisite factoring to simplify them to lowest terms can become difficult. Similarly, when the degree of the polynomials involved in a rational expression increases, factoring the polynomials can become difficult too. Fortunately, there is a sneaky trick we can pull when the polynomials involve only a single variable to overcome both of these difficulties that dates back to ancient Greece -- the Euclidean Algorithm.

Here's the idea. Suppose you want to simplify the fraction $\frac{1403}{2737}$.

To do this, you want to identify the greatest common divisor $d$ of these two numbers.

However, if both numbers are multiples of $d$, then their difference should be too. In fact, any multiple of one minus any multiple of the other should also be a multiple of $d$.

With this in mind, let us identify a value that is smaller than $1403$ but also a multiple of $d$ by subtracting the largest multiple of $1403$ from $2737$ that we can without going negative.

This is equivalent to dividing $2737$ by $1403$ and identifying the remainder. In this case, we can only subtract a single $1403$ from $2737$ before we go negative. The resulting remainder (which again must also be a multiple of this greatest common divisor $d$ we seek) is $1334$: $$2737 = 1 \cdot 1403 + 1334$$ Now, let's assess what we know. We seek the greatest common divisor $d$ of $2737$ and $1403$, but now we also know that this $d$ is the greatest common divisor of the smaller pair of values $1403$ and $1334$.

Nothing prevents us from doing the same thing to this new pair of values to find another, even smaller pair of values with the same greatest common divisor $d$. Indeed, we can keep finding remainders (that are all multiples of $d$) in this way until the numbers get small enough where one goes into the other and the value of $d$ we seek becomes obvious.

Doing this for the numbers above (i.e., $2737$ and $1403$) reveals the following pairs that each share the same greatest common divisor (shown in blue on each line below): $$\begin{array}{rcl} \color{blue}{2737} &=& 1 \cdot \color{blue}{1403} + 1334\\ \color{blue}{1403} &=& 1 \cdot \color{blue}{1334} + 69\\ \color{blue}{1334} &=& 19 \cdot \color{blue}{69} + 23\\ \color{blue}{69} &=& 3 \cdot \color{blue}{23} + 0 \end{array}$$

The last line reveals that the greatest common divisor must be $23$ as this value goes into $69$ evenly.

Sure enough, two quick divisions reveal $2737 = 23 \cdot 119$ and $1403 = 23 \cdot 61$, which means: $$\require{cancel}\begin{array}{rcl} \cfrac{1403}{2737} &=& \cfrac{23 \cdot 61}{23 \cdot 119}\\ &=& \cancel{\cfrac{23}{23}} \cdot \cfrac{61}{119}\\ &=& \cfrac{61}{119} \end{array}$$

In a certain sense, this is a shocking thing to see -- we just found a common factor of two values without factoring!

That shock aside, we can do the same thing to simplify a rational expression, when its numerator and denominator are both poynomials of one (common) variable.

To see this, note that the rational expression that we simplified earlier fit had this property -- both the numerator and denominator are polynomials in $x$: $$\cfrac{x^3 - 8}{x^2 - 5x + 6}$$ If we do the long division (which is where the requirement both polynomials are in the same, single variable is needed), we find $$\begin{array}{l} \hphantom{x^2 - 5x + 6 \ )\ x^3 + 0x^2 + \ 0}x \ + \ 5\\ x^2 - 5x + 6 \ \overline{\smash{\raise{.6ex}{)}}{\vphantom{)}} \ x^3 + 0x^2 + \ 0x \ - \ 8}\\ \hphantom{x^2 - 5x + 6 \ )\ } \underline{x^3 - 5x^2 + \ 6x}\\ \hphantom{x^2 - 5x + 6 \ )\ x^3 - {}} 5x^2 - \ 6x\\ \hphantom{x^2 - 5x + 6 \ )\ x^3 - {}} \underline{5x^2 - 25x + 30}\\ \hphantom{x^2 - 5x + 6 \ )\ x^3 - 5x^2 - {}} 19x - 38 \end{array}$$ As such, we have a remainder of $19x - 38$.

If there was some common polynomial factor to the numerator and denominator, it must also be a factor of this remainder. As such, let us find the remainder resulting from the division of the smaller pair of polynomials $x^2 - 5x + 6$ and $19x - 38$: $$\begin{array}{l} \hphantom{19x - 38 \ )\ x^2 + {}} \frac{1}{19}x - \frac{3}{19}\\ 19x - 38 \ \overline{\smash{\raise{.6ex}{)}}{\vphantom{)}} \ x^2 \ - 5x \ + \ 6}\\ \hphantom{19x - 38 \ )\ } \underline{x^2 \ -2x}\\ \hphantom{19x - 38 \ )\ x^2 } \ -3x \\ \hphantom{19x - 38 \ )\ x^2 } \ \underline{{}- 3x \ + \ 6}\\ \hphantom{19x - 38 \ )\ x^2 \ -3x \ + {}}\ 0 \end{array}$$ Seeing a remainder of zero, we know that $19x-38$ goes into $x^2 - 5x + 6$ evenly. As such, $19x-38$ is the common divisor that we seek to cancel. (Technically, it is a constant multiple of what we seek to cancel - but more on that in a minute.)

All that remains is to do one more division to see what will be left from $x^3 - 8$ when the factor $19x-38$ is removed, $$\begin{array}{l} \hphantom{19x - 38 \ )] \ x^3 + {}} \frac{1}{19} x^2 + \frac{2}{19} x + \frac{4}{19}\\ 19x - 38 \ \overline{\smash{\raise{.6ex}{)}}{\vphantom{)}} \ x^3 + 0x^2 + \ 0x \ - 8}\\ \hphantom{19x - 38 \ )\ } \underline{x^3 - 2x^2}\\ \hphantom{19x - 38 \ )\ x^3 + {}} 2x^2\\ \hphantom{19x - 38 \ )\ x^3 + {}} \underline{2x^2 - 4x}\\ \hphantom{19x - 38 \ )\ x^3 + 2x^2 - {}} 4x\\ \hphantom{19x - 38 \ )\ x^3 + 2x^2 - {}} \underline{4x - 8}\\ \hphantom{19x - 38 \ )\ x^3 + 2x^2 - {} 4x - {}} 0 \end{array}$$

and the removal of the "obvious" common constant factor of $\frac{1}{19}$, $$\begin{array}{rcl} \cfrac{x^3 - 8}{x^2 - 5x + 6} &=& \cfrac{\frac{1}{19} x^2 + \frac{2}{19} x + \frac{4}{19}}{\frac{1}{19}x - \frac{3}{19}}\\ &=& \cancel{\cfrac{\frac{1}{19}}{\frac{1}{19}}} \cdot \cfrac{x^2 + 2x + 4}{x-3}\\ &=& \cfrac{x^2 + 2x + 4}{x-3} \end{array}$$

Notice this second way of simplifying a rational expression (i.e., using the Euclidean Algorithm on the polynomials in question) required significantly more calculation -- but has an advantage that it will always work when the numerator and denominator are polynomials of the same, single variable. That said, when we can easily factor the polynomials in question, we should do that first -- it will save us significant time!

Rational Expression Arithmetic

Just as the process of simplifying rational expressions mirrors that of reducing rational values to lowest terms -- adding, subtracting, multiplying, and dividing rational expressions mirrors the same actions done to rational values.

Multiplication of Rational Expressions

For example, let us start by considering products of rational expressions. Suppose one wishes to find the following product (noting that unlike above, we are now dealing with polynomials in multiple variables): $$\cfrac{x^2 - 8x - 48}{24z - 2xz} \cdot \cfrac{4x + 4y}{xy + 4y}$$

We know the product of two fractions can be found by dividing the product of the numerators by the product of the denominators, as shown below: $$\frac{a}{b} \cdot \frac{c}{d} = \frac{ac}{bd}$$ but in practice, we don't immediately do this as it can make simplifying the result more difficult. Think about it, if you were finding the following product (in simplified form, of course) $$\frac{7}{39} \cdot \frac{26}{8}$$ would you immediately write $\frac{182}{312}$?

Of course not!

You would have the forsight to realize that if you did, the very next thing you would have to do is simplify this fraction to lowest terms -- and (presuming we wish to avoid the extra work required by the Euclidean Algorithm) this would require factoring the numerator and denominator. But didn't we start with a partially factored version of $182$ and $312$?

The more efficient strategy is to factor into primes all four of the numbers involved, so that we can identify anything common that could be canceled. That is to say, we would do the following $$\begin{array}{rcl} \cfrac{7}{39} \cdot \cfrac{26}{8} &=& \cfrac{7}{3 \cdot 13} \cdot \cfrac{2 \cdot 13}{2 \cdot 2 \cdot 2}\\ &=& \cancel{\cfrac{13 \cdot 2}{13 \cdot 2}} \cdot \cfrac{7}{3 \cdot 2 \cdot 2}\\ &=& \cfrac{7}{12} \end{array}$$

For rational expressions, the same strategy minimizes the degrees of the polynomials in the resulting numerator and denominator. This strategy of factor-cancel-combine is again very important here, as factoring arbitrary polynomials of large degree is extremely difficult -- and polynomials of large degree are exactly what we often produce if we fail to cancel common factors before expanding the products in the numerator and denominator.

The following provides an example, assuming all the expressions below are defined (i.e., no denominator is zero). Notice how in what is below, we can factor out a $(-1)$ so that an additional common factor can be cancelled: $$\begin{array}{rcl} \cfrac{x^2 - 8x - 48}{24z - 2xz} \cdot \cfrac{4x + 4y}{xy + 4y} &=& \cfrac{(x - 12)(x+4)}{2z(12 - x)} \cdot \cfrac{4(x + y)}{y(x+4)}\\\\ &=& (-1) \cdot \cancel{\cfrac{12-x}{12-x}} \cdot \cancel{\cfrac{x+4}{x+4}} \cdot \cfrac{4}{2} \cdot \cfrac{x+y}{yz}\\\\ &=& (-1) \cdot 2 \cdot \cfrac{x+y}{yz}\\\\ &=& \cfrac{-2x-2y}{yz} \end{array}$$

Division of Rational Expressions

Division is of course just a multiplication by a reciprocal (i.e., the multiplicative inverse). So given a quotient, one can always rewrite the expression as a product, and proceed as we did above.

For example, $$\begin{array}{rcl} \cfrac{y^2 - y}{w^2 - y^2} \div \cfrac{y^2 - 2y + 1}{y^2-y-wy+w} &=& \cfrac{y^2 - y}{w^2 - y^2} \cdot \cfrac{y^2-y-wy+w}{y^2 - 2y + 1}\\\\ &=& \cfrac{y(y-1)}{(w+y)(w-y)} \cdot \cfrac{(y-w)(y-1)}{(y-1)^2}\\\\ &=& \cancel{\cfrac{(y-1)^2}{(y-1)^2}} \cdot (-1) \cancel{\cdot \cfrac{w-y}{w-y}} \cdot \cfrac{y}{y+w}\\\\ &=& \cfrac{-y}{y+w} \end{array}$$

Don't forget, that a quotient $a \div b$ can also be written as a fraction $\cfrac{a}{b}$

As such, we could have begun the last example with $$\frac{\displaystyle{\frac{y^2 - y}{w^2 - y^2}}}{\displaystyle{\,\,\frac{y^2 - 2y + 1}{y^2-y-wy+w}\,\,}} = \cdots$$ and it would have been simplified in the exact same manner.

Adding Rational Expressions

Recall, adding rational values is a bit more involved than multiplying or dividing them. As we have seen before, working with polynomials instead of integers in the numerators and denominators further complicates things, since either multiplying them together or factoring them is often difficult to do by inspection -- especially when more than two polynomials are involved.

Given this, let us first review how rational values are normally added together, and then how this process can be tweaked a bit so that it better generalizes to a technique for adding rational expressions...

When the denominators of the two fractions are the same, we simply add the numerators, putting their sum over the common denominator. That is to say,

$$\frac{a}{c} + \frac{b}{c} = \frac{a + b}{c}$$

However, if the denominators of the two fractions differ, then we first have to re-express the fractions with a common denominator before we proceed. Often this is done by inspection when the numbers involved are small.

For example, noticing that $42$ is the smallest integer divisible by both $6$ and $21$, we could determine

$$\frac{3}{21} + \frac{7}{6} = \frac{6}{42} + \frac{49}{42} = \frac{55}{42}$$

However, when the numbers involved are larger, finding the common denominator by inspection is much more difficult. As such, let us consider a slightly different course of action...

First, notice that the least common denominator is a multiple of both denominators, and thus contains in its factorization all of the factors of the denominators in the fractions being summed. To clarify, consider the following example where the denominators present have been completely factored:

$$\frac{23}{294} + \frac{5}{182} = \frac{23}{2 \cdot 3 \cdot 7^2} + \frac{5}{2 \cdot 7 \cdot 13}$$

The first denominator's factored form tells us that the common denominator we seek must have factors $3$ and $7^2$. The second denominator's factored form tells us that the common denominator must have factors $7$ (which we already knew) and $13$.

Thus, the common denominator must minimally have factors $3$, $7^2$, and $13$. Any additional factors only serves to increase the value, so the least common denominator is simply $3 \cdot 7^2 \cdot 13$.

There is no need to multiply this out yet (indeed, in some problems we will never have to find this product -- so one shouldn't waste time doing so). Instead, we just ask ourselves what factors do the denominators of our summands (i.e., the things added together) lack that are present in the common denominator?

Equivalently, but more efficiently -- as soon as we factor the denominators of the two fractions we wish to add, we ask ourselves the question: "What does each denominator lack as a factor that the other denominator has present as a factor?"

In the example above, the first denominator lacks a factor of $13$, the second lacks a factor of $3$ and a (second) factor of $7$.

We can insert these factors into each denominator with the some clever multiplications by "one", and then add the resulting fractions as their common denominators are now equal, as shown below:

$$\begin{array}{rcl} \cfrac{23}{294} + \cfrac{5}{182} &=& \cfrac{23}{2 \cdot 3 \cdot 7^2} + \cfrac{5}{2 \cdot 7 \cdot 13}\\\\ &=& \cfrac{23}{2 \cdot 3 \cdot 7^2} \cdot \cfrac{13}{13} + \cfrac{5}{2 \cdot 7 \cdot 13} \cdot \cfrac{3 \cdot 7}{3 \cdot 7}\\\\ &=& \cfrac{23 \cdot 13}{2 \cdot 3 \cdot 7^2 \cdot 13} + \cfrac{5 \cdot 3 \cdot 7}{2 \cdot 3 \cdot 7^2 \cdot 13}\\\\ &=& \cfrac{404}{2 \cdot 3 \cdot 7^2 \cdot 13} \end{array}$$

Note, at this moment -- just like when we discussed when multiplying rational expressions -- we want to avoid the temptation to multiply out the denominator of our result. We would like to have our final answer in simplified form (i.e., "lowest terms"), which requires that all common factors between the numerator and denominator be eliminated. So why would we multiply out the denominator only to turn around and factor it again so that we can identify any such common factors?

Indeed, the more expedient course of action here is to factor the numerator and then cancel any appropriate common factors that might be found. Only after that has been done, should we multiply everything out, as shown below

$$\begin{array}{rcl} \cdots &=& \cfrac{2^2 \cdot 101}{2 \cdot 3 \cdot 7^2 \cdot 13}\\\\ &=& \cancel{\cfrac{2}{2}} \cdot \cfrac{2 \cdot 101}{3 \cdot 7^2 \cdot 13}\\\\ &=& \cfrac{202}{1911} \end{array}$$

This slightly modified technique for adding rational values now extends nicely to adding rational expressions.

Consider the following:

$$\begin{array}{rcl} \frac{2}{y^2 - 4y - 5} + \frac{5}{y^2 - 2y - 15} &=& \frac{2}{(y-5)(y+1)} + \frac{5}{(y-5)(y+3)} \quad \scriptsize{\textrm{after factoring the denominators}}\\\\ &=& \frac{2}{(y-5)(y+1)} \cdot \frac{(y+3)}{(y+3)} + \frac{5}{(y-5)(y+3)} \cdot \frac{(y+1)}{(y+1)} \quad \scriptsize{\begin{array}{l}\textrm{after adding the}\\\textrm{missing factors}\end{array}}\\\\ &=& \frac{2(y+3)}{(y-5)(y+1)(y+3)} + \frac{5(y+1)}{(y-5)(y+1)(y+3)} \quad \scriptsize{\begin{array}{l}\textrm{a sum with}\\\textrm{common denominators}\end{array}}\\\\ &=& \frac{2(y+3)+5(y+1)}{(y-5)(y+1)(y+3)} \quad \scriptsize{\textrm{now, to factor the numerator we first expand it...}}\\\\ &=& \frac{2y+6 + 5y + 5}{(y-5)(y+1)(y+3)} \quad \scriptsize{\textrm{...and collect like terms}}\\\\ &=& \frac{7y + 11}{(y-5)(y+1)(y+3)} \quad \scriptsize{\begin{array}{l}\textrm{with no common terms to cancel, we can}\\\textrm{multiply out the denominator, if desired}\end{array}}\\\\ &=& \frac{7y+11}{y^3 - y^2 - 17y - 15} \end{array}$$

Subtracting Rational Expressions

Just as with subtracting rational values, to subtract two rational expressions, we simply "add the negative". That is to say, $$a - b = a + (-1)b$$

As an example:

$$\frac{x}{x^2+2x+1} - \frac{x+2}{x+1} \, = \, \frac{x}{x^2+2x+1} + (-1) \cdot \frac{x+2}{x+1}$$

From there, we can proceed with the technique described in the previous section to add rational expressions:

$$\begin{array}{rcl} \cdots &=& \frac{x}{(x+1)^2} + (-1) \cdot \frac{x+2}{x+1}\\\\ &=& \frac{x}{(x+1)^2} + (-1) \cdot \frac{(x+2)}{(x+1)} \cdot \frac{(x+1)}{(x+1)} \quad \scriptsize{\textrm{the parentheses added help avoid silly mistakes}}\\\\ &=& \frac{x + (-1)(x+2)(x+1)}{(x+1)^2}\\\\ &=& \frac{-x^2 -2x -2}{(x+1)^2} \quad \scriptsize{\textrm{note the numerator fails to factor (by Eisenstein's Criterion, $p=2$), so nothing will cancel}}\\\\ &=& -\frac{x^2 + 2x + 2}{x^2 + 2x + 1} \quad \scriptsize{\textrm{after pulling the negative out mostly for aesthetic reasons...}}\\\\ \end{array}$$

Complex Fractions

When a fraction's numerator and denominator consist of rational expressions -- or sums or differences of the same -- we call the fraction a complex fraction. The following are some examples:

$$\frac{\displaystyle{\frac{2x}{2x+1} - 1}}{\displaystyle{1 + \frac{2x}{1-2x}}}, \quad \quad \frac{\displaystyle{\frac{x+y}{x}}}{\displaystyle{\frac{1}{x} + \frac{1}{y}}}, \quad \quad \textrm{and} \quad \quad \frac{\displaystyle{\frac{1}{a} - \frac{1}{a^2} - \frac{20}{a^3}}}{\displaystyle{\frac{1}{a} + \frac{8}{a^2} - \frac{16}{a^3}}}$$

Given their structure -- and provided that denominators remain non-zero -- we can always reduce such expressions down to a rational function by following the steps below:

  1. collapse the numerator to a single rational expression;
  2. collapse the denominator to a single rational expression; and then
  3. find the quotient of these two rational expressions via multiplying by a reciprocal.

For example,

$$\begin{array}{rcl} \displaystyle{\frac{\displaystyle{\frac{5}{m}} - \displaystyle{\frac{2}{m+1}}}{\displaystyle{\frac{3}{m+1}} + \displaystyle{\frac{1}{m}}}} &=& \displaystyle{\frac{\displaystyle{\frac{5}{m} \cdot \frac{m+1}{m+1}} - \displaystyle{\frac{2}{m+1} \cdot \frac{m}{m}}}{\displaystyle{\frac{3}{m+1} \cdot \frac{m}{m}} + \displaystyle{\frac{1}{m} \cdot \frac{m+1}{m+1}}}} \quad \scriptsize{\begin{array}{l}\textrm{collapsing the numerator and denominator}\\\textrm{requires building some common denominators}\end{array}}\\\\ &=& \cfrac{\displaystyle{\cfrac{5(m+1) - 2m}{m(m+1)}}}{\displaystyle{\cfrac{3m + (m+1)}{m(m+1)}}}\\\\ &=& \cfrac{5(m+1) - 2m}{m(m+1)} \cdot \cfrac{m(m+1)}{3m + (m+1)} \quad \scriptsize{\textrm{recalling division is multiplication by a reciprocal}}\\\\ &=& \cfrac{3m+5}{m(m+1)} \cdot \cfrac{m(m+1)}{4m+1}\\\\ &=& \cancel{\cfrac{m(m+1)}{m(m+1)}} \cdot \cfrac{3m+5}{4m+1}\\\\ &=& \cfrac{3m+5}{4m+1} \end{array}$$

Often, we can be much more efficient by multiplying by a "well-chosen value of one" first. This is certainly the case with the previous example, as shown below.

$$\begin{array}{rcl} \displaystyle{\frac{\displaystyle{\frac{5}{m}} - \displaystyle{\frac{2}{m+1}}}{\displaystyle{\frac{3}{m+1}} + \displaystyle{\frac{1}{m}}}} &=& \displaystyle{\frac{\displaystyle{\frac{5}{m}} - \displaystyle{\frac{2}{m+1}}}{\displaystyle{\frac{3}{m+1}} + \displaystyle{\frac{1}{m}}}} \cdot \frac{m(m+1)}{m(m+1)}\\\\ &=& \cfrac{5(m+1) -2m}{3m + (m+1)}\\\\ &=& \cfrac{3m+5}{4m+1} \end{array}$$

As can be seen above, we choose the factors of our "well-chosen value of one" so that they will reduce as many rational expressions to polynomials as possible in our overall expression.



†: Interestingly, the very difficult nature of factoring large integers is the very thing that allows for modern encryption techniques to work -- the very same encryption techniques that keep your credit card information safe when you make purchases online. How modern encryption works is one of the more powerful applications of the branch of mathematics called number theory. We won't develop this idea any further here, but if this interests you, you should investigate the RSA encryption scheme.