# First Derivative Test (and Curve Sketching)

When finding the relative extrema of a function, if any, it is not enough to find a function’s critical numbers. In this article, I discuss the First Derivative Test and show how to perform curve sketching.

We discuss a fifteen point procedure for sketching a curve –including finding the domain and range, any asymptotes, and applying the first and second derivative tests. We also consider finding any vertical tangents or cusps and applying the concavity test. We illustrate this procedure with several examples and provide exercises at the end.

## Curve Sketching as a Procedure

The following steps can be used to graph many commonly used curves.

(1) If given a function, determine the domain and range.

(2) If possible algebraically simplify the function.

(3) Test for symmetry with respect to the $x$-axis, $y$-axis, and the origin.

(4) Determine any $x$-intercepts and $y$-intercepts.

(5) Determine any vertical asymptotes.

(6) Determine any horizontal asymptotes.

(7) Determine the first order critical numbers.

(8) Apply the First Derivative Test.

(9) Apply the Second Derivative Test.

(10) Determine the second order critical numbers.

(11) Apply the Concavity Test.

(12) Determine any vertical tangents.

(13) Determine any cusps.

(14) Plot Points.

(15) Sketch the curve.

## Vertical Tangents and Cusps

There are four possibilities for unbounded behavior of a derivative $f'(x)$ around a given real number $c.$

Definition. Suppose the function $f$ is continuous at the point $P(c,f(c)).$ The graph of $f$ has a vertical tangent at $P$ if one of the following holds.

$(1) \quad \displaystyle \lim_{x\to c^+}f'(x) = \lim_{x\to c^-}f'(x)=+\infty$

$(2) \quad \displaystyle \lim_{x\to c^+}f'(x) = \lim_{x\to c^-}f'(x)=-\infty$

The graph of $f$ has a cusp at $P$ if one of the following holds.

$(1) \quad \displaystyle \lim_{x\to c^+}f'(x)=+\infty$ and $\displaystyle \lim_{x\to c^-}f'(x)=-\infty$

$(2) \quad \displaystyle \lim_{x\to c^+}f'(x)=-\infty$ and $\displaystyle \lim_{x\to c^-}f'(x)=+\infty$

Example. Sketch the graph of $$f(x)=3x^{3/5}\left(5-x-4x^2\right)$$ and explain why there is a vertical tangent at $x=0.$

Solution. Using the product rule the derivative of the function $f$ is \begin{align} f'(x) & =\frac{9}{5}x^{-2/5}\left(5-x-4x^2\right)+3x^{3/5}(-1-8x) \\ & =\frac{9\left(5-x-4x^2\right)}{5x^{2/5}} + \frac{\left(5x^{2/5} \right)\left(3x^{3/5}\right)(-1-8x)}{5x^{2/5}} \\ & =\frac{9\left(5-x-4x^2\right)}{5x^{2/5}}+\frac{15x(-1-8x)}{5x^{2/5}} \\ & =\frac{45-24 x-156 x^2}{5 x^{2/5}}. \end{align} To determine any vertical tangents we consider where $f'(x)$ is undefined. Notice that at $x=0$ the derivative is undefined but $f(0)=0.$ Thus, the point $(0,0)$ is a candidate for a being a vertical tangent to the graph of $f.$ We check the following limits to determine if $(0,0)$ is a vertical tangent. Since $45-24 x-156 x^2\to 45$ and $5 x^{2/5}\to -\infty$ as $x\to 0^-,$ $$\lim_{x\to 0^-}\frac{45-24 x-156 x^2}{5 x^{2/5}}=+\infty .$$ Since $45-24 x-156 x^2\to 45$ and $5 x^{2/5}\to -\infty$ as $x\to 0^-,$ $$\lim_{x\to 0^+}\frac{45-24 x-156 x^2}{5 x^{2/5}}=+\infty.$$ Therefore the function $f$ has a vertical tangent at $(0,0)$ which can be seen from the sketch of the graph of $f.$

Example. Sketch the graph of $$f(x)=x^{2/3}\left(x^2+5x-20\right)$$ and explain why there is a cusp at $x=0.$

Solution. Using the product rule we find the derivative as \begin{align} f'(x) & = \frac{2}{3}x^{-1/3}\left(x^2+5x-20\right)+x^{2/3}(2x+5) \\ & = \frac{2\left(x^2+5x-20\right)}{3x^{1/3}}+\frac{3x^{1/3}x^{2/3}(2x+5)}{3x^{1/3}} \\ & =\frac{2x^2+10x-40}{3x^{1/3}}+\frac{3x(2x+5)}{3x^{1/3}} \\ & =\frac{2x^2+10x-40}{3x^{1/3}}+\frac{6x^2+15x}{3x^{1/3}} \\ & = \frac{8 x^2+25 x-40}{3 \sqrt[3]{x}}. \end{align} To determine any cusps we consider where $f'(x)$ is undefined. Notice that at $x=0$ the derivative is undefined but $f(0)=0.$ Thus the point $(0,0)$ is a candidate for a being a cusp for the graph of the function $f.$ We check the following limits to determine if $(0,0)$ is a cusp. Since $8x^2+25x-40\to -40$ and $3 \sqrt[3]{x}\to -\infty$ as $x\to 0^-,$ $$\lim_{x\to 0^-}\frac{8 x^2+25 x-40}{3 \sqrt[3]{x}}=+\infty .$$ Since $8x^2+25x-40\to -40$ and $3 \sqrt[3]{x}\to +\infty$ as $x\to 0^+,$ $$\lim_{x\to 0^+}\frac{8 x^2+25 x-40}{3 \sqrt[3]{x}}=-\infty .$$ Therefore the function $f$ has a cusp at $(0,0)$ which can be seen from the sketch of the graph of $f.$

Example. Determine any vertical tangents and cusps for the function $$f(x)=x^{2/3} (x – 1)^{1/3}.$$

Solution. To find the vertical tangents and cusps we check where the first derivative is undefined. The derivative of $f$ is $$f'(x)=\frac{x^{2/3}}{3 (x-1)^{2/3}}+\frac{2 \sqrt[3]{x-1}}{3 \sqrt[3]{x}}=\frac{3 x-2}{3 (x-1)^{2/3} \sqrt[3]{x}}.$$ Therefore the points $(0,0)$ and $(1,0)$ are candidates for where a vertical tangent and cusp might occur. The function $f$ has a vertical asymptote at $x=1$ since \begin{align*} \lim_{x\to 1^-} f'(x) & = \lim_{x\to 1^-} \frac{3 x-2}{3 (x-1)^{2/3} \sqrt[3]{x}} \\ & = +\infty \lim_{x\to 1^+} f'(x) \\ & = \lim_{x\to 1^+} \frac{3 x-2}{3 (x-1)^{2/3} \sqrt[3]{x}} \\ & = +\infty \end{align*} The function $f$ has a cusp at $x=0$ since \begin{align*} \lim_{x\to 0^-} f'(x) & = \lim_{x\to 0^-} \frac{3 x-2}{3 (x-1)^{2/3} \sqrt[3]{x}} \\ & = +\infty \end{align*} and \begin{align*} \lim_{x\to 0^+}f'(x) & =\lim_{x\to 0^+} \frac{3 x-2}{3 (x-1)^{2/3} \sqrt[3]{x}} \\ & = -\infty . \end{align*}

Example. Sketch the graph of the rational function $$f(x) = \frac{2x^2}{x^2-1}$$ showing all special features.

Solution. The domain of $f$ is \begin{align*} \left\{x\left| \, x^2-1\neq 0\right.\right\} & =\{x |\, x \neq \pm 1\} \\ & =(-\infty ,-1)\cup (-1,1)\cup (1,+\infty ). \end{align*} The $x$ and $y$ intercepts are both $0.$ Since $f(-x)=f(x)$ the function is even and so the curve is symmetric about the $y$-axis. Since $$\lim_{x\to \pm \infty}\frac{2x^2}{x^2-1} =\lim_{x\to \pm \infty}\frac{2}{1-\frac{1}{x^2}}=2$$ the line $y=2$ is a horizontal asymptote. Since the denominator is 0 when $x\pm 1,$ we compute the following limits: \begin{align} \lim_{x\to 1^+}\dfrac{2x^2}{x^2-1} =+\infty & & \lim_{x\to 1^-}\dfrac{2x^2}{x^2-1} =-\infty \\ \lim_{x\to -1^+}\dfrac{2x^2}{x^2-1} =-\infty & & \lim_{x\to -1^-}\dfrac{2x^2}{x^2-1} =+\infty \end{align} Therefore, the lines $x=1$ and $x=-1$ are vertical asymptotes. Next we find the derivative function. $$f'(x) = \frac{4x\left(x^2-1\right)-2x^2(2x)}{\left(x^2-1\right)^2}=\frac{-4x}{\left(x^2-1\right)^2}.$$ Since $f'(x)>0$ when $x<0$ $(x\neq -1)$ and $f'(x)<0$ when $x>0$ $(x\neq 1),$ $f$ is increasing on $(-\infty ,-1)$ and $(-1,0)$ and decreasing on $(0,1)$ and $(1,+\infty ).$ The only critical number is $x=0.$ Since $f’$ changes sign from positive to negative at $0,$ $f(0)=0$ is a local maximum by the First Derivative Test. Also, $$f”(x) =\frac{-4\left(x^2-1\right)^2+4x(2)\left(x^2-1\right)(2x)}{\left(x^2-1\right)^4}=\frac{12x^2+4}{\left(x^2-1\right)^3}$$ Since $12x^2+4>0$ for all $x,$ we have $f”(x)>0 \Longleftrightarrow x^2-1>0 \Longleftrightarrow |x|>1$ and $f”(x)<0 \Longleftrightarrow |x|<1.$ Thus the curve is concave downward on the intervals $(-\infty ,-1)$ and $(1,+\infty )$ and concave downward on $(-1,1).$ There is no point of inflection since $1$ and $-1$ are not in the domain of $f.$

Example. Sketch the graph of the trigonometric function $$f(x)=2 \cos x+\sin 2 x$$ showing all special features.

Solution. The domain of the function $f$ is $\mathbb{R}.$ The $y$-intercept is $(0,2)$ since $f(0)=2.$ The $x$-intercepts occur when $2 \cos x+\sin 2x=2 \cos x+2 \sin x \cos x=2 \cos x(1+\sin x)=0$ which is precisely when $x=\pi /2$ and $x=3\pi /2$, because we need only consider $[0,2\pi ]$ since function is periodic via, $$f(x+2\pi )=2 \cos (x+2\pi )+\sin [2(x+2\pi )]=2\cos x+\sin 2x=f(x).$$ There are no vertical asymptotes nor horizontal asymptotes. The first derivative of $f$ is, \begin{align} f'(x)& =-2 \sin x+2 \cos 2x =-2(2 \sin x-1)(\sin x+1). \end{align} Thus, $f'(x)=0$ when $\sin x=1/2$ or when $\sin x=-1,$ so in $[0,2\pi ]$ we only consider the critical numbers $x=\pi /6$, $x=5\pi /6,$ and $x=3\pi /2.$ Applying the First Derivative Test we find the following.

\begin{equation*} \begin{array}{c|c|c|l} \text{Interval} & f & f’ & \text{Conclusion} \\ \hline 0<x<\pi /6 &   & + & \text{increasing} \\  x=\pi /6 & 3\left.\sqrt{3}\right/2 & 0 & \text{relative maximum}  \\ \pi /6<x<5\pi /6 &   & – & \text{decreasing} \\ x=5\pi /6 & -3\left.\sqrt{3}\right/2 & 0 & \text{relative minimum} \\ 5\pi /6<x<3\pi /2 &   & + & \text{increasing} \\ x=3\pi /2 & 0 & 0 & \text{horizontal tangent} \\ 3\pi /2<x<2\pi  &   & + & \text{increasing} \end{array} \end{equation*}

The second derivative of $f$ is, $$f”(x)=-2\cos x-4 \sin 2x=-2 \cos x (1+4 \sin x)$$ so the second order critical numbers are $x=\pi /2,3\pi /2, \alpha _1,$ and $\alpha _2$ where $\sin \alpha _1=-\frac{1}{4}$ and $\sin \alpha _2=-\frac{1}{4}.$ Applying the Concavity Test we find,

\begin{equation*} \begin{array}{c|c|c|l} \text{Interval} & f & f” & \text{Conclusion} \\ \hline 0<x<\pi /2 &   & – & \text{concave down} \\ x=\pi /2 & 0 & 0 & \text{inflection point} \\ \pi /2<x<\alpha _1 &   & + & \text{concave up} \\  x=\alpha _1 & f\left(\alpha _1\right) & 0 & \text{inflection point} \\  \alpha _1<x<3\pi /2 &   & – & \text{concave down} \\ x=3\pi /2 & 0 & 0 & \text{inflection point} \\ 3\pi /2<x<\alpha _2 &   & + & \text{concave up} \\ x=\alpha _2 & f\left(\alpha _2\right) & 0 & \text{inflection point} \\ \alpha _2<x<2\pi  &   & – & \text{concave down} \end{array} \end{equation*} as desired.

David Smith (Dave) has a B.S. and M.S. in Mathematics and has enjoyed teaching precalculus, calculus, linear algebra, and number theory at both the junior college and university levels for over 20 years. David is the founder and CEO of Dave4Math.