Sub topic 1
Review: polynomials and factoring
Prerequisites
This chapter assumes you can add, subtract, and multiply polynomials. You should be able to factor a common monomial, a difference of squares, and a trinomial such as x^2 - 5x + 6. You should also know how to solve linear and quadratic equations.
What a rational expression is and which values are excluded
A rational expression is a ratio of two polynomials, P(x)/Q(x), where Q(x) is not the zero polynomial. The expression is undefined wherever Q(x) = 0, because division by zero is not allowed. These values are the excluded values.
For (x^2 - 9)/(x^2 - 5x + 6), factor the denominator: (x - 2)(x - 3). The excluded values are x = 2 and x = 3.
Simplifying by factoring and cancelling
Factor the numerator and denominator, then cancel common factors:
(x^2 - 9)/(x^2 - 5x + 6) = (x - 3)(x + 3)/((x - 2)(x - 3)) = (x + 3)/(x - 2), for x not equal to 2 or 3.
from sympy import symbols, cancel, factor
x = symbols('x')
print(factor(x**2 - 9)) # (x - 3)*(x + 3)
print(cancel((x**2 - 9) / (x**2 - 5*x + 6))) # (x + 3)/(x - 2)Multiplying and dividing rational expressions
To multiply, factor every numerator and denominator, cancel common factors, then multiply what remains. To divide, multiply by the reciprocal of the divisor.
(x^2 - 9)/(x + 1) * (x + 1)/(x - 3) = (x + 3), for x not equal to -1 or 3.
Adding and subtracting with a least common denominator
Factor each denominator. The least common denominator (LCD) uses each distinct factor at its highest power. Rewrite each fraction over the LCD, then combine the numerators.
1/(x - 1) + 1/(x + 1) = ((x + 1) + (x - 1))/((x - 1)(x + 1)) = 2x/(x^2 - 1).
from sympy import symbols, cancel
x = symbols('x')
print(cancel(1/(x - 1) + 1/(x + 1))) # 2*x/(x**2 - 1)Exercise
Simplify (x^2 - 4)/(x^2 - x - 6) and state its excluded values.
Show answer
Factor to get (x - 2)(x + 2)/((x - 3)(x + 2)). Cancel x + 2 to get (x - 2)/(x - 3). The excluded values are x = 3 and x = -2, and x = -2 stays excluded even after cancelling.