# Calculus/Rational functions

 ← Graphing functions Calculus Conic sections → Rational functions

Rational function is "any function which can be defined by a rational fraction, i.e. an algebraic fraction such that both the numerator and the denominator are polynomials".

Definition. A function ${\displaystyle f(x)}$ is called a rational function if and only if it can be written in the form

${\displaystyle f(x)={\frac {P(x)}{Q(x)}}}$

where ${\displaystyle P\,}$ and ${\displaystyle Q\,}$ are polynomials in ${\displaystyle x\,}$ and ${\displaystyle Q\,}$ is not the zero polynomial. The domain of a function ${\displaystyle f\,}$ is the set of all points ${\displaystyle x\,}$ for which the denominator ${\displaystyle Q(x)\,}$ is not zero.

It can be proved that sum, product, and quotient (except division by the zero polynomial which will cause the function to be undefined) of rational functions are rational functions.

Example. Define ${\displaystyle f_{1}(x)=x^{2}/x}$, ${\displaystyle f_{2}(x)=x}$, ${\displaystyle g(x)=\pi }$, and ${\displaystyle h(x)=\tan x}$.

1 Select all rational functions in the following options.

 ${\displaystyle f_{1}(x)}$ ${\displaystyle f_{2}(x)}$ ${\displaystyle g(x)}$ ${\displaystyle h(x)}$

2 Is ${\displaystyle f_{1}(x)=f_{2}(x)}$?

 yes no

3 Select all possible expressions of ${\displaystyle g(x)}$ in the form of ${\displaystyle P(x)/Q(x)}$ in which ${\displaystyle P(x),Q(x)}$ are polynomial functions.

 ${\displaystyle g(x)}$ is not rational function. Therefore, there are no possible expressions. ${\displaystyle g(x)=3\pi /3}$ ${\displaystyle g(x)=\pi /1}$ ${\displaystyle g(x)=\pi x/x}$ ${\displaystyle g(x)=0\pi /0}$ ${\displaystyle g(x)=\pi ^{2}/\pi }$

## Examples

Examples of rational functions
Rational function of degree 3: ${\displaystyle y={\frac {x^{3}-2x}{2(x^{2}-5)}}}$
Rational function of degree 2: ${\displaystyle y={\frac {x^{2}-3x-2}{x^{2}-4}}}$

The rational function ${\displaystyle f(x)={\frac {x^{3}-2x}{2(x^{2}-5)}}}$  is not defined at ${\displaystyle x^{2}=5\Leftrightarrow x=\pm {\sqrt {5}}}$ . It is asymptotic to ${\displaystyle y={\frac {x}{2}}}$ , i.e. gets closer and closer to ${\displaystyle y={\frac {x}{2}}}$ , as ${\displaystyle x}$  approaches positive or negative infinity.

The rational function ${\displaystyle f(x)={\frac {x^{2}+2}{x^{2}+1}}}$  is defined for all real numbers, but not for all complex numbers, since if ${\displaystyle x}$  were a square root of ${\displaystyle -1}$  (i.e. the imaginary unit or its negative), then formal evaluation would lead to division by zero: ${\displaystyle f(i)={\frac {i^{2}+2}{i^{2}+1}}={\frac {-1+2}{-1+1}}={\frac {1}{0}}}$ , which is undefined.

Every polynomial function ${\displaystyle f(x)=P(x)}$  is a rational function with ${\displaystyle Q(x)=1}$ . A function that cannot be written in this form, such as ${\displaystyle f(x)=\sin(x)}$ , is not a rational function. The adjective "irrational" is not generally used for functions.

## Sketch a graph of a rational function

(1)Let's sketch the graph of ${\displaystyle y={\frac {1}{x}}}$ .
First, we must avoid ${\displaystyle x=0}$  because anything can not be divided by 0. Thus x should not be 0 in the equation. Now we just plug in some values of x. The result is as follows:

${\displaystyle x=1}$  ${\displaystyle y=1}$
${\displaystyle x=2}$  ${\displaystyle y={\frac {1}{2}}}$
${\displaystyle x=3}$  ${\displaystyle y={\frac {1}{3}}}$
${\displaystyle x=-3}$  ${\displaystyle y=-{\frac {1}{3}}}$
${\displaystyle x=-2}$  ${\displaystyle y=-{\frac {1}{2}}}$
${\displaystyle x=-1}$  ${\displaystyle y=-1}$

As x get large the function itself gets smaller and smaller. Here is the graph of ${\displaystyle {\frac {1}{x}}}$ .

## References

 ← Graphing functions Calculus Conic sections → Rational functions