[K-MOOC]  Introductory Mathematics for Artificial Intelligence

         그림입니다.
원본 그림의 이름: cover-new-1.jpg
원본 그림의 크기: 가로 3585pixel, 세로 4985pixel

                Translated by

  Sang-Gu LEE with Youngju NIELSEN, Yoonmee HAM

         from the original Korean text written by

      Sang-Gu LEE with Jae Hwa LEE, Yoonmee HAM, Kyung-Eun PARK


    Part Ⅲ. AI and Optimal solution(Calculus)

8.  Local Maximum and Minimum

The derivative can be used to determine whether a function increases or decreases based on the sign of slope at a point (or on a given interval).

There might be a changing point of the slope (e.g, decreasing to increasing, increasing to decreasing). We call it a critical point, and

the derivative of the function will be zero at a critical point. The second derivative can be used to determine whether a given function has a local maximum

or minimum value at a critical point. Using the second derivative, we can 'check that a function has the absolute maximum or minimum on a given interval'.


  8.1 Application of derivatives

  8.2 Application of the second derivative

  8.3 Local Maximum and Minimum,

      Absolute Maximum and Minimum


8.1. Applications of Derivatives

Let be a function defined on an interval . For any two distinct points and in , if whenever ,

then we say is increasing on . Similarly, if whenever , then we say is decreasing on .

It will be much easier to understand increasing and decreasing functions from the figure. For example, if f() > f() whenever in an interval,

then the function f is a decreasing function on that interval as shown in the figure.

  묶음 개체입니다.

             <increasing>                          <decreasing>

If a function is continuous on a closed interval and differentiable on an open interval , then its derivative may tell us some information

on whether is increasing or decreasing on that interval.

 ① If at all points in the interval , then increases on .

 ② If at all points in the interval , then decreases on .


For example, if holds, then the slope of the tangent line to at is positive, so the function is increasing near . Similarly, holds,

then the slope of the tangent line to at is negative, so the function decreases  near .


In the following figure, since the slope of the tangent line to at point c is positive, the function is increasing near .

Similarly, since the slope of the tangent line to at the point is negative, then the function is decreasing near .


  묶음 개체입니다.


사각형입니다.   Let and find all increasing and decreasing intervals.



As shown in the graph, the function is decreasing on . In other words, the function is decreasing when or .

The function is decreasing when . So the intervals of increase are and , and the interval of decrease is .                        


8.2. Applications of the second derivative

Convex functions play an important role in mathematics. They are essential in the study of optimization problems.

Assume that a function is differentiable at and the point is on the curve

The curve is said to be concave up (or convex down) at if lies above the tangent at for all near .

Similarly, the curve is said to be concave down (or convex up) at if lies below the tangent at for all near .

As shown in the figure, this function goes up (increasing) and reach the top, and then goes down (decreasing), then the function is convex up.

We can observe a change of  sign on the derivative, from ‘+’ to ‘-'. If the sign of derivative changes from '- to +',  then the function is convex down.

묶음 개체입니다. 

The second derivative indicates when the function is convex up or convex down. When a continuous function is differentiable on an open interval

containing the point and does exist, then the followings hold:

  ① If , then is convex down at .

  ② If , then is convex up at .


So convexity can be determined by the second derivative of a function.


Since and , increases near . And since means the slope of the tangent line, the slope of the tangent line is increasing.

Hence, is convex down at . Similarly, means that the slope of the tangent line is decreasing. Hence, is convex up at .

묶음 개체입니다.


사각형입니다.  Let . Find intervals where this function is convex up or down.



Therefore, it is convex upward when and convex downward when . Additionally, is the inflection point.

In this graph, the function is convex down after the inflection point .          


8.3. Local Maximum and Minimum, Absolute Maximum and Minimum                                                          

If is continuous on a closed interval , then there exists the absolute maximum and absolute minimum of in this interval.

To find this, we must know the notion of local maximum and local minimum.

A function has a local maximum (resp. a local minimum) at if satisfies (resp. ) for all in a neighborhood of .

A local maximum or local minimum is called an extreme value, and a point at which a function has a local maximum or local minimum

is called an extreme point

From this observation, we see that all possible candidates (to be an extreme point) must be where or does not exist.

 A point where the  is zero or does not exist is called a critical point. For each critical point, the following condition holds.


[Fermat's theorem]

(also known as interior extremum theorem, Fermat's Theorem for Extrema)

If has an extreme value at ,

then or does not exist.


사각형입니다. Find all critical points of .

Solution. Since is a polynomial function, there is no point where is not differentiable. So all critical points are or ,

which is the solution of the equation  . [see the following code]



The critical points {0, 1} that we found by using code and by hand are all same. Now, we can determine all local maxima and local minima.


When a function has and at in the domain with ,

  ① if , then is a local maximum.

  ② if , then is a local minimum.


This figure shows that a function has a local maximum or local minimum at a critical point. If , then is convex up at the point .

And implies that is a local maximum. Similarly, is the local minimum of if and .

    그림입니다.  그림입니다.

The absolute maximum and the absolute minimum of a continuous function in a closed interval can be obtained by comparing the function values

at all critical points and the function values at both ends of the interval.


 [Step 1] Find all critical points of on interval .

 [Step 2] Compute function values at all critical points and end points.


사각형입니다.  Find all local maximum and local minimum of .

 is defined on interval .



We found two critical points, and we computed the function values at those points and both endpoints. These four values were compared

to find the absolute maximum and absolute minimum of the given function. The answer is as follows:

local maximum : , local minimum : , absolute maximum: , absolute minimum :.       


◩ Open Problem 2 

Find a complicated twice differentiable function in other textbooks, and use the code to find the local maximum, the local minimum,

the absolute maximum, and the absolute minimum of the function.


[Fermat's (interior extremum) theorem]

The optimal solution satisfies:

                              

Therefore, we solve an equation , and determine which critical points give us an optimal solution. However, if the function is too complicated,

it is also difficult to find all critical points from the equation . In such cases, we can find them by using numerical methods.

The gradient descent method is one of the most popular numerical optimization methods for solving this problem.

We will study the Gradient Descent Method(GDM) in the next class.


 < Web resources >  

[A lecture on the limit] http://youtu.be/mXVU8OqIHJY

[Calculus Lab] http://matrix.skku.ac.kr/Cal-Book1/Ch4/

              http://matrix.skku.ac.kr/Cal-Book/part1/CS-Sec-4-1-Sol.html

[Appl. of derivative Lecture] https://youtu.be/O4lN5zEZnMA


Copyright @ 2021 SKKU Matrix Lab. All rights reserved.
Made by Manager: Prof. Sang-Gu Lee and Dr. Jae Hwa Lee