This chapter is devoted to some applications of the derivative which form part of the basic skills in modelling. We start with a discussion of features of graphs. More precisely, we use the derivative to describe geometric properties like maxima, minima and monotonicity. Even though plotting functions with MATLAB or maple is simple, understanding the connection with the derivative is important, for example, when a function with given properties is to be chosen from a particular class of functions.
In the following section we discuss Newton’s method and the concept of order of convergence. Newton’s method is one of the most important tools for computing zeros of functions. It is nearly universally in use.
The final section of this chapter is devoted to an elementary method from data analysis. We show how to compute a regression line through the origin. There are many areas of application that involve linear regression. This topic will be developed in more detail in Chap. 18.
8.1 Curve Sketching
In the following we investigate some geometric properties of graphs of functions using the derivative: maxima and minima, intervals of monotonicity and convexity. We further discuss the mean value theorem which is an important technical tool for proofs.
Definition 8.1
A function f: has
For points in the open interval (a, b) one has a simple necessary condition for extrema of differentiable functions:
Proposition 8.2
Let and f be differentiable at . If f has a local maximum or minimum at then .
Proof
The function , whose derivative vanishes at , shows that the condition of the proposition is not sufficient for the existence of a maximum or minimum.
The geometric content of the proposition is that in the case of differentiability the graph of the function has a horizontal tangent at a maximum or minimum. A point where is called a stationary point.
Remark 8.3
- (a)
the boundary points ;
- (b)
points at which f is not differentiable;
- (c)
points at which f is differentiable and .
The following proposition is a useful technical tool for proofs. One of its applications lies in estimating the error of numerical methods. Similarly to the intermediate value theorem, the proof is based on the completeness of the real numbers. We are not going to present it here but instead refer to the literature, for instance [3, Chap. 3.2].
Proposition 8.4
We now turn to the description of the behaviour of the slope of differentiable functions.
Definition 8.5
Examples of strictly monotonically increasing functions are the power functions with odd powers n; a monotonically, but not strictly monotonically increasing function is the sign function , for instance. The behaviour of the slope of a differentiable function can be described by the sign of the first derivative.
Proposition 8.6
- (a)
- (b)
Proof
Remark 8.7
The example shows that f can be strictly monotonically increasing even if at isolated points.
Proposition 8.8
- (a)
- (b)
Proof
The proof follows from the previous proposition which characterises the monotonic behaviour as shown in Fig. 8.3.
Remark 8.9
(Convexity and concavity of a function graph) If holds in an interval then is monotonically increasing there. Thus the graph of f is curved to the left or convex. On the other hand, if , then is monotonically decreasing and the graph of f is curved to the right or concave (see Fig. 8.4). A quantitative description of the curvature of the graph of a function will be given in Sect. 14.2.
Let be a point where . If does not change its sign at , then is an inflection point. Here f changes from positive to negative curvature or vice versa.
Proposition 8.10
(Second derivative criterion for local extrema) Let f be twice continuously differentiable on (a, b), and .
- (a)
If then f has a local minimum at .
- (b)
If then f has a local maximum at .
Proof
(a) Since is continuous, for all x in a neighbourhood of . According to Proposition 8.6, is strictly monotonically increasing in this neighbourhood. Because of this means that for and for ; according to the criterion for local extrema, is a minimum. The assertion (b) can be shown similarly.
Remark 8.11
If there can either be an inflection point or a minimum or maximum. The functions , supply a typical example. In fact, they have for n even a global minimum at , and an inflection point for n odd. More general functions can easily be assessed using Taylor expansion. An extreme value criterion based on this expansion will be discussed in Application 12.14.
One of the applications of the previous propositions is curve sketching, which is the detailed investigation of the properties of the graph of a function usingdifferential calculus. Even though graphs can easily be plotted in MATLAB or maple itis still often necessary to check the graphical output at certain points using analytic methods.
Experiment 8.12
A further application of the previous propositions consists in finding extrema, i.e. solving one-dimensional optimisation problems. We illustrate this topic using a standard example.
Example 8.13
As result we get that the maximum area is obtained at , thus in the case of a square.
8.2 Newton’s Method
With the help of differential calculus efficient numerical methods for computing zeros of differentiable functions can be constructed. One of the basic procedures is Newton’s method1 which will be discussed in this section for the case of real-valued functions f: .
Proposition 8.14
(Convergence of Newton’s method) Let f be a real-valued function, twice differentiable with a continuous second derivative. Further, let and . Then there exists a neighbourhood such that Newton’s method converges quadratically to for every starting value .
Proof
Example 8.15
Bisection method for calculating the third root of 2
n |
|
|
Error |
---|---|---|---|
1 |
−2.00000000000000 |
2.00000000000000 |
4.00000000000000 |
2 |
0.00000000000000 |
2.00000000000000 |
2.00000000000000 |
3 |
1.00000000000000 |
2.00000000000000 |
1.00000000000000 |
4 |
1.00000000000000 |
1.50000000000000 |
0.50000000000000 |
5 |
1.25000000000000 |
1.50000000000000 |
0.25000000000000 |
6 |
1.25000000000000 |
1.37500000000000 |
0.12500000000000 |
7 |
1.25000000000000 |
1.31250000000000 |
0.06250000000000 |
8 |
1.25000000000000 |
1.28125000000000 |
0.03125000000000 |
9 |
1.25000000000000 |
1.26562500000000 |
0.01562500000000 |
10 |
1.25781250000000 |
1.26562500000000 |
0.00781250000000 |
11 |
1.25781250000000 |
1.26171875000000 |
0.00390625000000 |
12 |
1.25976562500000 |
1.26171875000000 |
0.00195312500000 |
13 |
1.25976562500000 |
1.26074218750000 |
0.00097656250000 |
14 |
1.25976562500000 |
1.26025390625000 |
0.00048828125000 |
15 |
1.25976562500000 |
1.26000976562500 |
0.00024414062500 |
16 |
1.25988769531250 |
1.26000976562500 |
0.00012207031250 |
17 |
1.25988769531250 |
1.25994873046875 |
0.00006103515625 |
18 |
1.25991821289063 |
1.25994873046875 |
0.00003051757813 |
Newton’s method for calculating the third root of 2
n |
x |
Error |
---|---|---|
1 |
2.00000000000000 |
0.74007895010513 |
2 |
1.50000000000000 |
0.24007895010513 |
3 |
1.29629629629630 |
0.03637524640142 |
4 |
1.26093222474175 |
0.00101117484688 |
5 |
1.25992186056593 |
0.00000081067105 |
6 |
1.25992104989539 |
0.00000000000052 |
7 |
1.25992104989487 |
0.00000000000000 |
The error curves for the bisection method and Newton’s method can be seen in Fig. 8.6. A semi-logarithmic representation (MATLAB command semilogy) is used there.
Remark 8.16
The convergence behaviour of Newton’s method depends on the conditions of Proposition 8.14. If the starting value is too far away from the zero , then the method might diverge, oscillate or converge to a different zero. If , which means the zero has a multiplicity , then the order of convergence may be reduced.
Experiment 8.17
Open the applet Newton’s method and test—using the sine function—how the choice of the starting value influences the result (in the applet the right interval boundary is the initial value). Experiment with the intervals for and interpret your observations. Also carry out the calculations with the same starting values with the help of the M-file mat08_2.m.
Experiment 8.18
With the help of the applet Newton’s method, study how the order of convergence drops for multiple zeros. For this purpose, use the two polynomial functions given in the applet.
Remark 8.19
8.3 Regression Line Through the Origin
This section is a first digression into data analysis: Given a collection of data points scattered in the plane, find the line of best fit (regression line) through the origin. We will discuss this problem as an application of differentiation; it can also be solved by using methods of linear algebra. The general problem of multiple linear regression will be dealt with in Chap. 18.
In the year 2002, the height x [cm] and the weight y [kg] of 70 students in Computer Science at the University of Innsbruck were collected. The data can be obtained from the M-file mat08_3.m.
Application 8.20
Example 8.21
year |
2010 |
2011 |
2012 |
2013 |
2014 |
2015 |
2016 |
---|---|---|---|---|---|---|---|
index |
100.0 |
103.3 |
105.8 |
107.9 |
109.7 |
110.7 |
111.7 |
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
---|---|---|---|---|---|---|---|
|
0.0 |
3.3 |
5.8 |
7.9 |
9.7 |
10.7 |
11.7 |
8.4 Exercises
- 1.
-
Find out which of the following (continuous) functions are differentiable at :
- 2.
-
Find all maxima and minima of the functions
- 3.
-
Find the maxima of the functions
- 4.
-
Find all maxima and minima of the function
- 5.
-
Find the proportions of the cylinder which has the smallest surface area F for a given volume V.
Hint. Calculate the height h as a function of the radius r from , substitute and minimise F(r).
- 6.
-
(From mechanics of solids) The moment of inertia with respect to the central axis of a beam with rectangular cross section is (b the width, h the height). Find the proportions of the beam which can be cut from a log with circular cross section of given radius r such that its moment of inertia becomes maximal.
Hint. Write b as function of h,
- 7.
-
(From soil mechanics) The mobilised cohesion of a failure wedge with sliding surface, inclined by an angle , is
- 8.
-
This exercise aims at investigating the convergence of Newton’s method for solving the equations
- (a)
-
Open the applet Newton’s method and carry out Newton’s method for both equations with an accuracy of 0.0001. Explain why you need a different number of iterations.
- (b)
-
With the help of the M-file mat08_1.m, generate a list of approximations in each case (starting value x1 = 1.5, tol = 100*eps, maxk = 100) and plot the errors in each case using semilogy. Discuss the results.
- 9.
-
Apply the MATLAB program mat08_2.m to the functions which are defined by the M-files mat08_f1.m and mat08_f2.m (with respective derivatives mat08_df1.m and mat08_df2.m). Choose x1 = 2, maxk = 250. How do you explain the results?
- 10.
-
Rewrite the MATLAB program mat08_2.m so that termination occurs when either the given number of iterations maxk or a given error bound tol is reached (termination at the nth iteration, if either or ). Compute n, and the error . Test your program using the functions from Exercise 8 and explain the results.
Hint. Consult the M-file mat08_ex9.m.
- 11.
-
Write a MATLAB program which carries out the secant method for cubic polynomials.
- 12.
-
- (a)
-
By minimising the sum of squares of the errors, derive a formula for the coefficient c of the regression parabola through the data .
- (b)
-
A series of measurements of braking distances s [m] (without taking into account the perception-reaction distance) of a certain type of car in dependence on the velocity v [km/h] produced the following values:
10
20
40
50
60
70
80
100
120
1
3
8
13
18
23
31
47
63
- 13.
-
Show that the best horizontal straight line through the data points is given by the arithmetic mean of the y-values:
Hint. Minimise .
- 14.
-
(From geotechnics) The angle of internal friction of a soil specimen can be obtained by means of a direct shear test, whereby the material is subjected to normal stress and the lateral shear stress at failure is recorded. In case the cohesion is negligible, the relation between and can be modelled by a regression line through the origin of the form . The slope of the regression line is interpreted as the tangent of the friction angle , . In a laboratory experiment, the following data have been obtained for a specimen of glacial till (data from [25]):
[kPa]
100
150
200
300
150
250
300
100
150
250
100
150
200
250
[kPa]
68
127
135
206
127
148
197
76
78
168
123
97
124
157
- 15.
-
- (a)
-
Convince yourself by applying the mean value theorem that the function is a contraction (see Definition C.17) on the interval [0, 1] and compute the fixed point up to two decimal places using the iteration of Proposition C.18.
- (b)
-
Write a MATLAB program which carries out the first N iterations for the computation of for a given initial value and displays in a column.