Lesson Explainer: Adding and Subtracting Rational Functions Mathematics

In this explainer, we will learn how to add and subtract rational functions, identify the domains of the resulting functions, and simplify them.

We start by recalling that rational functions are the quotients of two polynomials; this means that adding and subtracting rational functions involves adding and subtracting quotients. This is similar to how we add and subtract fractions. For example, we can add the following fractions by rewriting them to have a common denominator: 12+13=12×33+13×22=36+26=3+26=56.

It is worth reiterating why we can just add the numerators of the fractions together when their denominators are equal. We know that 36=3×16 and 26=2×16, so they share a factor of 16. Taking out this shared factor, we have 36+26=3×16+2×16=16×(3+2)=3+26.

This is true for any nonzero denominator; we can rewrite the fractions to have a common denominator and then just add the numerators. Hence, the same process applies to rational functions; the only difference is that our denominators can be zero for certain input values. In this case, the functions are not defined, so we must also consider the domains of the functions.

We will do this by considering an example. Let’s say we want to simplify the following sum of rational functions: 𝑓(𝑥)=1𝑥+2𝑥+1.

Before we start simplifying, we should first find the domain of 𝑓(𝑥); we recall that the domain of a rational function is the set of all real numbers except those that are roots of the denominator. The domain of a sum of real-valued functions is the intersection of their domains since we need both functions to be defined to add them together. So, we can apply this to each term separately to see that the domain of 𝑓(𝑥) is {1,0}.

We now want to add these terms together. To do this, we need them to have the same denominator. We can do this by cross multiplying:

We multiply the numerator and denominator of the first fraction by 𝑥+1 and the numerator and denominator of the second by 𝑥. This gives 𝑓(𝑥)=1𝑥+2𝑥+1=1𝑥×𝑥+1𝑥+1+2𝑥+1×𝑥𝑥=𝑥+1𝑥(𝑥+1)+2𝑥𝑥(𝑥+1).

Finally, we add the numerators together: 𝑓(𝑥)=𝑥+1𝑥(𝑥+1)+2𝑥𝑥(𝑥+1)=𝑥+1+2𝑥𝑥(𝑥+1)=3𝑥+1𝑥(𝑥+1), on the domain {1,0}.

Since 𝑓(𝑥) is a rational function, we could also simplify by canceling out shared factors in the numerator and denominator over the domain. In this case, there are no shared factors, so 𝑓(𝑥) cannot be simplified further.

In the example above, we used the property that the domain of a sum or difference of functions is the intersection of their domains to show the following useful property for determining the domain of the sum or difference of rational functions.

Property: The Domain of the Sum or Difference of Rational Functions

The domain of the sum or difference of rational functions is all real numbers except the roots of any of the denominators of the rational functions in the sum or difference.

In other words, if 𝑓(𝑥) is the sum of rational functions given by 𝑓(𝑥)=𝑝(𝑥)𝑞(𝑥)+𝑝(𝑥)𝑞(𝑥), the set of zeroes of 𝑞(𝑥) is 𝑍, and the set of zeroes of 𝑞(𝑥) is 𝑍, then the domain of 𝑓(𝑥) is (𝑍𝑍).

This then allows us to simplify the sum or difference of any rational function by following this same process.

How To: Simplifying the Sum or Difference of Rational Functions

  1. Fully factor the denominators of each rational function in the sum or difference.
  2. Find the domain of the sum or difference by excluding all the roots of these denominators.
  3. Simplify each term by canceling out shared factors over the domain.
  4. Multiply the numerators and denominators of each term in the sum or difference so that each term has a common denominator.
  5. Find the sum or difference of the terms.
  6. Simplify the rational function over its domain.

Let’s now see some examples of applying this process to add two rational functions together.

Example 1: Adding Rational Functions

Simplify 𝑛(𝑥)=3𝑥+27𝑥+3𝑥2𝑥.

Answer

We start by finding the domain of this function. We recall that this is the set of all real numbers except for the roots of any of the denominators. Since all of the denominators are fully factored, we can see that these roots are 𝑥=0 and 𝑥=2, so the domain of 𝑛(𝑥) is {0,2}.

We recall that to add rational functions, we need them to have the same denominator. We can rewrite these terms by cross multiplying and then adding the numerators: 𝑛(𝑥)=3𝑥+27𝑥+3𝑥2𝑥=3𝑥+27𝑥×2𝑥2𝑥+3𝑥2𝑥×7𝑥7𝑥=(3𝑥+2)(2𝑥)+3𝑥(7𝑥)7𝑥(2𝑥).

We can then simplify the numerator by distributing. We have (3𝑥+2)(2𝑥)=6𝑥3𝑥+42𝑥3𝑥(7𝑥)=21𝑥.

Hence, 𝑛(𝑥)=(3𝑥+2)(2𝑥)+3𝑥(7𝑥)7𝑥(2𝑥)=6𝑥3𝑥+42𝑥+21𝑥7𝑥(2𝑥)=21𝑥3𝑥+4𝑥+47𝑥(2𝑥), on the domain {0,2}.

We can now attempt to simplify this rational function by canceling out shared factors in the numerator and denominator. Since the denominator has roots 𝑥=0 and 𝑥=2, we can use the factor theorem to check if the numerator also has these linear factors.

Substituting 𝑥=0 and 𝑥=2 into the numerator gives us 21(0)3(0)+4(0)+4=4,21(2)3(2)+4(2)+4=168.

Since these are both nonzero, 𝑥=0 and 𝑥=2 are not roots of the numerator by the factor theorem. Hence, we cannot simplify the rational function any further.

We note that since there has been no change to the domain after adding the terms together (i.e., it is still {0,2}), we do not need to include the domain as part of the answer.

Therefore, 𝑛(𝑥)=21𝑥3𝑥+4𝑥+47𝑥(2𝑥).

In our next example, we will simplify the difference between two rational functions.

Example 2: Calculations Involving Properties of Rational Functions

Simplify 𝑛(𝑥)=3𝑥2𝑥2𝑥+85𝑥23𝑥.

Answer

We start by finding the domain of 𝑛(𝑥). Since this is the difference of two rational functions, we recall that this is the set of all real numbers except for the roots of any of the denominators. We first factor 2𝑥+8 to get 2(𝑥+4). We can then set each denominator equal to zero and solve them for 𝑥. Solving these equations, we find that the roots are 𝑥=4 and 𝑥=0. Hence, the domain of 𝑛(𝑥) is {4,0}.

We recall that to find the difference of rational functions, we need them to have the same denominator. We can rewrite these terms by cross multiplying and then finding the difference in the numerators: 𝑛(𝑥)=3𝑥2𝑥2𝑥+85𝑥23𝑥=3𝑥2𝑥2(𝑥+4)×3𝑥3𝑥5𝑥23𝑥×2(𝑥+4)2(𝑥+4)=3𝑥2𝑥(3𝑥)(5𝑥2)(2(𝑥+4))3𝑥(2(𝑥+4))=3𝑥2𝑥(3𝑥)(5𝑥2)(2(𝑥+4))6𝑥(𝑥+4).

We can then simplify the numerator by distributing. In the first term, we have 3𝑥2𝑥(3𝑥)=9𝑥6𝑥.

In the second term, we have (5𝑥2)(2(𝑥+4))=10𝑥+40𝑥4𝑥16.

Hence, 𝑛(𝑥)=3𝑥2𝑥(3𝑥)(5𝑥2)(2(𝑥+4))6𝑥(𝑥+4)=9𝑥6𝑥10𝑥+40𝑥4𝑥166𝑥(𝑥+4)=9𝑥6𝑥10𝑥40𝑥+4𝑥+166𝑥(𝑥+4)=9𝑥16𝑥36𝑥+166𝑥(𝑥+4).

We can now attempt to simplify this rational function by canceling out shared factors in the numerator and denominator. Since the denominator has roots 𝑥=4 and 𝑥=0, we can use the factor theorem to check if the numerator also has these linear factors.

Substituting 𝑥=4 and 𝑥=0 into the numerator gives us 9(4)16(4)36(4)+16=672,9(0)16(0)36(0)+16=16.

Since these are both nonzero, 𝑥=4 and 𝑥=0 are not roots of the numerator by the factor theorem. Hence, we cannot simplify the rational function any further.

We note that as the domain has not changed since the start of the problem (i.e., it is still {4,0}), we do not need to state it as part of the answer.

Therefore, 𝑛(𝑥)=9𝑥16𝑥36𝑥+166𝑥(𝑥+4).

In our previous two examples, we did not need to simplify the rational function by canceling out shared factors at any point. This is not always the case as we will see in our next two examples.

Example 3: Simplifying the Difference of Two Rational Functions and Determining Its Domain

Simplify the function 𝑛(𝑥)=5𝑥𝑥4𝑥+4𝑥16, and determine its domain.

Answer

We start by finding the domain of 𝑛(𝑥) since this is the difference of two rational functions. We recall that this is the set of all real numbers except for the roots of any of the denominators. We first factor the second denominator to get 𝑥16=(𝑥4)(𝑥+4).

This gives us 𝑛(𝑥)=5𝑥𝑥4𝑥+4(𝑥4)(𝑥+4).

We can then set each denominator equal to zero and solve these equations for 𝑥. Solving these equations gives 𝑥=4 and 𝑥=4. Hence, the domain of 𝑛(𝑥) is {4,4}.

We can now move on to the cross multiplication step. However, we can simplify the second term by canceling out the shared factor of 𝑥+4 in the numerator and denominator of the second term over the domain of 𝑛(𝑥). This gives us 𝑛(𝑥)=5𝑥𝑥4𝑥+4(𝑥4)(𝑥+4)=5𝑥𝑥41𝑥4, on the domain {4,4}.

These now have the same denominator, so we have 𝑛(𝑥)=5𝑥𝑥41𝑥4=5𝑥1𝑥4, on the domain {4,4}.

Since the numerator and denominator share no common factors, we cannot simplify further.

Hence, 𝑛(𝑥)=5𝑥1𝑥4 and the domain is {4,4}.

In our next example, we will simplify the sum of two rational functions with quadratic denominators.

Example 4: Simplifying the Sum of Two Rational Functions and Determining Its Domain

Simplify the function 𝑛(𝑥)=8𝑥+7𝑥14𝑥+45+3𝑥24𝑥17𝑥+72, and determine its domain.

Answer

We start by finding the domain of 𝑛(𝑥). Since this is the difference of two rational functions, we recall that this is the set of all real numbers except for the roots of any of the denominators.

We need to factor both denominators. We have 𝑥14𝑥+45=(𝑥5)(𝑥9),𝑥17𝑥+72=(𝑥8)(𝑥9).

Therefore, the domain of 𝑛(𝑥) is {5,8,9}.

Using the above factoring, we can then rewrite 𝑛(𝑥) as follows: 𝑛(𝑥)=8𝑥+7𝑥14𝑥+45+3𝑥24𝑥17𝑥+72=8𝑥+7(𝑥9)(𝑥5)+3(𝑥8)(𝑥8)(𝑥9).

We can simplify the second term over the domain of 𝑛(𝑥) by canceling out the shared factor. This gives 𝑛(𝑥)=8𝑥+7(𝑥9)(𝑥5)+3(𝑥9), on the domain {5,8,9}.

We now need to express both terms with the same denominator. We can do this by multiplying the numerator and denominator of the second term by 𝑥5. This gives us 𝑛(𝑥)=8𝑥+7(𝑥9)(𝑥5)+3(𝑥9)×(𝑥5)(𝑥5)=8𝑥+7(𝑥9)(𝑥5)+3(𝑥5)(𝑥9)(𝑥5), on the domain {5,8,9}. We can then add the numerators: 𝑛(𝑥)=8𝑥+7+3(𝑥5)(𝑥9)(𝑥5)=8𝑥+7+3𝑥15(𝑥9)(𝑥5)=11𝑥8(𝑥9)(𝑥5), on the domain {5,8,9}.

There are no shared factors in the numerator and denominator, so we cannot simplify any further. Hence, 𝑛(𝑥)=11𝑥8(𝑥9)(𝑥5) and the domain is {5,8,9}.

In our final example, we will use the domain of a sum of rational functions and a given output of the function to determine the values of two unknowns in the function.

Example 5: Finding Unknowns in a Function given Its Domain

Given that the domain of the function 𝑛(𝑥)=𝑏𝑥+6𝑥+𝑎 is {4,0} and 𝑛(1)=2, find the values of 𝑎 and 𝑏.

Answer

We start by noting that 𝑛(𝑥) is the sum of rational functions, and we recall that the domain will be the set of real numbers excluding the roots of the denominators. We can see that the roots of the denominators are 𝑥=0 and 𝑥=𝑎, so the domain of 𝑛(𝑥) is {𝑎,0}. As we are told the domain is {4,0}, for these sets to be equal, we must have 𝑎=4.

We now need to find 𝑏, which we can do by using the other piece of information given to us: 𝑛(1)=2. We may be tempted to add the rational functions together and simplify; however, it is easier to evaluate the expression at the given value. We have 𝑛(1)=𝑏(1)+6(1)+4=𝑏+2.

Since 𝑛(1)=2, we have 2=𝑏+2𝑏=0.

Therefore, 𝑎=4 and 𝑏=0.

Before we finish, let’s see one example where we need to simplify the rational function after adding the terms together. We will do this with the following function: 𝑛(𝑥)=2𝑥+11𝑥1+4𝑥1.

We first factor the denominators to get 𝑛(𝑥)=2𝑥+11𝑥1+4(𝑥1)(𝑥+1).

We can then note that the domain of 𝑛(𝑥) is {1,1}. We can rewrite each term to have the same denominator as follows: 𝑛(𝑥)=2𝑥+11𝑥1+4(𝑥1)(𝑥+1)=2𝑥+1×(𝑥1)(𝑥1)1𝑥1×(𝑥+1)(𝑥+1)+4(𝑥1)(𝑥+1)=2(𝑥1)(𝑥1)(𝑥+1)𝑥+1(𝑥1)(𝑥+1)+4(𝑥1)(𝑥+1).

We can then add these together to get 𝑛(𝑥)=2(𝑥1)(𝑥+1)+4(𝑥1)(𝑥+1)=2𝑥2𝑥1+4(𝑥1)(𝑥+1)=𝑥+1(𝑥1)(𝑥+1).

Finally, we can simplify by noting that since the domain of 𝑛(𝑥) is {1,1}, 𝑥 is never equal to 1, so 𝑥+1 is never 0. So, we can cancel out the shared factor of (𝑥+1) to get 𝑛(𝑥)=1𝑥1, on the domain {1,1}.

Let’s now finish by recapping some of the important points in this explainer.

Key Points

  • The domain of the sum or difference of rational functions is all real numbers except the roots of any of the denominators of the rational functions in the sum or difference.
  • We can simplify the sum or difference of rational functions by using the following steps:
    1. Fully factor the denominators of each rational function in the sum or difference.
    2. Find the domain of the sum or difference by excluding all the roots of these denominators.
    3. Simplify each term by canceling out shared factors over the domain.
    4. Multiply the numerators and denominators of each term in the sum or difference so that each term has a common denominator.
    5. Find the sum or difference of the terms.
    6. Simplify the rational function over its domain.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.