# Graph a Rational Function

In this section, we will discuss graph a rational function.
The rational function is of the form $f(x)=\frac{p(x)}{q(x)} where q(x)\neq 0$
The denominator of a rational function is never allowed to be zero; Since the division by zero is undefined.

## Steps to graph a rational function

1) Reduce the rational function to lowest terms and check for any open holes in the graph. 2) Find x and y Intercepts of a rational function.
3) Asymptotes.
For vertical asymptote : Set the denominator equal to zero and solve.
For horizontal asymptote : If the degree of numerator and denominator are same then there is horizontal asymptote. $y=\frac{(numerator′sleadingcoefficient)}{(denominator′sleadingcoefficient)}$
Slant or oblique asymptote : It can be found by long division.

Remember the rational graph CANNOT cross the y-axis anywhere else and it CANNOT cross the x-axis at all!
4) Consider some values of x and according to that values find the values of y. Plot these points on the graph.

Examples :
For the following function, find
a) x-intercepts and y-inercepts.
b)vertical asymptotes.
c) Horizontal/slant asymptotes.
d)Holes
e) Sketch the graph of the function.
1) $f(x)=\frac{2x}{x^2-1}$
Solution : $y =\frac{2x}{x^2-1}$

For x-intercepts : Set y= 0

$0 = \frac{2x}{x^2-1}$
∴ 2x = 0 (cross multiply)
$\Rightarrow$ x = 0
So x-intercept : (0,0)
For y-intercepts : Set x= 0

$y = \frac{2(0)}{0^2-1}$
$y = \frac{0}{0^2-1}$
$y = f(x)\frac{0}{-1}$
∴ y = 0
$\Rightarrow$ y = 0
So y-intercept : (0,0)
For Vertical asymptote : Set denominator equal to zero
$x^{2}$ - 1 =0
$x^{2}$ = 1
∴ x =$\pm$ 1
So vertical asymptote : x = 1
For horizontal asymptote : The degree of numerator is 1 and the degree of denominator is 2 so the margin is 1.
∴ Horizontal asymptote : y = 0
For Hole : Factor the denominator
$x^{2}$ - 1 = (x + 1)(x - 1)
No common factor in the numerator.
∴ Hole : None 2) $f(x) =\frac{x^2+5x+6}{x^2+3x+2}$

Solution : $y =\frac{x^2+5x+6}{x^2+3x+2}$

For x-intercepts : Set y= 0

$0 = \frac{x^2+5x+6}{x^2+3x+2}$
∴ $x^{2}$+5x+6 = 0 (cross multiply)
∴ (x +3)(x+2) = 0 (factorize)
So, x = - 3, -2
So x-intercept : (-3,0) and (-2,0)
For y-intercepts : Set x= 0

$y = \frac{0^2+5(0)+6}{0^2+3(0)+2}$

$y = \frac{6}{2}$
∴ y = 3
So y-intercept : (0,3)
For Vertical asymptote : Set denominator equal to zero
$x^{2}$+3x+2 = 0
(x+2)(x+1) = 0 (after factoring)
x + 2 = 0 $\Rightarrow$ x = -2
x + 1 = 0 $\Rightarrow$ x = -1
So vertical asymptote : x = -2,-1
For horizontal asymptote : The degree of numerator and the degree of denominator are same so the horizontal asymptote y = 1/1
∴ Horizontal asymptote : y = 1
For Hole : Factor the denominator numerator and denominator
$y =\frac{(x+3)(x+2)}{(x+2)(x+1)}$

common factor in the numerator and denominator is (x + 2)
∴ Hole : x = -2