# More Graphing

In Curve Sketching we provided a graph of the function $$f(x)=x(x-2)^{3}$$ using the information we were able to find from the function and its first and second derivatives. In this post, we will again look at plotting a function by hand. However, since we now know L’Hopital’s rule, we will look at a function where we will need to find asymptotes by finding limit.

## Graphing example

We will be graphing the function
\begin{align*}
f(x)=\frac{x^{2}-9}{x^{2}-2x-3}.
\end{align*}

As we did before, we will focus on the function, then the derivative, then the second derivative. Afterwards, we will combine this information to get our graph.

### Function

While looking at the function, we want to find the domain of the function and any vertical asymptotes, and $$x$$ or $$y$$-intercepts, and any horizontal asymptotes.

#### Domain

To begin with, we note that the function is a rational function, so the domain will be all $$x$$s where the bottom is not $$0$$. We then find that the bottom is $$0$$ if
\begin{align*}
x^{2}-2x-3&=0 \\
(x-3)(x+1)&=0 \\
x&=3,-1.
\end{align*}
Hence, the domain is all $$x$$ where $$x \neq -1$$ or $$3$$.

#### Vertical Asymptotes or Hole

Since these points are not in the domain, these are the potential vertical asymptotes. We, therefore, need to check thse by finding the limit as we approach these points. If we find
\begin{align*}
\lim_{x \to -1}f(x)=\lim_{x \to -1}\frac{x^{2}-9}{x^{2}-2x-3},
\end{align*}
we start by evaluating the inside function at $$x=-1$$. If we do this, we get that $$f(-1)=\frac{-8}{0}$$. Note that since we have a non-zero number over zero, we have seen that we will indeed have a vertical asymptote at $$x=-1$$.

If we now find
\begin{align*}
\lim_{x \to 3}\frac{x^{2}-9}{x^{2}-2x-3}
\end{align*}
we begin by evaluating the function at $$x=3$$. Here we get $$f(3)=\frac{0}{0}$$. Since we get $$\frac{0}{0}$$, we know that, as a limit, this is an indeterminate form. Furthermore, we can use L’Hopital’s rule to find the limit. Taking the derivative of the top over the derivative of the bottom, we get
\begin{align*}
\lim_{x \to 3}\frac{x^{2}-9}{x^{2}-2x-3}&=\lim_{x \to 3}\frac{2x}{2x-2}.
\end{align*}
If we then evaluate this new limit, we again substitute $$3$$ in for $$x$$ and get $$\frac{6}{4}=\frac{3}{2}$$. Since this is a number, we find
\begin{align*}
\lim_{x \to 3}\frac{x^{2}-9}{x^{2}-2x-3}&=\lim_{x \to 3}\frac{2x}{2x-2}\\
&=\frac{3}{2}.
\end{align*}
Since the limit exists, we will not have a vertical asymptote here. Instead we will have a hole discontinuity, so we will want to plot a hole when giving the graph of this function.

#### Intercepts

In order to find the $$y$$-intercepts, we simply let $$x=0$$ and find $$y$$. We then get $$f(0)=\frac{-9}{-3}=3$$, so the $$y$$-intercept is $$y=3$$.

As we find the $$x$$-intercepts, we want the function to be $$0$$. We then find
\begin{align*}
0&=\frac{x^{2}-9}{x^{2}-2x-3} \\
0(x^{2}-2x-3)&=x^{2}-9 \text{ if } x^{2}-2x-3 \neq 0 \\
0&=x^{2}-9 \text{ if } x \neq -1,3 \\
0&=(x-3)(x+3) \text{ if } x \neq -1, 3 \\
x&=\pm 3 \text{ if } x \neq -1,3 \\
x&=-3.
\end{align*}
Note that at $$x=3$$ we had a hole, so this would not be an intercept, so this point is excluded from possible intercepts. Hence, the only $$x$$-intercept is at $$x=-3$$.

#### Horizontal Asymptotes

In order to find the horizontal asymptotes we need to find the limit as $$x$$ goes to positive or negative $$\infty$$. That is,
\begin{align*}
\lim_{x \to \infty}\frac{x^{2}-9}{x^{2}-2x-3}
\end{align*}
As we try to find this, we see what happens to top and bottom as $$x \to \infty$$. IN this case the top goes to $$\infty^{2}-9=\infty$$ and the bottom goes to $$\infty^{2}-\infty-3$$. While the bottom is a little more difficult to deal with since we do have $$\infty-\infty$$, we note that the $$x^{2}$$ will grow much faster than the $$2x$$, so the bottom will tend towards $$\infty$$. Therefore, we have $$\frac{\infty}{\infty}$$. We can now use L’Hopital’s rule to see
\begin{align*}
\lim_{x \to \infty}\frac{x^{2}-9}{x^{2}-2x-3} &=\lim_{x \to \infty}\frac{2x}{2x-2}.
\end{align*}
Here, we have a new limit to evaluate. If we look at what happens as $$x \to \infty$$, we again get $$\frac{\infty}{\infty}$$, so we can use L’Hopital’s rule again. We now get
\begin{align*}
\lim_{x \to \infty}\frac{x^{2}-9}{x^{2}-2x-3} &=\lim_{x \to \infty}\frac{2x}{2x-2} \\
&=\lim_{x \to \infty}\frac{2}{2}=1.
\end{align*}
Hence, we will have a horizontal asymptote at $$y=1$$.

We will also need to find the $$\lim\limits_{x \to -\infty}f(x)$$ to see if we have any horizontal asymptotes in that direction. However, the work will look very similar to that above, so we will skip that here and just note that we will again get an asymptote at $$y=1$$.

### First Derivative

Now, we need to find the derivative so that we can determine where the function is increasing, decreasing, or has a horizontal tangent line. In order to do this, we will need to find derivative. Instead of doing this here, I will refer you back to the Derivative Examples to see how to take the derivative. If we do this, we will arrive at
\begin{align*}
f'(x)=\frac{-2(x-3)}{(x+1)^{2}(x-3)}.
\end{align*}
We now need to find where this is $$0$$ or undefined. Note that this will be undefined if the bottom is $$0$$, that is, if $$(x+1)^{2}(x+3)=0$$. This will occur when $$x=-1,-3$$. On the other hand, it will be $$0$$ if
\begin{align*}
0&=\frac{-2(x-3)}{(x+1)^{2}(x-3)} \\
0&=-2(x+3) \text{ if } x \neq -3.
\end{align*}
Since $$0 =-2(x-3)$$ at $$x=3$$, but this the derivative is undefined here, there are no points where the derivative is $$0$$.

We now make a number line for the derivative where the line will be partitioned at the points $$x=-1$$ and $$3$$. In order to complete the number line, we will need to find the derivative at points in each of the intervals. Here, we will find that $$f'(-2)=-2$$, $$f'(0)=-2$$, and $$f'(4)=\frac{-2}{25}$$ we will get the following number line for $$f’$$. Therefore, the function is decreasing on the interval $$(-\infty,-1) \cup (-1,3) \cup (3,\infty)$$.

### Second Derivative

We now need to take the derivative of the derivative so that we get the second derivative. Again, I will let you work through this one on your own, but we will get that
\begin{align*}
f”(x)=\frac{4(x-3)}{(x+1)^{3}(x-3)}
\end{align*}

If we follow along with the process for the first derivative, we will again see that the second derivative is undefined when the bottom is $$0$$, which is at $$x=-1,3$$. Furthermore, it will also never be $$0$$. In order to make our number line for the second derivative, we will have partition numbers at $$-1$$ and $$3$$. We then find the second derivative at points in each interval to finish the line. Here we see that $$f”(-2)=-4$$, $$f”(0)=4$$ and $$f”(4)=\frac{4}{125}$$. We then get the following number line. We now see that our function will be concave down on $$(-\infty,-1)$$ and concave up on $$(-1,3) \cup (3,\infty)$$.

### Combing the shapes

Now that we have the number lines for the first two derivatives, we can combine these into a shape number line. As such, we partition our new line whenever there was a partition of either line. Therefore, we will partition the line at $$x=-3$$ and $$-1$$. Now, on the interval $$(-\infty,-3)$$ we will be concave down decreasing, on $$(-3,-1)$$ we will be concave down and decreasing and on $$(-1,\infty)$$ we will be concave up decreasing. We will draw this on the number line below. ### Graphing

Now that we know our shape, we just need to plot any points of interest we had. Since we found that $$f(0)=3$$ and $$f(-3)=0$$ were the intercepts, we will put these points on our graph. Next we plot in our asymptotes. Since we had a vertical asymptote at $$x=-1$$, we draw in a dotted line for $$x=-1$$. Furthermore, we saw that we had a horizontal asymptote at $$y=1$$, so we draw in a dotted line at $$y=1$$. We also saw that we had a hole at $$(3,\frac{3}{2})$$, so we will also plot this in as an open circle. All that’s left now is to play connect the dots with the given shapes. In this way, we arrive at the following graph. ## Conclusion

Here we were able to take a rather complicated function that had asymptotes, holes, and more in it and make a very good pictorial representation of the graph without using a calculator. Even though there were a lot of steps involved, we have worked on all of these steps before. As such, we have a nice exposition of all the work we’ve done with derivatives and what each of these things says about a function.

As always, I hope you learned something and enjoyed the process. If you did, make sure to like the post and subscribe to us on YouTube.

This site uses Akismet to reduce spam. Learn how your comment data is processed.