Queen Mary University of London ECN115 Mathematical Methods PDF
Document Details
Uploaded by Deleted User
Queen Mary University of London
2023
Evgenii Safonov
Tags
Summary
This document is a lecture presentation on mathematical methods in economics and finance. It covers topics such as inverse functions, derivatives, and 1-variable maximization. The document is part of Queen Mary University of London's ECN115 course.
Full Transcript
ECN115 Mathematical Methods in Economics and Finance Evgenii Safonov 2023-2024. LECTURE 6 1 Outline ◁ Miscellaneous ◁ The inverse function, its derivative, and derivative of x 𝛼 ◁ 1-variable maximization...
ECN115 Mathematical Methods in Economics and Finance Evgenii Safonov 2023-2024. LECTURE 6 1 Outline ◁ Miscellaneous ◁ The inverse function, its derivative, and derivative of x 𝛼 ◁ 1-variable maximization 2 ”Whiteboard” 3 Outline ◁ Miscellaneous ◁ The inverse function, its derivative, and derivative of x 𝛼 ◁ 1-variable maximization 4 Inverses Definition. Consider a function f : D → R. We say that function f has an inverse function f −1 : R → D, if the function f −1 is well-defined and it satisfies the following two properties: 1. For any x ∈ D, we have f −1 (f (x)) = x; 2. For any z ∈ R, we have f (f −1 (z)) = z. Example 1. Consider function f : [0, ∞) → [0, ∞) given by f (x) = x 2. Then √ g : [0, ∞) → [0, ∞) given by g (z) = z is the inverse of f. Indeed, g is well-defined, and: √ 1. For any x ∈ [0, ∞), g (f (x)) = x 2 = |x| = x; √ 2. For any z ∈ [0, ∞), we have f (g (z)) = ( z)2 = z. 5 Inverses Definition. Consider a function f : D → R. We say that function f has an inverse function f −1 : R → D, if the function f −1 is well-defined and it satisfies the following two properties: 1. For any x ∈ D, we have f −1 (f (x)) = x; 2. For any z ∈ R, we have f (f −1 (z)) = z. R Example 2. Consider function f : → (0, ∞) given by f (x) = e x. Then R g : (0, ∞) → given by g (z) = ln(z) is the inverse of g. Indeed, g is well-defined, and: 1. For any x ∈ R, g (f (x)) = ln(e ) = x; x 2. For any z ∈ (0, ∞), we have f (g (z)) = e ln(z) = z. 6 Inverses Definition. Consider a function f : D → R. We say that function f has an inverse function f −1 : R → D, if the function f −1 is well-defined and it satisfies the following two properties: 1. For any x ∈ D, we have f −1 (f (x)) = x; 2. For any z ∈ R, we have f (f −1 (z)) = z. Observation 1. If the inverse function exists, it is unique (i.e. there is only one inverse function, or no at all). Observation 2. If g is the inverse of f , that is, if g = f −1 , then f is the inverse of g , that is, f = g −1. Put it differently, if f −1 exists, then there exists (f −1 )−1 , and (f −1 )−1 = f. 7 Derivative of the inverse function R Theorem L6.1. Suppose that function f : (a, b) → , where a can a be real number or −∞, and b can be a real number of ∞, is continuous and strictly monotone. Then the function f has an inverse f −1 , and f −1 is continuous. Moreover, if the function f is differentiable at point x ∈ (a, b), and f ′ (x) ̸= 0, the inverse function f −1 is differentiable at point y = f (x), and 1 (f −1 (y ))′ = f ′ (x) Proof. Omitted (intuition on ”whiteboard”). 8 Derivative of the inverse function: Application 1 Theorem L5.6. The exponential function g : R → R given by g (y ) = e y is differentiable, and ′ (e y ) = e y Remark. We are free to name the variable as we like, so here, we choose it to be “y ” instead of “x” to avoid confusion in the subsequent proof. Proof. Using Theorem L6.1 and the fact that the exponential function is the inverse of the logarithmic function, at point y = ln(x) we have: 1 1 (e y )′ = = = x = ey ln′ (x) 1 x where we have used the fact that since y = ln(x), then e y = x. 9 Derivative of the inverse function: Application 2 √ Proposition. The function g : [0, ∞) → [0, ∞) given by g (y ) = y is √ 1 differentiable, and ( y )′ = √. 2· y Remark. We are free to name the variable as we like, so here, we choose it to be “y ” instead of “x” to avoid confusion in the subsequent proof. √ Proof. Using Theorem L6.1 and the fact the function is the the inverse of the quadratic function, at point y = x 2 we have: √ 1 1 1 ( y )′ = = = √ (x 2 )′ 2x 2· y √ where we have used the fact that since y = x 2 , then y = x (for x ≥ 0). 10 Derivative of the real power Theorem L6.2. Consider function f : (0, ∞) given by f (y ) = y 𝛼 , where 𝛼 is a real number. Then the function f is differentiable, and (y 𝛼 )′ = 𝛼y 𝛼−1 Proof Sketch. If 𝛼 = 1 q , where q ∈ N, then considering y = x q , we get (︀ 1 )︀′ 1 1 1 1 (︀ q1 )︀1−q 1 1 −1 yq = = = x 1−q = y = ·yq (x q )′ qx q−1 q q q If 𝛼 = p q , where q ∈ N, and p ∈ Z, then using Chain rule, we get (︀ p )︀′ (︁(︀ 1 )︀p )︁′ (︀ 1 )︀p−1 (︀ 1 )︀′ p −1 1 1 −1 p p −1 yq = yq =p· yq · yq =p·yq q · ·yq = ·yq q q Need extra analysis when 𝛼 is irrational... 11 Derivatives of common functions and rules of differentiation Derivatives of the common functions: (x 𝛼 )′ = 𝛼x 𝛼−1 Theorem L6.2 (e x )′ = ex Theorem L5.6 1 ln′ (x) = Theorem L5.5 x sin′ (x) = cos(x) Theorem L5.8 ′ cos (x) = − sin(x) Theorem L5.8 Rules of differentiation (f (x) + g (x)) = f ′ (x) + g ′ (x) Theorem L4.4 (f (x) · g (x))′ = f ′ (x)g (x) + f (x)g ′ (x) Theorem L4.6 (f (g (x)))′ = f ′ (g (x)) · g ′ (x) Theorem L5.9 )︂′ f ′ (x)g (x) − f (x)g ′ (x) (︂ f (x) A useful corollary: = g (x) g 2 (x) 12 Outline ◁ Miscellaneous ◁ The inverse function, its derivative, and derivative of x 𝛼 ◁ 1-variable maximization 13 Why study optimisation Physics: theories can be derived from the “Principle of the least action.” https://www.feynmanlectures.caltech.edu/II 19.html Economics: ◁ The consumers maximise their “utility” from consumption. ◁ The firms maximise their profits. ◁ The social planner maximises the social welfare (say, weighted average of the agent’s utilities). ◁ The economic agent maximises a function that represents the trade-off between the expected return and the variance of the portfolio. ◁ The econometrician analyses a regression that minimises the expected loss function. 14 Why is finding the maximum a problem at all? ◁ Say, we want to find the maximum value of the function R f : {1, 2, 3, 4} → given by f (x) = −x 2 + 4x + 5. x calculating f (x) f (x) 1 −12 + 4 · 1 + 5 8 2 −22 + 4 · 2 + 5 9 3 −32 + 4 · 3 + 5 8 4 −42 + 4 · 4 + 5 5 ◁ In fact, we can find the maximum of any function over a non-empty finite set of arguments by comparing the values of the function. ◁ But what if the number of possible arguments is infinite? For instance, how to maximize f (x) = −x 2 + 4x + 5 over x ∈ [1, 4], or over all x ∈ R? ✓ Cannot just compare values of the function one-by-one. ✓ Moreover, the maximum may not even exist! For instance, when we maximize f (x) = x over x ∈ R. 15 General problem R Definition. Given a function f : D → R with domain D ⊆ , we say that the argument z maximises function f over the set X ⊆ D, if z ∈ X and f (z) ≥ f (x) for all x ∈ X. The number f (z) is called the maximum of function f over X and is denoted by max f (x) x∈X The set of all points x ∈ X that maximise f over X is called the set of maximisers of function f over X and is denoted by arg max f (x) x∈X Clarification. In the definition above, the domain of function f is the set D, while the set over which the maximisation is performed is X , which is a subset of the set D. This way, the maximum is well-defined, and it allows us to talk about the dependence of the maximum on the set X. 16 Minimisation is defined in a similar manner as maximisation R Definition. Given a numerical function f : D → R with domain D ⊆ , we say that the argument z minimises function f over the set X ⊆ D, if z ∈ X and f (z) ≤ f (x) for all x ∈ X. The number f (z) is called the minimum of function f over X and is denoted by min f (x) x∈X The set of all points x ∈ X that minimise f over X is called the set of minimisers of function f over X and is denoted by arg min f (x) x∈X 17 Optimization problem examples Consider f (x) = 12 x 2 , X = [−1, 2]. x2 = 2 x 2 = {2} (︀ 1 )︀ (︀ 1 )︀ max 2 arg max 2 x∈[−1,2] x∈[−1,2] 18 Optimization problem examples Consider f (x) = 12 x 2 , X = [−2, 2]. x2 = 2 x 2 = {−2, 2} (︀ 1 )︀ (︀ 1 )︀ max 2 arg max 2 x∈[−2,2] x∈[−2,2] 19 Optimization problem examples Consider f (x) = 12 x 2 , X = R. x2 x2 = ∅ (︀ 1 )︀ (︀ 1 )︀ max does not exist arg max x∈R 2 x∈R 2 20 Optimization problem examples Consider f (x) = 12 x 2 , X = (−1, 2). x2 x2 = ∅ (︀ 1 )︀ (︀ 1 )︀ max 2 does not exist arg max 2 x∈(−1,2) x∈(−1,2) 21 Optimization problem examples Consider f (x) = − 12 x 2 , X = [−1, 2]. (︀ 1 2 )︀ arg max − 21 x 2 = {0} (︀ )︀ max −2x = 0 x∈[−1,2] x∈[−1,2] 22 Optimization problem examples Consider f (x) = − 12 x 2 , X = R. max − 12 x 2 = 0 arg max − 21 x 2 = {0} (︀ )︀ (︀ )︀ x∈ R x∈ R 23 Optimization problem examples Consider f (x) = − 12 x 2 , X = (−1, 2). (︀ 1 2 )︀ arg max − 21 x 2 = {0} (︀ )︀ max −2x = 0 x∈(−1,2) x∈(−1,2) 24 Existence of a maximum (A special case of) Weierstrass Theorem (L6.3). Suppose that a function R R f : D → , where D ⊆ is continuous (i.e., continuous at all points of its domain), and [a, b] ⊆ D, where a < b. Then, there exist a maximum and a minimum of the function f over the closed interval [a, b]; in other words, max f (x), min f (x) exist x∈[a,b] x∈[a,b] Proof. Omitted. 25 How to find a maximum? Suppose that we have shown that there exists a maximum of the function f over the set X (for instance, when X = [a, b], and f is continuous). How do we find it? ◁ Our problem is that there could be infinitely many points in the set X. ◁ One idea that turns out to be fruitful: show that at most of these points, the function f cannot attain its maximum over X. ◁ The goal is to end up with a finite set (i.e. several) “candidate” points that, potentially, can be maximisers of the function f over X. ◁ When X = [a, b], then we, usually, should consider points a and b as candidate points. But this is fine, because these are only two points. ◁ When X = [a, b], the rest of the analysis is performed for the points x such that a < x < b, i.e. x ∈ (a, b). 26 Necessary condition for maximisation Theorem L6.4—a variant of the Fermat Theorem. Consider a function f : R R D → , let X ⊆ D, where D ⊆ , and (a, b) ⊆ X , where a < b. If x maximises function f over the set X , and f is differentiable at point x ∈ (a, b), then f ′ (x) = 0 27 Necessary condition for maximisation Theorem L6.4—a variant of the Fermat Theorem. Consider a function f : R R D → , let X ⊆ D, where D ⊆ , and (a, b) ⊆ X , where a < b. If x maximises function f over the set X , and f is differentiable at point x ∈ (a, b), then f ′ (x) = 0 Proof. Towards a contradiction, assume that c = f ′ (x) > 0. Intuitively, since function f is approximated by some linear function g (x) = cx + d near the point x, we expect to find some point y which is larger, but not much larger than x (so that the approximation works fine) such that f (y ) > f (x) (since g (y ) > g (x)). 27 Necessary condition for maximisation Theorem L6.4—a variant of the Fermat Theorem. Consider a function f : R R D → , let X ⊆ D, where D ⊆ , and (a, b) ⊆ X , where a < b. If x maximises function f over the set X , and f is differentiable at point x ∈ (a, b), then f ′ (x) = 0 Proof. Towards a contradiction, assume that c = f ′ (x) > 0. Intuitively, since function f is approximated by some linear function g (x) = cx + d near the point x, we expect to find some point y which is larger, but not much larger than x (so that the approximation works fine) such that f (y ) > f (x) (since g (y ) > g (x)). Let us think how to use the definition of the derivative to formalise this idea. 27 Necessary condition for maximisation: proof We analyse the case when x maximizes f over X , x ∈ (a, b) ⊆ X , and f is differentiable at x. ◁ Towards a contradiction, assume that f ′ (x) > 0. ◁ Consider 𝜖 = f ′ (x) > 0, and consider a sequence xn → x such that a < x < xn < b. For instance, xn = x + (b − x)/2n. ◁ By the definition of derivative, there exists N such that for n > N, ⃒ ⃒ ⃒ f (xn ) − f (x) ′ ⃒ < 𝜖 = f ′ (x) ⃒ ⃒ ⃒ xn − x − f (x) ⃒ f (xn ) − f (x) ◁ Hence, > 0. xn − x ◁ Since xn > x, then f (xn ) > f (x), contradicting x being a maximum. 28 Necessary condition for maximisation: proof We analyse the case when x maximizes f over X , x ∈ (a, b) ⊆ X , and f is differentiable at x. ◁ Towards a contradiction, assume that f ′ (x) < 0. ◁ Consider 𝜖 = |f ′ (x)| > 0, and consider a sequence xn → x such that a < xn < x < b. For instance, xn = x − (x − a)/2n. ◁ By the definition of derivative, there exists N such that for n > N, ⃒ ⃒ ⃒ f (xn ) − f (x) ′ ⃒ < 𝜖 = |f ′ (x)| ⃒ ⃒ ⃒ xn − x − f (x) ⃒ f (xn ) − f (x) ◁ Hence, < 0. xn − x ◁ Since xn < x, then f (xn ) > f (x), contradicting x being a maximum. 29 An algorithm of finding maximums of the “nice” functions When maximising a numerical function f : D → R over the set X ⊆ D: ◁ Think about the existence of the maximum. If applicable, use the Weierstrass Theorem. ◁ Under the assumption that the maximum exists, find a set of “candidate points” (applying the Fermat Theorem): ✓ Points x that do not lie strictly inside of some interval (a, b) ⊆ D. ✓ Points x such that x ∈ (a, b) ⊆ D, but f ′ (x) does not exist. ✓ Points x such that x ∈ (a, b) ⊆ D, and f ′ (x) = 0. ◁ Find the maximum of the function f among the candidate points. If the maximum of f over the original set X exists, you have found it. ◁ If the existence of the maximum of f over the original set X is not proven, argue why (or why not) the function f attains maximum at the point(s) that you have found. 30 Maximising a differentiable function over a closed interval One special case is when X = [a, b] ⊆ D, and the function f is differentiable (and, hence, continuous) on its domain D. In this case, our algorithm looks as follows: ◁ Find all points x ∈ (a, b) such that f ′ (x) = 0. Let us denote this set by A. ◁ The set of candidate points is then A ∪ {a, b}. Thus, candidate points are all points at which f ′ (x) = 0 and the boundaries a, b of the interval [a, b]. ◁ Lastly, find arg maxf (x) = arg max f (x), max f (x) = max f (x) x∈[a,b] x∈A∪{a,b} x∈[a,b] x∈A∪{a,b} In other words, we only need to maximise f over a small set of candidate points A ∪ {a, b}. A typical mistake. When solving the equation f ′ (x) = 0, you can find x ̸∈ [a, b]. This is NOT a candidate point. 31 Extra Slides Existence of the inverse function Theorem L6.E1. Given a function f : D → R, there exists its inverse f −1 : R → D if and only if the following two properties hold: 1. For each z ∈ R there is an x ∈ D such that f (x) = z. 2. For each x, y ∈ D, if x ̸= y then f (x) ̸= f (y ). Proof (only if part). Suppose that there is an inverse function f −1. To prove property 1, take any z ∈ R. Note that f −1 (z) ∈ D, and f (f −1 (z)) = z, thus property 1 holds. Assume now that x, y ∈ D and f (x) = f (y ). Then x = f −1 (f (x)) = f −1 (f (y )) = y , proving property 2. 32 Existence of the inverse function Theorem L6.E1. Given a function f : D → R, there exists its inverse f −1 : R → D if and only if the following two properties hold: 1. For each z ∈ R there is an x ∈ D such that f (x) = z. 2. For each x, y ∈ D, if x ̸= y then f (x) ̸= f (y ). Proof (if part). Suppose that properties 1 and 2 hold. Define function h : R → D as follows: h(z) = x such that f (x) = z. Note that h is well-defined, since by property 1, such x always exists for any z ∈ R, and by property 2, such x is unique. Consider arbitrary x ∈ D. By the definition of h, h(f (x)) = x. Consider arbitrary z ∈ R. By property 1, there is x ∈ D such that f (x) = z. Since h(f (x)) = x, then h(z) = x, hence f (h(z)) = z. Thus, the function h is the inverse of the function f. 33 Optimization problem examples Consider f (x) = 12 x 2 , X = [− 52 , 2]. x2 = x 2 = {− 25 } (︀ 1 )︀ 25 (︀ 1 )︀ max 2 8 arg max 2 x∈[− 52 ,2] x∈[− 52 ,2] 34 Optimization problem examples Consider f (x) = 12 x 2 , X = [− 52 , −1]. x2 = x 2 = {− 52 } (︀ 1 )︀ 25 (︀ 1 )︀ max 2 8 arg max 2 x∈[− 52 ,−1] x∈[− 25 ,−1] 35 Optimization problem examples Consider f (x) = 12 x 2 , X = (−2, 2). x2 x2 = ∅ (︀ 1 )︀ (︀ 1 )︀ max 2 does not exist arg max 2 x∈[−2,2] x∈(−2,2) 36 Optimization problem examples Consider f (x) = 12 x 2 , X = (− 25 , 2). x2 x2 = ∅ (︀ 1 )︀ (︀ 1 )︀ max 2 does not exist arg max 2 x∈(− 52 ,2) x∈(− 52 ,2) 37 Optimization problem examples Consider f (x) = 12 x 2 , X = (− 25 , −1). x2 x2 = ∅ (︀ 1 )︀ (︀ 1 )︀ max 2 does not exist arg max 2 x∈(− 52 ,−1) x∈(− 52 ,−1) 38 Optimization problem examples Consider f (x) = − 12 x 2 , X = [−2, 2]. x2 = 0 x 2 = {0} (︀ 1 )︀ (︀ 1 )︀ max 2 arg max 2 x∈[−2,2] x∈[−2,2] 39 Optimization problem examples Consider f (x) = − 12 x 2 , X = [− 52 , 2]. (︀ 1 2 )︀ arg max − 21 x 2 = {0} (︀ )︀ max −2x = 0 x∈[− 52 ,2] x∈[− 52 ,2] 40 Optimization problem examples Consider f (x) = − 12 x 2 , X = [− 52 , −1]. (︀ 1 2 )︀ − 2 x = − 12 arg max − 21 x 2 = {−1} (︀ )︀ max x∈[− 52 ,−1] x∈[− 52 ,−1] 41 Optimization problem examples Consider f (x) = − 12 x 2 , X = (−2, 2). x2 = 0 x 2 = {0} (︀ 1 )︀ (︀ 1 )︀ max 2 arg max 2 x∈(−2,2) x∈(−2,2) 42 Optimization problem examples Consider f (x) = − 12 x 2 , X = (− 25 , 2). (︀ 1 2 )︀ arg max − 12 x 2 = {0} (︀ )︀ max −2x = 0 x∈(− 52 ,2) x∈(− 25 ,2) 43 Optimization problem examples Consider f (x) = − 12 x 2 , X = (− 25 , −1). (︀ 1 2 )︀ arg max − 12 x 2 = ∅ (︀ )︀ max − 2 x does not exist x∈(− 52 ,−1) x∈(− 52 ,−1) 44 Special case: maximising a linear function over closed interval Consider a linear function f : R → R given by f (x) = cx + d where c, d are some real numbers, and X = [a, b] is a closed interval of real numbers, where a < b. Case 1: Example. Let f (x) = 3x − 5, and [a, b] = [−1, 10]. Then arg max(3x − 5) = {10} x∈[−1,10] max (3x − 5) = f (10) = 3 · 10 − 5 = 25 x∈[−1,10] 45 Special case: maximising a linear function over closed interval Consider a linear function f : R → R given by f (x) = cx + d where c, d are some real numbers, and X = [a, b] is a closed interval of real numbers, where a < b. Case 2: c < 0. Then, the function f is strictly decreasing. In particular, for any x > a, we have f (x) = ⏟cx⏞ + d < ca + d = f (a) a cannot be a maximiser of the function f over [a, b]. What about the point x = a? As we can see, f (a) > f (x) for all x ∈ (a, b]. Also, f (a) ≥ f (a). Therefore, f (a) ≥ f (y ) for all y ∈ [a, b]. We conclude that for c < 0, arg max f (x) = {a}, max f (x) = f (a) = ca + d x∈[a,b] x∈[a,b] 46 Special case: maximising a linear function over closed interval Consider a linear function f : R → R given by f (x) = cx + d where c, d are some real numbers, and X = [a, b] is a closed interval of real numbers, where a < b. Case 2: Example. Let f (x) = −2x − 5, and [a, b] = [−1, 10]. Then arg max(−2x − 5) = {−1} x∈[−1,10] max (−2x − 5) = f (−1) = −2 · (−1) − 5 = −3 x∈[−1,10] 47 Special case: maximising a linear function over closed interval Consider a linear function f : R → R given by f (x) = cx + d where c, d are some real numbers, and X = [a, b] is a closed interval of real numbers, where a < b. Case 3: the function f is constant. c = 0. Then, f (x) = f (y ) = d for any x, y ∈ [a, b]. In particular, for all x ∈ [a, b] we have f (x) ≥ f (y ) for all y ∈ [a, b]. Therefore, arg max f (x) = [a, b], max f (x) = d x∈[a,b] x∈[a,b] Remark. If f is a constant function; that is, f (x) = d for all x ∈ R, then for any set X , we have arg max f (x) = X , max f (x) = d x∈X x∈X 48 Special case: maximising a linear function over closed interval Putting the results of the analysis done for all 3 cases together, we get: ⎧ ⎪ ⎪ {b} if c>0 ⎨ arg max (cx + d) = [a, b] if c=0 x∈[a,b] ⎪ ⎪ ⎩ {a} if c0 ⎨ max (cx + d) = d if c=0 x∈[a,b] ⎪ ⎪ ⎩ ca + d if c