How to understand rational functions?

I know that if we divide a number by a tiny decimal we get a very large number, and that we can't have zeroes in a fraction or in the denominator, so that the asymptotes defines the functions limits regarding this? But I have a hard time understanding why a rational function looks like it does. The graphs are going in all directions, how can anyone see the connections here? Like in this example.

• It will have asymptotes where the denominator vanishes. – Angina Seng Mar 5 '18 at 8:44
• Thank you. Yes, I can see this, but if you look at my example where I have found the three x if the function equals 2x+4. The line goes through (excuse me my Norwegian/English math) one zero point, one bottom point and 0.5. And in different "quadrants"(are there six?). I don't understand this at all. How can the graph be all connected and come in from all directions.. Maybe the wrong question to ask, I appreciate any help – ReducedGosling Mar 5 '18 at 8:49
• The graph goes crazy at only two places. One near x = -1 and another near x = 1. Everywhere else does the graph look normal to you ? – AgentS Mar 5 '18 at 8:54

$$f(x) = \frac{x^2-4}{x^2-1}$$

Let's do some calculation on this function with tools that you know from school. First of all the function can be written as: $$f(x) = \frac{(x+2)(x-2)}{(x+1)(x-1)}=:\frac{E(x)}{D(x)}.$$ Here I simply used the third binomial theorem $(a+b)(a-b) = a² +b²$. The notation with $E$ for enumerator and $D$ for denominator are simply for easier writing.

Domain:
The domain of this function is given by $ℝ\setminus\{-1,1\}$. These two points are the roots of $D$, and additionally it is $E(\pm1)\neq0$.

Points that fulfil this condition ($D(x_0)=0, E(x_0)\neq0$) are called poles. And since the English wikipedia article is pretty bad, here is the general definition:

Let $g=\frac{A(x)}{B(x)}$. Let $x_0$ be a root of $B$ of order² $k$. Then

• If $A(x_0)\neq0$, then $x_0$ is a pole of order $k$.
• If $x_0$ is also a root of $A$ - with order $j$, then:
• $j<k$ ⇒ $x_0$ is pole of order $k-j$.
• $j≥k$ ⇒ $x_0$ is a discontinuity¹.

¹I am not sure if that is the correct English term. Basically it means, that the function will not tend to infinity, and is simply not defined at that point. E.g. take the function $f(x) = \frac{\sqrt{x}-1}{x-1}$ on $ℝ_{≥0}\setminus\{1\}$. As you can see here, this function does not tend to $\pm ∞$ at $x_0=1$.
²Root of order $k$ means, that you can write $B(x) = (x-x_0)^kR(x)$ with remainder $R$.

In our example we have the case that $x_0=\pm1$ are poles of order $1$. So you already know that $f$ must tend to $∞$ or $-∞$ for $x→\pm1$.

Roots:
The roots are defined by $f(x)=0$. Since $E(\pm2)=0$ and $D(\pm2)\neq0$ we already found our roots with $\pm2$.

Intersection with y-axis:
This is pretty simple: $$y_0= f(0) = \frac{0-4}{0-1} = 4.$$

At this point we already have a pretty good understanding of the functions. But what is still missing is the asymptotic behaviour at $x→\pm∞$ and at the poles.

Asymptotes (horizontal):

We can rewrite $f$ to: $$f(x) = \frac{x^2-4}{x^2-1} = \frac{1-\frac{4}{x^2}}{1-\frac{1}{x^2}}$$

Hence we get: \begin{align*} f(x) &→ \frac{1-0}{1-0}=1, \qquad x→∞ \\ f(x) &→ \frac{1-0}{1-0}=1, \qquad x→-∞ \end{align*} Which means, the horizontal asymptotes are at $y=1$ for both $x→∞$ and $x→-∞$.

Asymptotes (vertical/poles):
We know that the roots are $\pm2$ and the poles are at $\pm1$. Also we know that $f(0)=4>0$. Therefore $f$ can't pass the x-axis in the interval $(-1,0]$ and $[0,1]$. It follows: \begin{align*} f(x) &→ ∞, \qquad x→-1,\qquad \text{ with }x>-1 \\ f(x) &→ ∞, \qquad x→1,\qquad \text{ with } x<1 \end{align*} If you have trouble following this argument, then have a look at the graph of your function. Assume that $f(x) → -∞$ at $x=-1$ coming from the right. Now if you move from $4=f(0)$ to $x-1$ you would need to cross the x-axis to reach $-∞$. And that is not possible - as the argument above tells you.

This is the behaviour of $f$ at the pole $x=-1$ "coming from the right", and at $x=1$ "coming from the left.

The same works for the other side of the poles. We know, that $f(x)>0$ for $x<-2$, as $x=-2$ is a root, and $f(x)→0$ for $x→-∞$, and there are no other roots in $(-∞,-2)$. As $x=-2$ is a simple root (=root of order 1) we know that the sign of $f$ will change. [At multiple roots, e.g. $x=0$ of $g(x)=x^2$, the graph might "bounce" off of the x-axis.] Therefore, it follows that $f(x)<0$ in $(-2,-1)$. And since there are no additional roots in $(-2,-1)$ we follow: \begin{align*} f(x) &→ -∞, \qquad x→-1,\qquad \text{ with }x<-1 \\ \end{align*}

Using the same argument for the positive pole we get: \begin{align*} f(x) &→ -∞, \qquad x→1,\qquad \text{ with }x>1 \\ \end{align*}

Conclusion:
At this point we have all necessary information to draw the behaviour of this function:

1. $f(0)=4$
2. Roots at $-2$ and $2$.
3. Poles at $-1$ of "type $-∞/∞$" and $1$ of "type $∞/-∞$.
4. $f→1$ for $x→-∞$ and $f→1$ for $x→∞$

Note that to really draw this function exactly, you would also need to compute the derivatives, to see that e.g. $x=0$ is a local minima and not a turning point.

and that we can't have zeroes in a fraction or in the denominator

It's no problem to have zeroes in the numerator. Even the denominator can have zeroes, but the function won't be defined there; i.e. if the denominator becomes zero, the fraction becomes meaningless (you can't divide by $0$...!).

To understand how the function behaves, I think it might help to see how the numerator and denominator behave, separately. Since these are both polynomials, their behavior is simpler and easier to understand.

If you then fix a certain point on the $x$-axis, you can look at the values of the numerator and denominator and consider that the actual rational function will be the quotient of these values. The behavior of the rational function then follows from how fractions work:

• if the numerator has a zero and the denominator doesn't, the fraction is $0$ so the function will pass through the $x$-axis;
• if the denominator tends to zero (becomes smaller and smaller in magnitude) and the numerator doesn't, then the fraction becomes arbitrarily large (in magnitude);
• if the numerator and denominator have the same sign (both positive or both negative), the function will be positive; it will be negative when the numerator and denominator have different signs;
• ...

With the graphing software you used to plot the rational function, plot the functions $x^2-4$, $x^2-1$ and $\tfrac{x^2-4}{x^2-1}$ and experiment a bit: you combine the (simple) behavior of two polynomials with how fractions work.

In this answer I will use "large" and "small" to mean "far away from $0$" and "close to $0$" respectively. This is not the standard meaning of those words (especially not for negative numbers), but it will suit my answer very well, and therefore I will use it like that this time.

Along the left side of the left asymptote, you're dividing a negative number which is not very small ($x^2-4$ is negative close to the asymptote, and its value is close to $-3$) by a very small positive number ($x^2 - 1$ is positive and small close to the left side of the asymptote). The result is a very large negative number, which means that the graph of the function appears far below the $x$-axis.

On the right side of the first asymptote, on the other hand, both the numerator and the denominator of the fraction are negative, so the answer is positive. Also, the numerator is still not very small (still has a value close to $-3$) while the denominator is very small. Thus the value of the fraction will be large and positive, so the graph of the function will appear far above the $x$-axis.

For the right asymptote, you get an exact mirror image of this entire process.

Also, note that zeroes in the numerator aren't a problem at all. Your numerator has value $0$ when $x = 2$ or $x = -2$, and you can see that your graph intersects the $x$-axis at those points, so the rational function is also $0$ there. Things get interesting when both the numerator and the denominator have a $0$ for the same value of $x$, since for $x$-values close to that value the fraction will then be two small numbers divided by one another, and the exact behaviour of the function and the graph depends on whether they are about equally small, or if one of them is a lot smaller than the other.