• Aucun résultat trouvé

Curve Sketching

Dans le document Undergraduate Topics in Computer Science (Page 103-108)

Applications of the Derivative

8.1 Curve Sketching

Applications of the Derivative

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 pre-cisely, we use the derivative to describe geometric properties like maxima, minima and monotonicity. Even though plotting functions withMATLABormapleis 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 functionf : [a, b] →Rhas (a) a global maximum atx0∈ [a, b]if

f (x)f (x0) for allx∈ [a, b]

(b) a local maximum atx0∈ [a, b], if there exists a neighbourhoodUε(x0)so that f (x)f (x0) for allxUε(x0)∩ [a, b].

M. Oberguggenberger, A. Ostermann, Analysis for Computer Scientists, Undergraduate Topics in Computer Science,

DOI10.1007/978-0-85729-446-3_8, © Springer-Verlag London Limited 2011

95

96 8 Applications of the Derivative Fig. 8.1 Minima and

maxima of a function

The maximum is called strict if the strict inequalityf (x) < f (x0)holds in (a) or (b) forx=x0.

The definition for minimum is analogous by inverting the inequalities. Maxima and minima are subsumed under the term extrema. Figure8.1shows some possible situations. Note that the function there does not have a global minimum on the chosen interval.

For pointsx0in the open interval(a, b)one has a simple necessary condition for extrema of differentiable functions:

Proposition 8.2 Let x0(a, b) and f be differentiable atx0. If f has a local maximum or minimum atx0thenf(x0)=0.

Proof Due to the differentiability off we have f(x0)= lim

h0+

f (x0+h)f (x0)

h = lim

h0

f (x0+h)f (x0)

h .

In the case of a maximum the slope of the secant satisfies the inequalities f (x0+h)f (x0)

h ≤0, ifh >0, f (x0+h)f (x0)

h ≥0, ifh <0.

Consequently the limit f(x0)has to be greater than or equal to zero as well as smaller than or equal to zero, thus necessarilyf(x0)=0.

The functionf (x)=x3, whose derivative vanishes atx=0, shows that the con-dition of the proposition is not sufficient for the existence of a maximum or mini-mum.

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 x0(a, b)wheref(x0)=0 is called a stationary point.

Remark 8.3 The proposition shows that the following point sets have to be checked in order to determine the maxima and minima of a functionf: [a, b] →R:

8.1 Curve Sketching 97 Fig. 8.2 The mean value

theorem

(a) The boundary pointsx0=a,x0=b.

(b) Pointsx0(a, b)at whichf is not differentiable.

(c) Pointsx0(a, b)at whichf is differentiable andf(x0)=0.

The following proposition is a useful technical tool for proofs. One of its appli-cations lies in estimating the error of numerical methods. Similarly to the interme-diate 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 (Mean value theorem) Letf be continuous on[a, b]and differen-tiable on(a, b). Then there exists a pointξ(a, b)such that

f (b)f (a)

ba =f(ξ ).

Geometrically this means that the tangent atξ has the same slope as the secant through(a, f (a)), (b, f (b)). Figure8.2illustrates this fact.

We now turn to the description of the behaviour of the slope of differentiable functions.

Definition 8.5 A functionf :I→Ris called monotonically increasing, if x1< x2f (x1)f (x2)

for allx1, x2I. It is called strictly monotonically increasing, if x1< x2f (x1) < f (x2).

A functionf is said to be (strictly) monotonically decreasing, if−f is (strictly) monotonically increasing.

Examples of strictly monotonically increasing functions are the power functions xxnwith odd powersn; a monotonically, but not strictly monotonically increas-ing function is the sign functionx→signx, for instance. The behaviour of the slope of a differentiable function can be described by the sign of the first derivative.

98 8 Applications of the Derivative Fig. 8.3 Local maximum

Proposition 8.6 For differentiable functionsf :(a, b)→Rthe following implica-tions hold:

(a) f≥0 on(a, b)f is monotonically increasing;

f>0 on(a, b)f is strictly monotonically increasing.

(b) f≤0 on(a, b)f is monotonically decreasing;

f<0 on(a, b)f is strictly monotonically decreasing.

Proof (a) According to the mean value theorem we have f (x2)f (x1)= f(ξ )(x2x1)for a certain ξ(a, b). Ifx1< x2 and f(ξ )≥0 then f (x2)f (x1)≥0. Iff(ξ ) >0 thenf (x2)f (x1) >0. Conversely

f(x)=lim

h0

f (x+h)f (x)

h ≥0,

iff is increasing. The proof for (b) is similar.

Remark 8.7 The example f (x)=x3 shows thatf can be strictly monotonically increasing even iff=0 at isolated points.

Proposition 8.8 (Criterion for local extrema) Let f be differentiable on (a, b), x0(a, b)andf(x0)=0. Then

(a) f(x) >0 forx < x0 f(x) <0 forx > x0

f has a local maximum inx0, (b) f(x) <0 forx < x0

f(x) >0 forx > x0

f has a local minimum inx0.

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 a function graph) If f>0 holds in an interval, thenfis monotonically increasing there. Thus the graph off is curved to the left or convex. On the other hand, iff<0, thenfis monotonically decreasing and the graph off 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.1.

Letx0be a point wheref(x0)=0. If f does not change its sign atx0, then x0is an inflexion point. Heref changes from positive to negative curvature or vice versa.

8.1 Curve Sketching 99

Fig. 8.4

Convexity/concavity and second derivative

Proposition 8.10 (Second derivative criterion for local extrema) Let f be twice continuously differentiable on(a, b),x0(a, b)andf(x0)=0.

(a) Iff(x0) >0 thenf has a local minimum atx0. (b) Iff(x0) <0 thenf has a local maximum atx0.

Proof (a) Sincefis continuous,f(x) >0 for allxin a neighbourhood ofx0. Ac-cording to Proposition8.6,fis strictly monotonically increasing in this neighbour-hood. Because off(x0)=0 this means thatf(x0) <0 forx < x0andf(x) >0 forx > x0; according to the criterion for local extrema,x0is a minimum. The

as-sertion (b) can be shown similarly.

Remark 8.11 If f(x0)=0 there can either be an inflexion point or a minimum or maximum. The functions f (x)=xn,n=2,3,4, . . . supply a typical example.

In fact, they have forn even a global minimum atx =0, and an inflexion point fornodd. More general functions can easily be assessed using a Taylor expansion.

An extreme value criterion based on this expansion will be discussed in Applica-tion 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 using differ-ential calculus. Even though graphs can easily be plotted inMATLABormapleit is still often necessary to check the graphical output at certain points using analytic methods.

Experiment 8.12 Plot the function

y=x(signx−1)(x+1)3+

sign(x−1)+1

(x−2)4−1/2

on the interval −2≤x≤3 and try to read off the local and global extrema, the inflexion points and the monotonic behaviour. Check your observations using the criteria discussed above.

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.

100 8 Applications of the Derivative Example 8.13 Which rectangle with a given perimeter has the largest area? To an-swer this question we denote the lengths of the sides of the rectangle byx andy. Then the perimeter and the area are given by

U=2x+2y, F =xy.

SinceUis fixed, we obtainy=U/2x, and from that F =x(U/2x),

wherex can vary in the domain 0≤xU/2. We want to find the maximum of the functionF on the interval[0, U/2]. SinceF is differentiable, we only have to investigate the boundary points and the stationary points. At the boundary points x=0 andx=U/2 we haveF (0)=0 andF (U/2)=0. The stationary points are obtained by setting the derivative to zero:

F(x)=U/2−2x=0,

which brings us tox=U/4 with the function valueF (U/4)=U2/16.

As a result we find that the maximum area is obtained atx=U/4, thus in the case of a square.

Experiment 8.14 On the website ofmaths onlinego to Applications of differential calculus in the gallery area and open the applet How to find a function’s extremum. It is about maximising the area of a triangle which is inscribed in a rectangle. Study the translation of the geometric problem to a problem of differential calculus and curve sketching. Study the connection between geometry and analysis in an analogous way for Example8.13above.

Dans le document Undergraduate Topics in Computer Science (Page 103-108)

Documents relatifs