## Rational Expression Arithmetic

Recall, polynomials behave very much like integers. Just as the sums, differences, and products of integers are integers themselves -- sums, differences, and products of polynomials are always themselves polynomials. As for division, quotients of integers can sometimes be integers, but they need not be, and quotients of two polynomials are sometimes expressible as a polynomial, but other times they are not. Integers can be factored; polynomials can be factored. There are other similarities as well, although that is a discussion best saved for another time.

Let us consider more deeply just what happens when we divide two polynomials instead...

First, just as we name quotients of two integers rational values, we call quotients of two polynomials rational expressions. As this naming convention suggests, these two mathematical concepts are intimately connected.

We can reduce rational values to "lowest terms"; we can likewise reduce rational expressions to "lowest terms". We can add, subtract, multiply, and divide rational values, and provided we don't divide by zero the result is always expressible as a rational value. The exact same can be said of rational expressions.

Further, since we often think of the variables in polynomials (and hence the polynomials themselves) as having real values, the way in which we reduce, add, subtract, multiply and divide rational expressions exactly parallels the same operations on their numerical counterparts.

As multiplication is mechanically the simplest of these four operations with regard to rational values, let us begin there...

### Multiplying and Simplifying Rational Expressions

As suggested above, products of both rational values and rational expressions are found in the exact same way -- multiply the numerators and multiply the denominators to find the numerator and denominator, respectively, of the result.

This mechanism for finding a product gives us a means to simplify rational expressions.

Consider the analogous process for rational values...

For example, to simplify (i.e., reduce to "lowest terms") the fraction $\frac{385}{2730}$ we 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 cancelled, as shown below$\require{cancel}$

$$\begin{array}{rcl} \frac{385}{2730} &=& \frac{5 \cdot 7 \cdot 11}{2 \cdot 3 \cdot 5 \cdot 7 \cdot 13}\\\\ &=& \cancel{\frac{5 \cdot 7}{5 \cdot 7}} \cdot \frac{11}{2 \cdot 3 \cdot 13}\\\\ &=& \frac{11}{78} \end{array}$$

In a like manner, we can simplify a rational expression by factoring both the numerator and denominator and then cancelling any common factors found between the two, as shown by the example below (you may assume $b \ne 3$):

$$\begin{array}{rcl} \frac{2b^2 - 9b + 9}{b^2 - 6b + 9} &=& \frac{(2b - 3)(b - 3)}{(b-3)^2}\\\\ &=& \cancel{\frac{b-3}{b-3}} \cdot \frac{2b - 3}{b-3}\\\\ &=& \frac{2b - 3}{b-3} \end{array}$$

The above technique suggests a better way to find simplified products of rational values (and hence, rational expressions).

Consider what happens if one just multiplies both numerators together and both denominators together. If we wish to have a completely simplified answer, we'll just need to turn around and factor these two products completely, so that common factors can be found.

Doesn't it make more sense to instead factor both numerators and both denominators, and look for common factors at that time? Any factors common to one of the two numerators and one of the two denominators may similarly be re-grouped to form a multiplication by "one" and thus, canceled.

Then -- and only then -- we multiply together the remaining factors to form the numerator and denominator of our final answer.

For rational values, this helps keep the numbers small, which in turn makes factoring easier, as shown below:

$$\begin{array}{rcl} \frac{6}{35} \cdot \frac{14}{9} &=& \frac{2 \cdot 3}{5 \cdot 7} \cdot \frac{2 \cdot 7}{3 \cdot 3}\\\\ &=& \cancel{\frac{3}{3}} \cdot \cancel{\frac{7}{7}} \cdot \frac{2 \cdot 2}{5 \cdot 3}\\\\ &=& \frac{4}{15} \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 very important, as factoring arbitrary polynomials of large degree is extremely difficult -- and polynomials of large degree is 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 of the variables present have values such that all of the expressions below are defined (i.e., no denominator is zero).

$$\begin{array}{rcl} \frac{x^2 - 8x - 48}{24z - 2xz} \cdot \frac{4x + 4y}{xy + 4y} &=& \frac{(x - 12)(x+4)}{2z(12 - x)} \cdot \frac{4(x + y)}{y(x+4)}\\\\ &=& (-1) \cdot \cancel{\frac{12-x}{12-x}} \cdot \cancel{\frac{x+4}{x+4}} \cdot \frac{4}{2} \cdot \frac{x+y}{yz}\\\\ &=& (-1) \cdot 2 \cdot \frac{x+y}{yz}\\\\ &=& \frac{-2x-2y}{yz} \end{array}$$

Note that above we treat each rational expression as a value -- one associated with some particular values of $x$, $y$, and $z$. This explains the need for the assumption that these variables' values are chosen so that no zero denominators are present.

### Dividing Rational Expressions

Whether one is talking about rational values or 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 suggested above.

For example,

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

Don't forget that a quotient $a \div b$ can also be written as a fraction $\displaystyle{\frac{a}{b}}$.

As such, we could have began 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.

Recall, adding rational values is a bit more involved than multiplying or dividing them. 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}{147} + \frac{5}{91} = \frac{23}{3 \cdot 7^2} + \frac{5}{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 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 add these factors to 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} \frac{23}{294} + \frac{5}{182} &=& \frac{23}{2 \cdot 3 \cdot 7^2} + \frac{5}{2 \cdot 7 \cdot 13}\\\\ &=& \frac{23}{2 \cdot 3 \cdot 7^2} \cdot \frac{13}{13} + \frac{5}{2 \cdot 7 \cdot 13} \cdot \frac{3 \cdot 7}{3 \cdot 7}\\\\ &=& \frac{23 \cdot 13}{2 \cdot 3 \cdot 7^2 \cdot 13} + \frac{5 \cdot 3 \cdot 7}{2 \cdot 3 \cdot 7^2 \cdot 13}\\\\ &=& \frac{404}{2 \cdot 3 \cdot 7^2 \cdot 13} \end{array}$$

Note, at this moment 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 &=& \frac{2^2 \cdot 101}{2 \cdot 3 \cdot 7^2 \cdot 13}\\\\ &=& \cancel{\frac{2}{2}} \cdot \frac{2 \cdot 101}{3 \cdot 7^2 \cdot 13}\\\\ &=& \frac{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" (i.e., $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, 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}}\\\\ &=& \frac{\displaystyle{\frac{5(m+1) - 2m}{m(m+1)}}}{\displaystyle{\frac{3m + (m+1)}{m(m+1)}}}\\\\ &=& \frac{5(m+1) - 2m}{m(m+1)} \cdot \frac{m(m+1)}{3m + (m+1)} \quad \scriptsize{\textrm{recalling division is multiplication by a reciprocal}}\\\\ &=& \frac{3m+5}{m(m+1)} \cdot \frac{m(m+1)}{4m+1}\\\\ &=& \cancel{\frac{m(m+1)}{m(m+1)}} \cdot \frac{3m+5}{4m+1}\\\\ &=& \frac{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)}\\\\ &=& \frac{5(m+1) -2m}{3m + (m+1)}\\\\ &=& \frac{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.

†: At some time in the near future, we will treat similar expressions as functions instead. At that time we will have to revisit exactly what we mean by two such expressions being "equal". The reinterpretation will be subtle, but will have important consequences, especially with regard to the evaluation of certain expressions in calculus called "limits".