Chapter 6.4 Shape and Change
Sketching and Optimization with First Order Information
The mean value theorem connects the local and global behavior of a differentiable function.
It is one of the most important theorems in our subject.
The statement below is a consequence of the mean value theorem that connects information about the sign of the derivative of a function in an interval to the way the function changes in the interval.
Derivative Sign and Increasing and Decreasing
For any interval \([a,b]\) and any function \(f\) that is differentiable on \((a,b)\) and continuous on \([a,b]\), if \(f^\prime(z)\) is positive (negative) for any \(z\) in \((a,b)\), then \(f\) is strictly increasing (decreasing) on \([a,b]\).
Here is why it is true:
Take \(I\) to be either \((a,b)\) or \([a,b]\) and adjust assumptions accordingly.
For any \(x\) and \(y\) in \(I\), if \(y\) is greater than \(x\) and \(f^\prime\) is positive on \(I\), then the mean value theorem implies that there is a \(c\) in \((x,y)\) so that \[f(y) - f(x) = f^\prime(c)(y-x) > 0\quad \text{and so}\quad f(y) > f(x).\]
The inequalities will be reversed if \(f^\prime\) is negative on \(I\).
Example 1
For each function \(f\) given below, compute the derivative of \(f\) to show that \(f\) is decreasing on the given interval \(I\):
- \(f(x) = \frac{1}{x}\) and \(I = (0, \infty)\);
- \(f(x) = x^4 - 4x^3 +4x^2 +5\) and \(I = [1, 2]\).
- The derivative is \(f'(x)=-\frac{1}{x^2}\). This function is always negative. Since the derivative is always negative on \((0,\infty)\), then \(f\) is decreasing on \((0,\infty)\)
- The derivative is \(f'(x)=4x^3-12x^2+8x=x(4x^2-12x+8)=x(4x-4)(x-2)\). This function is negative on \((1,2).\) Thus \(f\) is decreasing on \([1,2].\)
Example 2
The function \(f\) is differentiable on \([-6, 6]\) and \(f^\prime\) is sketched below:
- Determine all maximal intervals on which \(f\) is increasing.
- Determine all maximal intervals on which \(f\) is decreasing.
- The function is increasing where the derivative is positive; \((-5,-3)\),\((-1,1)\), \((5,6)\)
- The function is decreasing where the negative; \((-6,-5)\),\((-3,-1)\), \((1,5)\)
First Derivative Test
First Derivative Test For any differentiable function \(f\) on \([a,b]\), and for any \(x_0\) in \((a,b)\) with \(f^\prime(x_0) = 0\),
- if \(f^\prime\) is positive on \((a, x_0)\) and negative on \((x_0, b)\), then \(f\) has a local maximum at \(x_0\);
- if \(f^\prime\) is negative on \((a, x_0)\) and positive on \((x_0, b)\), then \(f\) has a local minimum at \(x_0\).
Here is why it is true:
Since \(f\) is strictly increasing on \([a, x_0]\) and strictly decreasing on \([x_0, b]\), \(f(x_0)\) is maximal.
Since \(f\) is strictly decreasing on \([a, x_0]\) and strictly increasing on \([x_0, b]\), \(f(x_0)\) is minimal.
Example 3
Take \(f\) to be a differentiable function on \([-4, 8]\). Given this sketch of \(f^\prime\) below, find and classify all extremal points of \(f\) in \((-4, 8)\).
For local max look at where \(f'\) changes from positive to negative; \(x=-2\) ,\(x=2.\) For local min look at where \(f'\) changes from negative to positive: \(x=0\), \(x=6.\)
Example 4
For each function \(f\) with \(f^\prime(x)\) given below, determine all points in \(\mathbb R\) where \(f\) has a local maximum or minimum:
- \(f^\prime(x) = (x+3)(x+2)^2(x-1)(x-4)^3\);
- \(f^\prime(x) = |x-1| -2\).
- Graph the function. To find the local min, determine where \(f'\) changes from negative to positive. This happens at \(x=-3,x=4\). To find local max, determine where \(f'\) changes from positive to negative. This happens at \(x=1\).
- Graph the function. To find the local min, determine where \(f'\) changes from negative to positive. This happens at \(x=3\). To find local max, determine where \(f'\) changes from positive to negative. This happens at \(x=-1\).
Example 5
Find and classify all extremal points for each function \(f\) given below on the given intervals:
\(f(x)=\left(x+3\right)\left(x-2\right)\left(x+4\right)\), on \([-5,3]\);
\(f(x) = x{\rm e}^{-x^2}\), on \(\mathbb R\);
\(f(x) = \frac{x^{2}}{4x+3}\), on \([-5,5]\).
- Take the derivative of \(f\). The derivative is \(f'(x)=(x-2)(x+4)+(x+3)(x+4)+(x+3)(x-2)\) or \(f'(x)=3x^2+10x-2\). Rewrite the derivative: \(f'(x)=3(x+\tfrac{5}{3})^2-\tfrac{31}{3}.\) The derivative is a quadratic function that opens up with vertex at \((-\tfrac{5}{3},-\tfrac{31}{3})\), and \(x\)-intercepts at \((\tfrac{\sqrt{31}}{3}-\tfrac{5}{3},0)\) and \((-\tfrac{\sqrt{31}}{3}-\tfrac{5}{3},0).\) Since the derivative of the function changes from positive to negative at \(x=-\tfrac{\sqrt{31}}{3}-\tfrac{5}{3}\), this is where the local max is at. Since the derivative of the function changes from negative to positive at \(x=\tfrac{\sqrt{31}}{3}-\tfrac{5}{3}\), this is where the local min is at. To find the global extremal, determine which of the following is the largest and smallest y-value \[f(-5)=-14,\quad f\left(-\tfrac{\sqrt{31}}{3}-\tfrac{5}{3}\right)\approx1.3778,\quad f\left(\tfrac{\sqrt{31}}{3}-\tfrac{5}{3}\right)\approx-24.1926,\quad f(3)=42.\] The global minimum is at \(\tfrac{\sqrt{31}}{3}-\tfrac{5}{3}\) and the global maximum is at \(x=3\) on \([-5,3]\).
- Take the derivative of \(f\). The derivative \(f'(x)=e^{-x^2}-2x^2e^{-x^2}\) or \(f'(x)=(1-2x^2)e^{-x^2}\). The derivative is zero at \(x=\pm\tfrac{1}{\sqrt{2}}\). Since the derivative of the function changes from positive to negative at \(x=\frac{1}{\sqrt{2}}\), this is where the local max is at. Since the derivative of the function changes from negative to positive at \(x=-\frac{1}{\sqrt{2}}\), this is where the local min is at. This is also where the function will have a global minimum. Since the derivative of the function changes from positive to negative at \(x=\frac{1}{\sqrt{2}}\), this is where the local max is at. This is also where the function will have a global maximum.
- The derivative is \(f'(x)=\frac{2x\cdot(4x+3)-4x^2}{(4x+3)^2}=\frac{4x^2+6x}{(4x+3)^2.}\) The derivative is undefined at \(x=-\tfrac{3}{4}\) and the derivative is zero when the numerator \(4x^2+6x\) is zero, which is when \(x=0\) or \(x=-\tfrac{3}{2}\). The derivative changes from negative to positive at \(x=0\), so the local min occurs there. The derivative goes from positive to negative at \(x=-\frac{3}{2}\), so the local max occurs there.
Functions describe the measurable quantities associated to an experiment.
To optimize a measurable quantity means to find the local extrema of the function that models the measurable quantity.
Example 6
Cut small congruent squares from the corners of a 12 inch by 12 inch sheet of cardboard paper and bend up the sides to create a box. Determine the size of the squares cut from the corners so that the box holds as much as possible.
Take \(V\) be the volume of the box. The formula for the volume is \(V=\ell\cdot w\cdot h.\)
Take \(x\) be the amount cut from the box.
The formula for volume is \(V(x)=(12-2x)(12-x)x\) or \(V(x)=4x^3-48x^2+144x\). To maximize \(V\), find the derivative: \(V'(x)=12x^2-96x+144.\)
Find where the \(V'=0\) to identify possible the maximum. The derivative is zero at \(x=6\) and \(x=2\). So the function may have a max at \(2\) or \(6\).
Calculate \(V\) at each of these values to conclude that \(V(2)=128\) is the largest \(y\)-value. This is the maximum volume, so cut \(x=2\) inches from each corner.
The Second Derivative
To obtain more information about a function, we need to discuss the second derivative.
Twice Differentiable
For any function \(f\) that is defined on an interval \(I\), if \(f\) is differentiable on \(I\) then the function \(f^\prime\) is also a function on \(I\).
If \(f^\prime\) is itself differentiable at a point \(x_0\) in \(I\), then \(f\) is twice differentiable at \(x_0\).
If \(f^\prime\) is differentiable on \(I\), then \(f\) is twice differentiable on \(I\).
Denote by \(f^{\prime\prime}\) the function \((f^\prime)^\prime\) or, using Leibniz notation, write \[\frac{{\rm d}^2f}{{{\rm d}x}^2}(x) := \frac{{\rm d}}{{{\rm d}x}}\frac{{\rm d}f}{{{\rm d}x}}(x) = f^{\prime\prime}(x).\]
Example 7
For each function \(f\) that is given below, determine \(f^{\prime\prime}(x)\):
- \(f(x) = x^4-5x^3+x^2+7x-2\);
- \(f(x) = \frac{1}{x}\);
- \(f(x) = x{\rm e}^{x}\);
- \(f(x) = \sin(x^2)\).
- The derivative is \(f'(x)=4x^3 -15x^2+2x+7\) so \(f''(x)=12x^2-30x+2\).
- The derivative is \(f'(x)=-\frac{1}{x^2}\) so \(f''(x)=\frac{2}{x^3}\) .
- The derivative is \(f'(x)=e^x +xe^x\) so \(f''(x)=e^x+e^x+xe^x.\)
- The derivative is \(f'(x)=2x\cos(x^2)\) so \(f''(x)=2\cos(x^2)-4x^2\sin(x^2)\)
If a function is twice differentiable, then the function \(f^{\prime\prime}\) is the derivative of the function \(f^\prime\), and so \(f^{\prime\prime}\) reveals information about \(f^\prime\) just as \(f^\prime\) reveals information about \(f\).
In this way, the function \(f^{\prime\prime}\) gives more information about \(f\)—It gives information that helps to classify the shape of \(f\).
The information that \(f^{\prime\prime}\) reveals about \(f\) is called second order information as opposed to the first order information that \(f^\prime\) reveals about \(f\).
Example 8
Find all maximal intervals on which \(f^\prime\) is increasing or decreasing, where \(f(x) = x^5.\)
The first and second derivative are \(f'(x)=5x^4\) and \(f''(x)=20x^3.\) To find where \(f'\) is increasing, find out where \(f''\) is positive, which will be on \((0,\infty).\) To find where \(f'\) is decreasing, find out where \(f''\) is negative, which will be on \((-\infty,0).\)
Example 9
For each function \(f\) that is given below, \(f(t)\) is the position of a particle at time \(t\) that is moving on a horizontal line:
- \(f(t) = 3t+1\);
- \(f(t) = 10+2t-10t^2\);
For each of these functions, find all maximal intervals on which the particle is speeding up or speeding down.
The first and second derivative are \(f'(t)=3\) and \(f''(t)=0\). The first derivative describes velocity and the second derivative describes acceleration. So the particle is speeding up when the first and second derivative are the same sign and it will be speeding down when first and second derivative are opposite sign. In this case, the particle is neither speeding up nor speeding down. It is always at constant velocity.
The first and second derivative are \(f'(t)=-20t+2\) and \(f''(t)=20\). The first derivative describes velocity and the second derivative describes acceleration. So the particle is speeding up when the first and second derivative are the sign and it will be speeding down when first and second derivative are opposite sign. In this case, the particle is speeding up when \(t<\tfrac{1}{10}\) and speeding down when \(t>\tfrac{1}{10}\).
Concavity and Curve Sketching
Concave
A function is said to be convex (concave up) on an interval \(I\) if for every \(a\) and every \(b\) in \(I\), if \(L\) is the line that intersects \((a, f(a))\) and \((b, f(b))\), then for each \(x\) in \((a,b)\), \[L(x) \ge f(x).\] This is to say that \(L\) lies above \(f\) on the interval \([a,b]\).
Convex
A function is said to be concave (concave down) on an interval \(I\) if for every \(a\) and every \(b\) in \(I\), if \(L\) is the line that intersects \((a, f(a))\) and \((b, f(b))\), then for each \(x\) in \((a,b)\), \[L(x) \le f(x).\] This is to say that \(L\) lies below \(f\) on the interval \([a,b]\).
Theorem on Concavity and Second Derivatives
A function \(f\) has the property that \(f^{\prime\prime}\) is positive on an interval \(I\) “curves upwards” on \(I\) and is \(f\) is convex (concave up) on \(I\),
A function \(f\) has the property that \(f^{\prime\prime}\) is negative on an interval \(I\) “curves downwards” on \(I\) and \(f\) is concanve (concave down) on \(I\).
Inflection Point
A point \(x_0\) in the domain of a function \(f\) is an inflection point of \(f\) if there is an interval \((a,b)\) that contains \(x_0\) so that \(f^{\prime\prime}\) is defined on \((a, x_0)\cup (x_0, b)\) and either
\(f^{\prime\prime}(x)\) is negative for all \(x\) in \((a, x_0)\) and positive for all \(x\) in \((x_0, b)\) or
\(f^{\prime\prime}(x)\) is positive for all \(x\) in \((a, x_0)\) and negative for all \(x\) in \((x_0, b)\).
In other words, the sign of \(f"\) changes at \(x_0\).
Example 10
For each function \(f\) that is given below, find all inflection points of \(f\) and give all maximal intervals on which \(f\) is convex or concave:
- \(f(x) = (x-5)^2\);
- \(f(x) = 5x{\rm e}^{-x^2}\);
- \(f(x) = x^{\frac{3}{5}}\).
- The first and second derivative are \(f'(x)=2(x-5)\) and \(f''(x)=2\). The second derivative is always positive, so \(f\) is convex (concave up) on \(\mathbb{R}\). It is never concave (concave down). So there are no inflection points
- The first and second derivative are \(f'(x)=5e^{-x^2}-10x^2e^{-x^2}\) and \(f''(x)=-10xe^{-x^2}-20xe^{-x^2}+20x^3e^{-x^2}=-30xe^{-x^2}+20x^3e^{-x^2}=(-30+20x^2)xe^{-x^2}.\) The second derivative is zero at \(x=0\) and \(x=\sqrt{\frac{3}{2}}\) and \(x=-\sqrt{\frac{3}{2}}\). The second derivative is positive on \(\left(-\sqrt{\tfrac{3}{2}},0\right)\) and \(\left(\sqrt{\tfrac{3}{2}},\infty\right)\), so the function is convex (concave up) on these intervals. The second derivative is negative on \(\left(-\infty,-\sqrt{\tfrac{3}{2}}\right)\) and \(\left(0,\sqrt{\tfrac{3}{2}}\right)\), so the function is convex (concave down) on these intervals. Therefore, \(x=0\) and \(x=\sqrt{\frac{3}{2}}\) and \(x=-\sqrt{\frac{3}{2}}\) are inflection points.
Example 11
Determine which of these points that are marked on this sketch of the function \(f\) appear to be inflection points of \(f\):
Inflection point is where concavity changes. This occurs at \(x=-5\), \(x=-3\), \(x=1\), \(x=2\), \(x=4\), \(x=6.\)
Graphical representation of a function is important for capturing and encoding certain useful information about a function in a form that is easily accessible by the human mind and human perception. Precision is not necessarily important.
The level of precision that should be captured in the sketch of a function depends on the intended use of the sketch.
Example 12
Sketch an example of a continuous function \(f\) that has the property that \(f^{\prime\prime}\) is negative on \((-\infty, -1)\cup(3, \infty)\), \(f^{\prime\prime}\) is positive on \((-1, 3)\), the zero set of \(f^{\prime\prime}\) is \(\{-1,3\}\), \(f^\prime\) is positive on \((-\infty, 4)\), and \(f^\prime\) is negative on \((4, \infty)\).
Negative second derivative means that \(f\) is concave (concave down) on \((-\infty,-1)\cup(3,\infty)\) while \(f\) is convex (concave up) on \((-1,3)\) since the second derivative is positive. The second derivative has zeros at \(-1\) and \(3\) and the sign changes, so the function has inflection points at \(-1\) and \(3\). The first derivative is positive on \((-\infty,4)\) which means \(f\) is increasing on that interval while decreasing on \((4,\infty)\) since \(f'\) is negative. Here is an example of a function that satisfies these requirements.
Sketch the function by finding where \(f\) is increasing, decreasing, convex (concave up), concave (concave down), and where \(f\) has a local max, local min, and inflection points. \[f(x) = x(x+1)(x-2)\]
The first and second derivative are \(f'(x)=3x^2-2x-2=3 (x - \tfrac{1}{3})^2 - \tfrac{7}{3}\) and \(f''(x)=6x-2.\) The first derivative is positive on \(\left(-\infty, -\tfrac{1}{3}-\frac{\sqrt{7}}{3}\right)\) and \(\left(-\tfrac{1}{3}+\frac{\sqrt{7}}{3},\infty\right)\) so it is increasing on these intervals.
The first derivative is negative on \(\left(-\tfrac{1}{3} -\frac{\sqrt{7}}{3},\tfrac{1}{3} + \frac{\sqrt{7}}{3}\right)\), so \(f\) is decreasing there.
Based on this information, the derivative goes from positive to negative at \(-\tfrac{1}{3}-\frac{\sqrt{7}}{3}\) so \(f\) has a local max there.
The derivative goes from negative to positive at \(-\tfrac{1}{3}+\frac{\sqrt{7}}{3}\) so \(f\) has a local min there.
The second derivative is negative on \((-\infty,\frac{1}{3})\) so \(f\) is concave down there while \(f\) is concave up on \((\frac{1}{3},\infty)\) since \(f''\) is positive.
There is a sign change at \(x=\frac{1}{3}\), so that is an inflection point. Here is an example of the graph.