M2L2 LN
M2L2 LN
M2L2 LN
In the previous class we studied about stationary points and the definition of relative and global optimum. The necessary and sufficient conditions required for a relative optimum in functions of one variable and its extension to functions of two variables was also studied. In this lecture, determination of the convexity and concavity of functions is discussed. The analyst must determine whether the objective functions and constraint equations are convex or concave. In real-world problems, if the objective function or the constraints are not convex or concave, the problem is usually mathematically intractable.
Functions of one variable Convex function A real-valued function f defined on an interval (or on any convex subset C of some vector space) is called convex, if for any two points a and b in its domain C and any t in [0,1], we have
Fig. 1 In other words, a function is convex if and only if its epigraph (the set of points lying on or above the graph) is a convex set. A function is also said to be strictly convex if
M2L2
for any t in (0,1) and a line connecting any two points on the function lies completely above the function. These relationships are illustrated in Fig. 1. Testing for convexity of a single variable function A function is convex if its slope is non decreasing or 2 f / x 2 0. It is strictly convex if its slope is continually increasing or Properties of convex functions A convex function f, defined on some convex open interval C, is continuous on C and differentiable at all or at most, countable many points. If C is closed, then f may fail to be continuous at the end points of C. A continuous function on an interval C is convex if and only if
a + b f (a ) + f (b) f 2 2
for all a and b in C. A differentiable function of one variable is convex on an interval if and only if its derivative is monotonically non-decreasing on that interval. A continuously differentiable function of one variable is convex on an interval if and only if the function lies above all of its tangents: f (b) f ( a ) + f '( a )(b a ) for all a and b in the interval. A twice differentiable function of one variable is convex on an interval if and only if its second derivative is non-negative in that interval; this gives a practical test for convexity. If its second derivative is positive then it is strictly convex, but the converse does not hold, as shown by f(x) = x4. More generally, a continuous, twice differentiable function of several variables is convex on a convex set if and only if its Hessian matrix is positive semi definite on the interior of the convex set.
M2L2
If two functions f and g are convex, then so is any weighted combination a f + b g with nonnegative coefficients a and b. Likewise, if f and g are convex, then the function max{f,g} is convex. A strictly convex function will have only one minimum which is also the global minimum. Examples The second derivative of x2 is 2; it follows that x2 is a convex function of x. The absolute value function |x| is convex, even though it does not have a derivative at x = 0. The function f with domain [0,1] defined by f(0)=f(1)=1, f(x)=0 for 0<x<1 is convex; it is continuous on the open interval (0,1), but not continuous at 0 and 1. Every linear transformation is convex but not strictly convex, since if f is linear, then f(a + b) = f(a) + f(b). This implies that the identity map (i.e., f(x) = x) is convex but not strictly convex. The fact holds good if we replace "convex" by "concave". An affine function (f (x) = ax + b) is simultaneously convex and concave.
Concave function A differentiable function f is concave on an interval if its derivative function f is decreasing on that interval: a concave function has a decreasing slope. A function that is convex is often synonymously called concave upwards, and a function that is concave is often synonymously called concave downward. For a twice-differentiable function f, if the second derivative, f ''(x), is positive (or, if the acceleration is positive), then the graph is convex (or concave upward); if the second derivative is negative, then the graph is concave (or concave downward). Points, at which concavity changes, are called inflection points. If a convex (i.e., concave upward) function has a "bottom", any point at the bottom is a minimal extremum. If a concave (i.e., concave downward) function has an "apex", any point at the apex is a maximal extremum. A function f(x) is said to be concave on an interval if, for all a and b in that interval,
M2L2
Fig. 2 Testing for concavity of a single variable function A function is concave if its slope is non increasing or 2 f / x 2 0. It is strictly concave if its slope is continually decreasing or 2 f / x 2 < 0 throughout the function. Properties of a concave functions A continuous function on C is concave if and only if
a + b f ( a ) + f (b ) f 2 2
for any x and y in C. Equivalently, f(x) is concave on [a, b] if and only if the function f(x) is convex on every subinterval of [a, b].
M2L2
If f(x) is twice-differentiable, then f(x) is concave if and only if f (x) is non-positive. If its second derivative is negative then it is strictly concave, but the opposite is not true, as shown by f(x) = -x4. A function is called quasiconcave if and only if there is an x0 such that for all x < x0, f(x) is non-decreasing while for all x > x0 it is non-increasing. x0 can also be , making the function non-decreasing (non-increasing) for all x. The opposite of quasiconcave is quasiconvex. Example 1 Consider the example in lecture notes 1 for a function of two variables. Locate the stationary points of f ( x) = 12 x 5 45 x 4 + 40 x 3 + 5 and find out if the function is convex, concave or neither at the points of optima based on the testing rules discussed above. Solution
Consider the point x =x* = 0 f ''( x*) = 240( x*)3 540( x*) 2 + 240 x* = 0 at x * = 0 f '''( x*) = 720( x*) 2 1080 x * +240 = 240 at x * = 0 Since the third derivative is non-zero x = x* = 0 is neither a point of maximum or minimum but it is a point of inflection. Hence the function is neither convex nor concave at this point. Consider x = x* = 1 f ''( x*) = 240( x*)3 540( x*) 2 + 240 x* = 60 at x* = 1 Since the second derivative is negative, the point x = x* = 1 is a point of local maxima with a maximum value of f(x) = 12 45 + 40 + 5 = 12. At this point the function is concave since 2 f / x 2 < 0.
Consider x = x* = 2 f ''( x*) = 240( x*)3 540( x*)2 + 240 x* = 240 at x* = 2 Since the second derivative is positive, the point x = x* = 2 is a point of local minima with a minimum value of f(x) = -11. At this point the function is convex since 2 f / x 2 > 0. D Nagesh Kumar, IISc, Bangalore M2L2
Optimization Methods: Optimization using Calculus-Convexity and Concavity Functions of two variables A function of two variables, f(X) where X is a vector = [x1,x2], is strictly convex if
f (t 1 + (1 t ) 2 ) < tf ( 1 ) + (1 t ) f ( 2 )
where X1 and X2 are points located by the coordinates given in their respective vectors. Similarly a two variable function is strictly concave if
f (t 1 + (1 t ) 2 ) > tf ( 1 ) + (1 t ) f ( 2 )
Contour plot of a convex function is illustrated in Fig. 3
340
x2
70 120 450
x2
x1 Fig. 4
M2L2
Optimization Methods: Optimization using Calculus-Convexity and Concavity To determine convexity or concavity of a function of multiple variables, the eigenvalues of its Hessian matrix are examined and the following rules apply. (a) If all eigenvalues of the Hessian are positive the function is strictly convex. (b) If all eigenvalues of the Hessian are negative the function is strictly concave. (c) If some eigenvalues are positive and some are negative, or if some are zero, the function is neither strictly concave nor strictly convex.
Example 2 Consider the example in lecture notes 1 for a function of two variables. Locate the stationary points of f(X) and find out if the function is convex, concave or neither at the points of optima based on the rules discussed in this lecture.
2 f(X) = 2 x13 / 3 2 x1 x2 5 x1 + 2 x2 + 4 x2 + 5
Solution f x ( *) 2 x 2 2 x 5 0 1 2 = 1 x f = = f 2 x1 + 4 x2 + 4 0 x ( *) 2 Solving the above the two stationary points are X1 = [-1,-3/2] and X2 = [3/2,-1/4] The Hessian of f(X) is 2 f 2 f 2 f 2 f = 4 x ; = 4; = = 2 1 x12 x2 2 x1x2 x2 x1 4 x 2 H= 1 2 4
I - H =
At X1
4 x1
2
2 4
I - H =
+4
2
2 = ( + 4)( 4) 4 = 0 4
2 16 4 = 0
D Nagesh Kumar, IISc, Bangalore M2L2
2 = 12
1 = + 12
2 = 12
Since one eigen value is positive and one negative, X1 is neither a relative maximum nor a relative minimum. Hence at X1 the function is neither convex nor concave. At X2 = [3/2,-1/4]
I - H =
6
2
2 = ( 6)( 4) 4 = 0 4
2 10 + 20 = 0
1 = 5 + 5
2 = 5 5
Since both the eigen values are positive, X2 is a local minimum, and the function is convex at this point as both the eigen values are positive.
M2L2