











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
V. Graph Sketching and Max-Min Problems. The signs of the first and second derivatives of a function tell us something about the shape of its graph.
Typology: Exams
1 / 19
This page cannot be seen from the preview
Don't miss anything!












The signs of the first and second derivatives of a function tell us something about the shape of its graph. In this chapter we learn how to find that information.
The slope of the tangent the tangent to the graph of f at the point (a, f (a)) is
(29) m = f ′(a)
and hence the equation for the tangent is
(30) y = f (a) + f ′(a)(x − a).
The slope of the normal line to the graph is − 1 /m and thus one could write the equation for the normal as
(31) y = f (a) −
x − a f ′(a)
When f ′(a) = 0 the tangent is horizontal, and hence the normal is vertical. In this case the equation for the normal cannot be written as in (31), but instead one gets the simpler equation y = f (a).
Both cases are covered by this form of the equation for the normal
(32) x = a + f ′(a)(f (a) − y).
Both (32) and (31) are formulas that you shouldn’t try to remember. It is easier to remember that if the slope of the tangent is m = f ′(a), then the slope of the normal is − 1 /m.
x
y
m
m rise
/run=
m/
m
rise /run=
(^) − (^1) /m
Figure 14. Why the slope of the normal is − 1 /(the slope of the tangent).
75
You could say that a function is continuous if you can draw its graph with out taking your pencil off the paper. A more precise version is the intermediate value theorem: Theorem 31.1. If f is a continuous function on an interval a ≤ x ≤ b, and if y is some number between f (a) and f (b), then there is a number c with a ≤ c ≤ b such that f (c) = y.
Here “y between f (a) and f (b)” means that f (a) ≤ y ≤ f (b) if f (a) ≤ f (b), and f (b) ≤ y ≤ f (a) if f (b) ≤ f (a).
Example – Square root of 2
Consider the function f (x) = x^2. Since f (1) < 2 and f (2) = 4 > 2 the intermediate value theorem with a = 1, b = 2, y = 2 tells us that there is a number c between 1 and 2 such that f (c) = 2, i.e. for which c^2 = 2. So the theorem tells us that the square root of 2 exists.
Example – The equation θ + sin θ = π 2
Consider the function f (x) = x + sin x. It is a continuous function at all x, so from f (0) = 0 and f (π) = π it follows that there is a number θ between 0 and π such that f (θ) = π/2. In other words, the equation
(33) θ + sin θ =
π 2 has a solution θ with 0 ≤ θ ≤ π/2. Unlike the previous example, where we knew the solution was
2, there is no simple formula for the solution to (33).
Example – Solving 1 /x = 0
If we apply the intermediate value theorem to the function f (x) = 1/x on the interval [a, b] = [− 1 , 1], then we see that for any y between f (a) = f (−1) = −1 and f (b) = f (1) = 1 there is a number c in the interval [− 1 , 1] such that 1/c = y. For instance, we could choose y = 0 (that’s between −1 and +1), and conclude that there is some c with − 1 ≤ c ≤ 1 and 1/c = 0.
But there is no such c, because 1/c is never zero! So we have done something wrong, and the mistake we made is that we overlooked that our function f (x) = 1/x is not defined on the whole interval − 1 ≤ x ≤ 1 because it is not defined at x = 0. The moral: always check the hypotheses of a theorem before you use it!
The intermediate value theorem implies the following very useful fact. Theorem 32.1. If f is continuous function on some interval a < x < b, and if f (x) 6 = 0 for all x in this interval, then f (x) is either positive for all a < x < b or else it is negative for all a < x < b.
Proof. The theorem says that there can’t be two numbers a < x 1 < x 2 < b such that f (x 1 ) and f (x 2 ) have opposite signs. If there were two such numbers then the intermediate value theorem would imply that somewhere between x 1 and x 2 there was a c with f (c) = 0. But we are assuming that f (c) 6 = 0 whenever a < c < b.
You can summarize these definitions as follows:
f is... if for all a and b one has... Increasing: a < b =⇒ f (a) < f (b) Decreasing: a < b =⇒ f (a) > f (b) Non-increasing: a < b =⇒ f (a) ≥ f (b) Non-decreasing: a < b =⇒ f (a) ≤ f (b)
The sign of the derivaitve of f tells you if f is increasing or not. More precisely:
Theorem 33.1. If a function is non-decreasing on an interval a < x < b then f ′(x) ≥ 0 for all x in that interval.
If a function is non-increasing on an interval a < x < b then f ′(x) ≤ 0 for all x in that interval.
For instance, if f is non-decreasing, then for any given x and any positive ∆x one has f (x + ∆x) ≥ f (x) and hence
f (x + ∆x) − f (x) ∆x
now let ∆x ↘ 0 and you find that
f ′(x) = lim ∆x↘ 0
f (x + ∆x) − f (x) ∆x
What about the converse, i.e. if you know the sign of f ′^ then what can you say about f? For this we have the following
Theorem 33.2. Suppose f is a differentiable function on an interval (a, b).
If f ′(x) > 0 for all a < x < b, then f is increasing. If f ′(x) < 0 for all a < x < b, then f is decreasing.
a c b
Figure 15. According to the Mean Value Theorem there always is some number c between a and b such that the tangent to the graph of f is parallel to the line segment connecting the two points (a, f (a)) and (b, f (b)). This is true for any choice of a and b; c depends on a and b of course.
The proof is based on the Mean Value theorem which also finds use in many other situations: Theorem 33.3 (The Mean Value Theorem). If f is a differentiable function on the interval a ≤ x ≤ b, then there is some number c, with a < c < b such that
f ′(c) =
f (b) − f (a) b − a
Proof of theorem 33.2. We show that f ′(x) > 0 for all x implies that f is increasing. Let x 1 < x 2 be two numbers between a and b. Then the Mean Value Theorem implies that there is some c between x 1 and x 2 such that
f ′(c) =
f (x 2 ) − f (x 1 ) x 2 − x 1
or f (x 2 ) − f (x 1 ) = f ′(c)(x 2 − x 1 ). Since we know that f ′(c) > 0 and x 2 − x 1 > 0 it follows that f (x 2 ) − f (x 1 ) > 0, i.e. f (x 2 ) > f (x 1 ).
Armed with these theorems we can now split the graph of any function into increasing and decreasing parts simply by computing the derivative f ′(x) and finding out where f ′(x) > 0 and where f ′(x) < 0 – i.e. we apply the method form the previous section to f ′ rather than f.
34.1. Example: the parabola y = x^2
The familiar graph of f (x) = x^2 consists of two parts, one decreasing and one increasing. You can see this from the derivative which is
f ′(x) = 2x
0 for x > 0 < 0 for x < 0.
Therefore the function f (x) = x^2 is
decreasing for x < 0 increasing for x > 0.
f ′(x) < 0 f ′(x) > 0
x
Figure 16. Increasing and decreasing branches of the parabola
from which you see that f ′(x) > 0 for x < − (^13)
f ′(x) < 0 for − (^13)
3 < x < (^13)
f ′(x) > 0 for x > (^13)
Therefore the function f is increasing on
decreasing on
increasing on
3
At the two points x = ± (^13)
3 one has f ′(x) = 0 so there the tangent will be horizontal. This leads us to the following picture of the graph of f : f ′(x) > 0 f ′(x) < 0 f ′(x) > 0
x
x = (^13)
x = − 13 3
Figure 18. The graph of f (x) = x^3 − x.
34.4. A function whose tangent turns up and down infinitely often near the origin
We end with a weird example. Somewhere in the mathematician’s zoo of curious functions the following will be on exhibit. Consider the function
f (x) =
x 2
π x
For x = 0 this formula is undefined, and we are free to define f (0) = 0. This makes the function continuous at x = 0. In fact, this function is differentiable at x = 0, with derivative given by
f ′(0) = lim x→ 0
f (x) − f (0) x − 0
= lim x→ 0
π x
(To find the limit apply the sandwich theorem to −|x| ≤ x sin πx ≤ |x|.)
y = 12 x + x^2
y = 12 x − x^2
y = 12 x
y = 12 x + x^2 sin πx
Figure 19. Positive derivative at a point (x = 0) does not mean that the function is “increasing near that point.” The slopes at the intersec- tion points alternate between 12 − π and 12 + π.
So the slope of the tangent to the graph at the origin is positive ( 12 ), and one would think that the function should be increasing near x = 0 (i.e. bigger x gives bigger f (x).) The point of this example is that this turns out not to be true.
To explain why not, we must compute the derivative of this function for x 6 = 0. It is given by
f ′(x) =^1 2
− π cos π x
Now consider the sequence of intersection points P 1 , P 2 ,... of the graph with the line y = x/2. They are
Pk (xk , yk ), xk =
k
, yk = f (xk ).
For larger and larger k the points Pk tend to the origin (the x coordinate is (^1) k which goes to 0 as k → ∞). The slope of the tangent at Pk is given by
f ′(xk ) =
− π cos
π 1 /k
k
sin
π 1 /k
=
− π cos kπ +
k
sin kπ
− 12 − π ≈ − 2. 64159265358979... for k even 1 2 +^ π^ ≈^ +3.^64159265358979...^ for^ k^ odd
In other words, along the sequence of points Pk the slope of the tangent flip-flops between 1 2 −^ π^ and^
1 2 +^ π, i.e. between a positive and a negative number. In particular, the slope of the tangent at the odd intersection points is negative, and so you would expect the function to be decreasing there. In other words we see that even though the derivative at x = 0 of this function is positive, there are points on the graph arbitrarily close to the origin where the tangent has negative slope.
Since f has a local maximum at x we have f (x + ∆x) − f (x) ≤ 0 if −δ < ∆x < δ. In the first limit we also have ∆x < 0, so that
lim ∆x↗ 0
f (x + ∆x) − f (x) ∆x
Hence f ′(x) ≤ 0. In the second limit we have ∆x > 0, so
lim ∆x↘ 0
f (x + ∆x) − f (x) ∆x
which implies f ′(x) ≥ 0. Thus we have shown that f ′(x) ≤ 0 and f ′(x) ≥ 0 at the same time. This can only be true if f ′(x) = 0.
35.2. How to tell if a stationary point is a maximum, a minimum, or neither
If f ′(c) = 0 then c is a stationary point (by definition), and it might be local maximum or a local minimum. You can tell what kind of stationary point c is by looking at the signs of f ′(x) for x near c. Theorem 35.2. If in some small interval (c − δ, c + δ) you have f ′(x) < 0 for x < c and f ′(x) > 0 for x > c then f has a local maximum at x = c. If in some small interval (c − δ, c + δ) you have f ′(x) < 0 for x < c and f ′(x) > 0 for x > c then f has a local maximum at x = c.
The reason is simple: if f increases to the left of c and decreases to the right of c then it has a maximum at c. More precisely:
if f ′(x) > 0 for x between c−δ and c, then f is increasing for c−δ < x < c and therefore f (x) < f (c) for x between c − δ and c. If in addition f ′(x) < 0 for x > c then f is decreasing for x between c and c + δ, so that f (x) < f (c) for those x. Combine these two facts and you get f (x) ≤ f (c) for c − δ < x < c + δ.
35.3. Example – local maxima and minima of f (x) = x^3 − x
In §34.3 we had found that the function f (x) = x^3 − x is decreasing when −∞ < x < − (^13)
3, and also when (^13)
3 < x < ∞, while it is increasing when − (^13)
3 < x < (^13)
3, and a local maximum at x = (^13)
Neither the local maximum nor the local minimum are global max or min since
x→−∞lim f^ (x) = +∞^ and^ xlim→∞ f^ (x) =^ −∞.
35.4. A stationary point that is neither a maximum nor a minimum
If you look for stationary points of the function f (x) = x^3 you find that there’s only one, namely x = 0. The derivative f ′(x) = 3x^2 does not change sign at x = 0, so the test in Theorem 35.2 does not tell us anything. And in fact, x = 0 is neither a local maxi- mum nor a local minimum since f (x) < f (0) for x < 0 and f (x) > 0 for x > 0.
y = x^3
Theorem 35.1 is very useful since it tells you how to find (local) maxima and minima. The following theorem is also useful, but in a different way. It doesn’t say how to find maxima or minima, but it tells you that they do exist, and hence that you are not wasting your time trying to find a maximum or minimum. Theorem 36.1. Let f be continuous function defined on the closed interval a ≤ x ≤ b. Then f attains its maximum and also its minimum somewhere in this interval. In other words there exist real numbers c and d such that f (c) ≤ f (x) ≤ f (d)
whenever a ≤ x ≤ b.
The proof of this theorem requires a more careful definition of the real numbers than we have given in Chapter 1, and we will take the theorem for granted.
In the following three example we explore what can happen if some of the hypotheses in Theorem 36.1 are not met.
Question: Does the function
f (x) =
x for 0 ≤ x < 1 0 for x = 1.
have a maximum on the interval 0 ≤ x ≤ 1?
min^ f^ (1) = 0
max?
Figure 21. A function without a maximum
Answer: No. What would the maximal value be? Since lim x↗ 1
f (x) = lim x↗ 1
x = 1
The maximal value cannot be less than 1. On the other hand the function is never larger than 1. So if there were a number a in the interval [0, 1] such that f (a) was the maximal value of f , then we would have f (a) = 1. If you now search the interval for numbers a with f (a) = 1, then you notice that such an a does not exist. Conclusion: this function does not attain its maximum on the interval [0, 1].
If the interval is unbounded, i.e. if the function is defined for −∞ < x < ∞ then you can’t compute the values f (a) and f (b), but instead you should compute limx→±∞ f (x).
38.1. Example – the graph of a rational function
Let’s “sketch the graph” of the function
f (x) =
x(1 − x) 1 + x^2
By looking at the signs of numerator and denominator we see that
f (x) > 0 for 0 < x < 1 f (x) < 0 for x < 0 and also for x > 1.
We compute the derivative of f
f ′(x) =
1 − 2 x − x^2 ` 1 + x^2
Hence f ′(x) = 0 holds if and only if
1 − 2 x − x^2 = 0 and the solutions to this quadratic equation are − 1 ±
2 and B = −1 +
To see if the derivative changes sign we factor the numerator and denominator. The denominator is always positive, and the numerator is
−x^2 − 2 x + 1 = −(x^2 + 2x − 1) = −(x − A)(x − B). Therefore
f ′(x)
< 0 for x < A
0 for A < x < B < 0 for x > B It follows that f is decreasing on the interval (−∞, A), increasing on the interval (A, B) and decreasing again on the interval (B, ∞). Therefore
A is a local minimum, and B is a local maximum.
Are these global maxima and minima?
abs. min.
abs. max.
Figure 23. The graph of f (x) = (x − x^2 )/(1 + x^2 )
Since we are dealing with an unbounded interval we must compute the limits of f (x) as x → ±∞. You find lim x→∞
f (x) = lim x→−∞
f (x) = − 1.
Since f is decreasing between −∞ and A, it follows that
f (A) ≤ f (x) < −1 for − ∞ < x ≤ A. Similarly, f is decreasing from B to +∞, so
− 1 < f (x) ≤ f (−1 +
From this it follows that f (x) is the smallest it can be when x = A = − 1 −
2 and at its largest when x = B = −1 +
2: the local maximum and minimum which we found are in fact a global maximum and minimum.
By definition, a function f is convex on some interval a < x < b if the line segment connecting any pair of points on the graph lies above the piece of the graph between those two points. The function is called concave if the line segment connecting any pair of points on the graph lies below the piece of the graph between those two points.
A point on the graph of f where f ′′(x) changes sign is called an inflection point.
convex not convex
Figure 24. If a graph is convex then all chords lie above the graph. If it is not convex then some chords will cross the graph or lie below it.
Instead of “convex” and “concave” one often says ”curved upwards” or ”curved down- wards.”
You can use the second derivative to tell if a function is concave or convex. Theorem 39.1. A function f is convex on some interval a < x < b if and only if f ′′(x) ≥ 0 for all x on that interval. Theorem 39.2. A function f is convex on some interval a < x < b if and only if the derivative f ′(x) is a nondecreasing function on that interval.
A proof using the Mean Value Theorem will be given in class.
39.4. When the second derivative test doesn’t work
Usually the second derivative test will work, but sometimes a stationary point c has f ′′(c) = 0. In this case the second derivative test gives no information at all. The figure below shows you the graphs of three functions, all three of which have a stationary point at x = 0. In all three cases the second derivative vanishes at x = 0 so the second derivative test says nothing. As you can see, the stationary point can be a local maximum, a local minimum, or neither.
y = x^3 y = x^4 y = −x^4
Figure 26. Three functions for which the second derivative test doesn’t work.
40.1. Proof of the Mean Value Theorem
Let m be the slope of the chord connecting the points (a, f (a)) and (b, f (b)), i.e.
m =
f (b) − f (a) b − a
and consider the function g(x) = f (x) − f (a) − m(x − a). This function is continuous (since f is continuous), and g attains its maximum and mini- mum at two numbers cmin and cmax. There are now two possibilities: either at least one of cmin or cmax is an interior point, or else both cmin and cmax are endpoints of the interval a ≤ x ≤ b. Consider the first case: one of these two numbers is an interior point, i.e. if a < cmin < b or a < cmax < b, then the derivative of g must vanish at cmin or cmax. If one has g′(cmin) = 0, then one has 0 = g′(cmin) = f ′(cmin) − m, i.e. m = f ′(cmin). The definition of m implies that one gets
f ′(cmin) =
f (b) − f (a) b − a
If g′(cmax) = 0 then one gets m = f ′(cmax) and hence
f ′(cmax) =
f (b) − f (a) b − a
We are left with the remaining case, in which both cmin and cmax are end points. To deal with this case note that at the endpoints one has g(a) = 0 and g(b) = 0.
Thus the maximal and minimal values of g are both zero! This means that g(x) = 0 for all x, and thus that g′(x) = 0 for all x. Therefore we get f ′(x) = m for all x, and not just for some c.
40.2. Proof of Theorem 33.
If f is a non-increasing function and if it is differentiable at some interior point a, then we must show that f ′(a) ≥ 0.
Since f is non-decreasing, one has f (x) ≥ f (a) for all x > a. Hence one also has f (x) − f (a) x − a
for all x > a. Let x ↘ a, and you get
f ′(a) = lim x↘a
f (x) − f (a) x − a
40.3. Proof of Theorem 33.
Suppose f is a differentiable function on an interval a < x < b, and suppose that f ′(x) ≥ 0 on that interval. We must show that f is non-decreasing on that interval, i.e. we have to show that if x 1 < x 2 are two numbers in the interval (a, b), then f (x 1 ) ≥ f (x 2 ). To prove this we use the Mean Value Theorem: given x 1 and x 2 the Mean Value Theorem hands us a number c with x 1 < c < x 2 , and
f ′(c) =
f (x 2 ) − f (x 1 ) x 2 − x 1
We don’t know where c is exactly, but it doesn’t matter because we do know that wherever c is we have f ′(c) ≥ 0. Hence f (x 2 ) − f (x 1 ) x 2 − x 1
Multiply with x 2 − x 1 (which we are allowed to do since x 2 > x 1 so x 2 − x 1 > 0) and you get f (x 2 ) − f (x 1 ) ≥ 0 , as claimed.
Exercises
40.1 – Find equations for the tangent and normal lines
to the curve... at the point... y = 4x/(1 + x^2 ) (1, 2) y = 8/(4 + x^2 ) (2, 1) y^2 = 2x + x^2 (2, 2) xy = 3 (1, 3)
40.2 – Does the curve y = x^4 − 2 x^2 + 2 have any horizontal tangents? If so, where?
40.3 – At some point (a, f (a)) on the graph of f (x) = −1 + 2x − x^2 the tangent to this graph goes through the origin. Which point is it?
40.6 – The following functions are periodic, i.e. they satisfy f (x + L) = f (x) for all x, where the constant L is called the period of the function. The graph of a periodic function repeats itself indefinitely to the left and to the right. It therefore has infinitely many (local) minima and maxima, and infinitely many inflections points. Sketch the graphs of the following functions as in the previous problem, but only list those “interesting points” that lie in the interval 0 ≤ x < 2 π.
(a) y = sin x (b) y = sin x + cos x (c) y = sin x + sin^2 x (d) y = 2 sin x + sin^2 x (e) y = 4 sin x + sin^2 x (f ) y = 2 cos x + cos^2 x
(g) y =
2 + sin x
(h) y =
2 + sin x
40.7 – Find the domain and sketch the graphs of each of the following functions
(a) y = arcsin x (b) y = arctan x (c) y = 2 arctan x − x (d) y = arctan(x^2 ) (e) y = 3 arcsin(x) − 5 x (f ) y = 6 arcsin(x) − 10 x^2
40.8 – In the following two problems it is not possible to solve the equation f ′(x) = 0, but you can tell something from the second derivative.
(a) Show that the function f (x) = x arctan x is convex. Then sketch the graph of f.
(b) Show that the function g(x) = x arcsin x is convex. Then sketch the graph of g.
40.9 – For each of the following functions use the derivative to decide if they are increasing, decreasing or neither on the indicated intervals
(a) f (x) =
x 1 + x^2
10 < x < ∞
(b) f (x) =
2 + x^2 x^3 − x
1 < x < ∞
(c) f (x) =
2 + x^2 x^3 − x
0 < x < 1
(d) f (x) = 2 +^ x
2 x^3 − x
0 < x < ∞