Example 3.4.1. Graphing a Function Using Derivatives.
We can represent functions by graphing them. However, there is a question about which points should be plotted to understand the function. If we plot too few or in the wrong places, we will miss important details. The question about which points we need to plot is answered in part by knowing the connection between first derivative and increasing and decreasing segments and the connection between second derivative and concave up and down.
We will consider the function
\begin{equation*}
g(y)=\frac{y^2-4y}{y+2}\text{.}
\end{equation*}
First we determine where the function is defined (the domain). We know these are places where the derivatives will also be undefined, so changes can take place across these. We will also need limits approaching these values.
For a rational function undefined points will occur solely where the denominator is zero.
For this function the undefined points occur where
\begin{align*}
y+2 = \amp 0.\\
y = \amp -2.
\end{align*}
So the domain is \((-\infty,-2) \cup (-2,\infty)\text{.}\)
Second we determine where the function might change between increasing and decreasing. This occurs where the first derivative is 0 or undefined (critical values).
Calculate the first derivative.
\begin{align*}
g^\prime(y) = \amp \frac{(y+2)(2y-4)-(y^2-4y)(1)}{(y+2)^2} \\
= \amp \frac{2y^2-8-y^2+4y}{(y+2)^2}\\
= \amp \frac{y^2+4y-8}{(y+2)^2}.
\end{align*}
Because this is a rational function it is undefined where there is division by zero. This is still just \(y=-2\text{.}\) Next we determine where it is zero. Because this is a rational function that is solely where the numerator is zero. It does not factor, so we apply the quadratic formula.
\begin{align*}
y = \amp \frac{-(-4) \pm \sqrt{(-4)^2-4(1)(-8)}}{2(1)}\\
= \amp \frac{4 \pm \sqrt{48}}{2}\\
= \amp \frac{4 \pm 4\sqrt{3}}{2}\\
= \amp 2 \pm 2\sqrt{3}
\end{align*}
Third we determine where the function changes between concave up and down. This happens where the second derivative is 0 or undefined.
Calculate the second derivative.
\begin{align*}
g''(y) = \amp \frac{(y+2)^2(2y+4)-(y^2-4y-8)(2[y+2]^1 \cdot 1)}{(y+2)^4}\\
= \amp \frac{2y^3+12y^2+24y+16-(2y^3+12y^2-32)}{(y+2)^4}\\
= \amp \frac{24y+48}{(y+2)^4}\\
= \amp \frac{24(y+2)}{(y+2)^4}\\
= \amp \frac{24}{(y+2)^3}.
\end{align*}
Because this is a rational function this is undefined where there is division by zero which is still just \(y=-2\text{.}\) The second derivative never equals zero because the numerator is constant.
Now that we know where to look we can test where the function is increasing/decreasing and concave up/down by testing between the values \(y=-2, 2-2\sqrt{3}, 2+2\sqrt{3}\text{.}\) These are shown in Table 3.4.2.
For example at \(x=-1.5\) \(g^\prime(-1.5)=-47\text{.}\) Because it is negative we know the curve is decreasing on this interval. We do not need that it is \(-47\) so we record only \(-\text{.}\) \(g''(-1.5)=192\text{.}\) Because it is positive the curve is concave up on this interval.
Finally we can use this information to graph \(g(y)\text{.}\) First plot the points calculated. Next consider the interval \([-3,-2)\text{.}\) The curve is decreasing (\(g^\prime(y) \lt 0\)) concave down (\(g''(y) \lt 0\)). This looks like the top right in Figure 3.4.3. To determine whether the function has a hole or a jump at \(y=2\) we need the following limits.
\begin{align*}
\lim_{y \to -2^-} g(y) = \amp \\
\lim_{y \to -2^-} \frac{y^2-4y}{y+2} = \amp \\
\left( \lim_{y \to -2^-} y^2-4y \right) \left( \lim_{y \to -2^-} \frac{1}{y+2} \right) = \amp \\
\left( \lim_{y \to -2^-} y^2-4y \right) \left( \lim_{u \to 0^-} \frac{1}{u} \right) = \amp
\end{align*}
The left expression is continuous, so we can evaluate it. The right limit we know is \(-\infty\text{.}\) Thus this limit is negative infinity.
We move to the next interval \((-2,2-2\sqrt{3})\text{.}\) This is decreasing (\(g^\prime(y) \lt 0\)) concave up (\(g''(y) \gt 0\)). This looks like the bottom left in Figure 3.4.3. To finish determining what happens at \(y=-2\) we need the limit from the right.
\begin{align*}
\lim_{y \to -2^+} g(y) = \amp \\
\lim_{y \to -2^+} \frac{y^2-4y}{y+2} = \amp \\
\left( \lim_{y \to -2^+} y^2-4y \right) \left( \lim_{y \to -2^+} \frac{1}{y+2} \right) = \amp \\
\left( \lim_{y \to -2^+} y^2-4y \right) \left( \lim_{u \to 0^+} \frac{1}{u} \right) = \amp
\end{align*}
This limit is positive infinity. This means \(g(y)\) has an infinite jump at \(y=-2\text{.}\)
The next interval is \((-2,2+2\sqrt{3})\) which is also decreasing concave up. Even though the first derivative was zero, nothing changed here.
Moving to the next interval which is \((2+2\sqrt{3},6)\text{.}\) This is increasing (\(g^prime(y) \gt 0\)) concave up (\(g''(y) \gt 0\)). This looks like the bottom right in Figure 3.4.3.
The last two segments are \((-\infty,-3)\) and \((6,\infty)\text{.}\) To know where these go we need to following limits.
\begin{align*}
\lim_{y \to -\infty} g(y) = \amp \\
\lim_{y \to -\infty} \frac{y^2-4y}{y+2} = \amp \text{ handle } \infty/\infty\\
\lim_{y \to -\infty} \frac{\frac{1}{y}(y^2-4y)}{\frac{1}{y}(y+2)} = \amp \\
\lim_{y \to -\infty} \frac{y-4}{1+\frac{2}{y}} = \amp -\infty.\\
\lim_{y \to -\infty} g(y) = \amp \\
\lim_{y \to \infty} \frac{y^2-4y}{y+2} = \amp \text{ handle } \infty/\infty\\
\lim_{y \to \infty} \frac{\frac{1}{y}(y^2-4y)}{\frac{1}{y}(y+2)} = \amp \\
\lim_{y \to \infty} \frac{y-4}{1+\frac{2}{y}} = \amp \infty.
\end{align*}
The first limit (to the left) is for a concave down segment. The second (to the right) is concave up.
Finally this information can be used to graph.