# Graphing Rational Functions

### {{ 'ml-heading-theory' | message }}

A rational function is a function that contains a rational expression. That is, any function that can be written in the form $f(x) = \dfrac{p(x)}{q(x)},$ where $p$ and $q$ are polynomial functions. For any values of $x$ where $q(x) = 0,$ the rational function is undefined. One example of a simple rational function is

$f(x) = \dfrac{1}{x}.$## Rational Functions and Asymptotes

An asymptote of a function is a line that the function's graph approaches as the distance to the origin approaches infinity. It is very common for rational functions to have at least one asymptote. These can arise when $x$ extends to the right or left infinitely, and around $x$-values making the denominator equal to zero. The rational function
$f(x) = \dfrac{1}{x}$
has two asymptotes, the $x$-axis and the $y$-axis. The shape of this function's graph is called a *hyperbola*, which means that it consists of two mirror images with bow-like appearances.

*horizontal asymptote*of $f.$ Similarly, as $x \to 0,$ the function value approaches either positive or negative infinity. This means that the $y$-axis, $x = 0,$ is a

*vertical asymptote*of $f.$

## Simple Rational Function

Rational functions of the form $f(x) = \dfrac{a}{x - h} + k$ can be called simple rational functions, as their parent function is $g(x) = \dfrac{1}{x}.$

When $x$ is equal to $h,$ the denominator becomes $0.$ Thus, these functions have a vertical asymptote at $x = h.$ As $x \to \infty$ and $x \to \text{-} \infty,$ the fraction tends toward $0.$ This gives the horizontal asymptote $y = k.$## Graphing Simple Rational Functions

## Another Form of Rational Functions

Another common form of rational functions is $f(x) = \dfrac{ax + b}{cx + d},$ where $p(x) = ax + b$ and $q(x) = cx + d$ are linear functions with different $x$-intercepts. Just like simple rational functions, these are hyperbolas and have horizontal and vertical asymptotes. The horizontal asymptote is the line $y = \dfrac{a}{c}.$ That is, the quotient of the leading coefficients of $p$ and $q.$ The vertical asymptote is the line $x = \text{-} \dfrac{d}{c},$

which is the $x$-value that makes the denominator $0.$## Exercises

*settings_overscan*

## {{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}

*keyboard_backspace*

{{ 'ml-tooltip-premium-exercise' | message }}

{{ 'ml-tooltip-recommended-exercise' | message }}

Programmeringsuppgift | {{ 'course' | message }} {{ exercise.course }}

*keyboard_backspace*{{ 'ml-btn-previous' | message }}

*keyboard_backspace*