0% found this document useful (0 votes)
4 views

Note_2 Math Camp

This document discusses the concept of differentiability in mathematics, focusing on both univariate and multivariate real-valued functions. It introduces key concepts such as Taylor's expansion, the chain rule, and the definitions of partial and directional derivatives. The material emphasizes the importance of differentiability for optimization and comparative statics in economic models.

Uploaded by

Kyamba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Note_2 Math Camp

This document discusses the concept of differentiability in mathematics, focusing on both univariate and multivariate real-valued functions. It introduces key concepts such as Taylor's expansion, the chain rule, and the definitions of partial and directional derivatives. The material emphasizes the importance of differentiability for optimization and comparative statics in economic models.

Uploaded by

Kyamba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Natalia Lazzati

Mathematics for Economics


Note 2: Differential Calculus

Note 2 is based on de la Fuente (2000, Ch. 4) and Simon and Blume (1994, Ch. 14).

This note introduces the concept of di¤erentiability and discusses some of its main implica-
tions. We start with real-valued functions of only one argument, and then extend the notion of
di¤erentiability to multivalued functions: The key to the extension lies in the interpretation of
di¤erentiability in terms of the existence of a "good" linear approximation to a function around
a point. We also show that important aspects of the local behavior of "su¢ ciently di¤eren-
tiable" functions are captured accurately by linear or quadratic approximations. The material
has important applications to optimization and comparative statics.

Di¤erentiability of Univariate Real-Valued Functions

Di¤erentiability and Taylor’s Expansion

Let f be a univariate real-valued function, f : R ! R: The concept of di¤erentiability relates to


the notion of slope of a function at a point x: Given a second point y in the domain of f , the
di¤erence quotient [f (y) f (x)] = (y x) gives the slope of a secant to the function through the
points [x; f (x)] and [y; f (y)] : As we take points y closer and closer to x; the secant becomes a
better approximation to the tangent to the graph of f at the point [x; f (x)], and in the limit the
two coincide. Thus, we can de…ne the derivative of f at x as the limit

f (y) f (x) f (x + h) f (x)


f 0 (x) = limy!x = limh!0 with h 2 R
y x h

whenever it exists, and we can interpret it as the slope of the function at this point.

De…nition 1. (Derivative of a univariate function) Let f : R ! R. We say that f is


di¤erentiable at a point x if the following limit exists

f (x + h) f (x)
limh!0 with h 2 R:
h

1
When it does exist, we say the value of the limit is the derivative of f at x, written f 0 (x), Df (x)
or Dx f (x) : If f is di¤erentiable at each point in its domain, we say the function is di¤erentiable.
The value of di¤erentiable functions around some initial point can be nicely approximated
through Taylor’s expansion.

Theorem 2. (Taylor’s formula for univariate functions) Let f : R ! R be n times


di¤erentiable. For all x and x + h in the real line we have
Xn 1 f (k) (x) k
f (x + h) = f (x) + h + Rn (h)
k=1 k!

where f (k) (x) is the kth derivative of f evaluated at x, and the remainder or error term Rn (h)
is of the form
f (n) (x + h) n
Rn (h) = h
n!
for some 2 (0; 1). That is, remainder has the same form as the other terms except that the nth
derivative is evaluated at some point between x and x + h:

Proof. Put y = x + h and de…ne the function F (z) for z between x and y by
Xn 1 f (k) (z)
F (z) = f (y) f (z) (y z)k :
k=1 k!

Then the theorem says that for some point x + (y x) between x and y

f (n) [x + (y x)]
F (x) = (y x)n :
n!

First, observe that F (y) = 0 and that most terms in


" #
Xn 1 f (k) (z) f (k+1) (z)
F 0 (z) = f 0 (z) k (y z)k 1 ( 1) + (y z)k
k=1 k! k!
" #
Xn 1 f (k+1) (z) k f (k) (z) k 1
0
= f (z) (y z) k (y z)
k=1 k! k!

cancel, leaving us with


f (n) (z)
F 0 (z) = (y z)n 1
: (1)
(n 1)!
Next we de…ne the function
n
y z
G (z) = F (z) F (x)
y x

2
and observe that G is a continuous function on the open interval (x; y) ; with

G (y) = F (y) 0 = 0 = F (x) F (x) = G (x)

and
n 1
0 0 y z 1
G (z) = F (z) n F (x) : (2)
y x y x
By Rolle’s Theorem (see SB, p. 824), there exists some 2 (0; 1) such that

G0 [x + (y x)] = 0:

Expanding that expression using (1) and (2), we get


n 1
y x (y x) 1
0 = G0 [x + (y x)] = F 0 [x + (y x)] + n F (x)
y x y x
n 1
f (n) [x + (y x)] (1 ) (y x) 1
=) [y x (y x)]n 1
=n F (x)
(n 1)! y x y x
f (n) [x + (y x)] 1
=) [(1 ) (y x)]n 1
= n (1 )n 1
F (x)
(n 1)! y x
f (n) [x + (y x)]
=) (y x)n = F (x)
n!
which is the desired result.

Taylor’s theorem gives us a formula for constructing a polynomial approximation to a di¤er-


entiable function. If we let n = 2, and omitting the remainder, we get

f (x + h) = f (x) + f 0 (x) h: (3)

The di¤erentiability of f implies that the error term will be small. Hence the linear function in
the right-hand side of (3) is guaranteed to be a decent approximation to f near x. Higher-order
approximations that use more derivatives will be even better.

The Chain Rule

Let g and h be two real-valued functions on R, the function formed by …rst applying function
g to any number x and then applying function h to the result g (x) is called the composition of
functions g and h and is written as

f (x) = h [g (x)] or f (x) = (h g) (x) :

3
Example 1. The functions which describe a …rm’s behavior, such as its pro…t function ; are
usually written as functions of a …rm’s output y. If one wants to study the dependence of a
…rm’s pro…t on the amount of an input x it uses, one must compose the pro…t function with the
…rm’s production function y = f (x). The latter function tells us how much output y the …rm
can obtain from x units of the given input. The result is a function

F (x) [f (x)] :

For instance, if (y) = y 4 + 6y 2 5 and f (x) = 5x2=3 , then

F (x) [f (x)] = 625x8=3 + 150x4=3 5:

Notice that we use di¤erent names for and F as their arguments are di¤erent. N

The derivative of a composite function is obtained as the derivative of the outside function
(evaluated at the inside function) times the derivative of the inside function. This general form
is called the Chain Rule.

Theorem 3. (Chain Rule for univariate functions) Let g and h be two real-valued di¤er-
entiable functions on R; and de…ne f (x) = h [g (x)] : Then

df
(x) = h0 [g (x)] g 0 (x) :
dx

Example 2. Consider the model in Example 1. By using the Chain Rule we get
n o 10
0
[f (x)] f 0 (x) = 4 [f (x)]3 + 12 [f (x)] x 1=3
3
3 10 1=3
= 4 5x2=3 + 12 5x2=3 x
3
10 1=3
= 500x2 + 60x2=3 x
3
5000 5=3
= x + 200x1=3 :
3

Note that the latter is equivalent to the derivative of F with respect to x

5000 5=3
F 0 (x) = x + 200x1=3 :
3

This result corroborates the claim in Theorem 3. N

4
Di¤erentiability of Multivariate Real-Valued Functions

In this section we study di¤erentiability of functions from Rn into R: We build this concept on
the results derived for real-valued univariate functions.

Partial and Directional Derivatives

To extend the previous concept of di¤erentiability to functions of n variables we need to specify


the direction along which we are approaching x. The problem did not appear before as we can
only approach x from either the left or the right, and the derivative of the univariate function f at
x is de…ned as the common value of both one-sided limits whenever they coincide. In multivariate
functions however we can approach a point from an in…nite number of directions, and therefore we
have to specify the one we are considering. This observation leads us to the concept of directional
derivative, that we formalize next.

De…nition 4. (Directional derivative) The directional derivative of f : Rn ! R in the


direction of v at the point x is de…ned by

f (x + hv)
limh!0 with h 2 R and kvk = 1
h

whenever this limit exists.

Directional derivatives in the direction of the coordinate axes are of special interest. The
partial derivative of f with respect to its ith argument is de…ned as

f (x + hei )
limh!0 with h 2 R
h

where ei is a vector whose components are all zero except for the ith one, which is 1.

De…nition 5. (Partial derivative) Let f be a multivariate function f : Rn ! R: The partial


derivative of f with respect to its ith argument, xi , at a point x, is the limit

@f (x) f (x1 ; :::; xi + h; :::; xn ) f (x1 ; :::; xi ; :::; xn )


= limh!0 with h 2 R
@xi h

whenever it exists. [Other usual ways to write @f (x) =@xi are Dxi f (x) and fxi (x) :]

5
Example 3. Let us consider the function f (x1 ; x2 ) = x21 x2 : Its partial derivatives are

@f1 @f1
(x1 ; x2 ) = 2x1 x2 and (x1 ; x2 ) = x21 :
@x1 @x2

[Calculate the partial derivatives for the function g (x1 ; x2 ) = x1 x2 :] N

Let f : Rn ! R, then each one of its partial derivatives @f (x) =@xi is also a real-valued
function of n variables and the partials of @f (x) =@xi can be de…ned as before. The partials of
@f (x) =@xi ; for i = 1; :::; n; are the second-order partial derivatives of f:

Di¤erentiability and the Taylor’s Expansion

The main objective is to de…ne a concept of di¤erentiability for multivariate functions f : Rn ! R:


We will de…ne di¤erentiability in terms of the possibility of approximating the local behavior of
f through a linear function. After doing this, we will relate the concept of di¤erentiability to the
partial derivatives of f ; that we de…ned in the last sub-section.
Let us think for a moment in the de…nition of derivative for a function f : R ! R: To say f
is di¤erentiable at x, is the same as to say that there exists a real number ax ; that we de…ne as
f 0 (x), such that
f (x + h) [f (x) + ax h]
limh!0 = 0. (4)
h
To interpret this result let us assume that we want to approximate the value of f (x + h) by
a linear function. One possibility is to use f (x) + f 0 (x) h: Expression (4) guarantees that the
approximation will be good whenever h is small. [If we de…ne E (h) = f (x + h) [f (x) + ax h]
as the error of the linear approximation, then condition (4) ensures limh!0 E (h) =h = 0:]
There is no di¢ culty in extending this notion of di¤erentiability to mappings from Rn to R:
Before giving a formal de…nition, we want to emphasize the importance of di¤erentiability for
our purposes:

Because di¤erentiable functions admit good linear approximations, so do di¤eren-


tiable models. This gives us a tractable way to analyze them. When we use calculus
to study a nonlinear model, we are in fact constructing a linear approximation to
it in some neighborhood of a point of interest. The assumption that the behavioral
functions in the model are di¤erentiable means that the approximation error is small.

6
The obvious limitation is that it generally yields only local results, valid only in some
small neighborhood of the initial solution.

The formal de…nition of di¤erentiability is as follows.

De…nition 6. (Di¤erentiability of multivariate functions) A function f : Rn ! R is


di¤erentiable at x if there exists a vector ax in Rn such that

f (x + h) f (x) + aTx h
limkhk!0 =0 (5)
khk
qP
n 2
where h 2 Rn and k k is the Euclidean norm of a vector, kxk = i=1 (xi ) . If f is di¤erentiable
at every point in its domain, we say that f is di¤erentiable.

If f is di¤erentiable, then we can de…ne its derivative as the function

Dx f : Rn ! ax

that goes from Rn to an n-dimensional vector ax : When it is clear from the context that we are
di¤erentiating with respect to the vector x we will write Df instead of Dx f:
It is apparent now that we can, as in the case of a univariate real-valued function, interpret the
di¤erential in terms of a linear approximation to f (x + h). That is, we can consider f (x) + aTx h
as a linear approximation of f (x + h). Expression (5) guarantees that the approximation will
be good whenever h is small. [If we de…ne E (h) = f (x + h) f (x) + aTx h as the error of the
linear approximation, then condition (4) ensures limkhk!0 jE (h)j = khk = 0:]
The derivative of f at x, Df (x), relates to the partial derivatives of f at x in a natural way.
If f : Rn ! R is di¤erentiable at x then the derivative of f at x is the vector of partial derivatives
h i
Df (x) = Dx f (x) = @f @f @f
@x1 (x) @x2 (x) ::: @xn (x)

that we often call Jacobian of f (evaluated) at x:


Moreover, the di¤erentiability of f is guaranteed if its partial derivatives exist and are smooth.
If the n partial derivatives of a function f : Rn ! R exist and are themselves continuous functions
of (x1 ; :::; xn ), we say that f is continuously di¤erentiable or C 1 : An important result in calculus
states that if f is C 1 , then f is di¤erentiable [see de la Fuente (2000), pp. 172-175].

7
Example 4. Consider the function f (x1 ; x2 ) = x21 x2 in Example 3. In this case,

Df (x1 ; x2 ) = 2x1 x2 x21 :

[Calculate the same concept for the function g (x1 ; x2 ) = x1 x2 :] N

The partials of @f (x) =@xi ; for i = 1; :::; n; are the second-order partial derivative of f that
we identify by
0 1
@2f @2f @2f
B @x21
(x) @x2 @x1 (x) ::: @xn @x1 (x) C
B @2f @2f @2f
C
B (x) (x) ::: C
B @x1 @x2 @x22 @xn @x2 (x) C
D2 f (x) = Dx2 f (x) = B .. .. .. C:
B .. C
B . . . . C
@ A
@2f @2f 2
@ f
@x1 @xn (x) @x2 @xn (x) ::: @x2
(x)
n

This is an n n matrix, often called Hessian matrix of f (evaluated) at x: If all these n2


partial derivatives exist and are themselves continuous functions of (x1 ; :::; xn ) ; we say that f
is twice continuously di¤erentiable or C 2 : Young’s theorem states that if f is twice continuously
di¤erentiable, then D2 f (x) is a symmetric matrix.

Theorem 7. (Young’s theorem) Assume a function f : Rn ! R is C 2 on an open subset


U Rn : Then, for all x 2 U and all i; j = 1; :::; n;

@2f @2f
(x) = (x) :
@xi @xj @xj @xi

[Check Young’s theorem with the function f1 (x1 ; x2 ) = x21 x2 in Example 3.]
Taylor’s formula can be generalized to the case of a real-valued function of n variables. Because
the notation gets messy, and we will only use the simplest case, we will state the following theorem
for the case of a …rst order approximation with a quadratic form remainder.

Theorem 8. (Taylor’s formula for multivariate functions) Let f : Rn ! R be a C 2


function. If x and x + h are in Rn , then

f (x + h) = f (x) + Df (x) h + (1=2) hT D2 f (x + h) h

for some 2 (0; 1) :

We will use Theorem 8 to prove the su¢ cient conditions for maxima in optimization problems.

8
The Chain Rule

In many cases we are interested in the derivatives of composite functions. The following result
says that the composition of di¤erentiable functions is di¤erentiable, and its derivative is the
product of the derivatives of the original functions.

Theorem 9. (Chain rule for multivariate functions) Let g and h be two functions with

g : Rn ! R and h : R ! R

and de…ne f (x) = h [g (x)] or f (x) = (h g) (x) with f : Rn ! R: If g and h are di¤erentiable,
then f = h g is di¤erentiable and

Df (x) = Dh [g (x)] Dg (x) :

Proof. See de la Fuente (2000), pp. 176-178. (They provide a proof for a result that is more
general than the statement in Theorem 9.)

The next example sheds light on the implementation of the last result.

Example 5. Let f (x1 ; x2 ) = (x1 x2 )2 . We want to use the Chain Rule to …nd @f =@x1 and
@f =@x2 . To this end, let us de…ne

g (x1 ; x2 ) = x1 x2 and h (y) = y 2 :

Notice that f (x1 ; x2 ) = (h g) (x1 ; x2 ) : By the Chain Rule we have that

Df (x1 ; x2 ) = Dh [g (x1 ; x2 )] Dg (x1 ; x2 )

= 2g (x1 ; x2 ) x2 x1

= 2x1 x2 x2 x1

= 2x1 x22 2x21 x2 :

[Check the result directly, by di¤erentiating f (x1 ; x2 ) with respect to x1 and x2 .] N

9
Di¤erentiability of Functions from Rn into Rm

We now turn to the general case where f : Rn ! Rm is a function of n variables whose value is
a vector of m elements. As we learned in Note 1, we can think of the mapping f as a vector of
component functions fi , each of which is a real-valued function of n variables

f = (f1 ; f2 ; :::; fm )T with fi : Rn ! R for i = 1; :::; m:

Thinking in this way, the extension is trivial (although the notation becomes messier!).

De…nition 10. (Di¤erentiability of functions of Rn to Rm ) A function f : Rn ! Rm is


di¤erentiable at x if there exists a matrix Ax such that

kf (x + h)
[f (x) + Ax h]k
limkhk!0 =0 (6)
khk
qP
n n 2
where h 2 R and k k is the Euclidean norm of a vector, kxk = i=1 (xi ) . If f is di¤erentiable

at every point in its domain, we say that f is di¤erentiable.

If f is di¤erentiable, then we can de…ne its derivative as the function

Df = Dx f : Rn ! Ax

that goes from Rn to an m n matrix Ax :


Here again, the derivative of f at x, Df (x), relates to the partial derivatives of f at x: If
f : Rn ! Rm is di¤erentiable at x; then the derivative of f at x is the matrix of partial derivatives

0 1 0 1
@f1 @f1 @f1
Df1 (x) @x1 (x) @x2 (x) ::: @xn (x)
B C B C
B C B @f2 @f2 @f2 C
B Df2 (x) C B (x) (x) ::: (x) C
Df (x) = Dx f (x) = B C=B C:
@x1 @x2 @xn
B .. C B .. .. .. .. C
B . C B . . . . C
@ A @ A
@fm @fm @fm
Dfm (x) @x1 (x) @x2 (x) ::: @xn (x)

that we often call Jacobian matrix of f (evaluated) at x: If the partial derivatives of the component
functions f1 ; f2 ; :::; fm exist and are continuous, then f is di¤erentiable [see de la Fuente (2000),
pp. 172-175].

10
Example 6. Consider the functions f1 (x1 ; x2 ) = x21 x2 and f2 (x1 ; x2 ) = ln (x1 + x2 ) : Its partial
derivatives are

@f1 @f1 @f2 1 @f2 1


(x1 ; x2 ) = 2x1 x2 , (x1 ; x2 ) = x21 , (x1 ; x2 ) = and (x1 ; x2 ) = :
@x1 @x2 @x1 x1 + x2 @x2 x1 + x2

Therefore,

1 1
Df1 (x1 ; x2 ) = 2x1 x2 x21 and Df2 (x1 ; x2 ) = x1 +x2 x1 +x2
:

If we let f = (f1 ; f2 )T , then 0 1


2x1 x2 x21
Df (x) @ A:
1 1
x1 +x2 x1 +x2

[Calculate the same concepts for the functions g1 (x1 ; x2 ) = x1 x2 and g2 (x1 ; x2 ) =
ln (2x1 + 3x2 ) :] N

The following result states again that the composition of di¤erentiable functions is di¤eren-
tiable, and its derivative is the product of the derivatives of the original functions.

Theorem 9. (Chain rule for multivariate functions) Let g and h be two functions with

g : Rn ! Rm and h : Rm ! Rp

and de…ne f (x) = h [g (x)] or f (x) = (h g) (x) with f : Rn ! Rp : If g and h are di¤erentiable,
then f = h g is di¤erentiable and

Df (x) = Dh [g (x)] Dg (x) :

Proof. See de la Fuente (2000), pp. 176-178.

The last example applies the Chain Rule to a case where n = m = 3 and p = 1.

Example 7. Let l = xy 2 z; with

x = r + t; y = s and z = s + t:

We want to use the Chain Rule to address @l=@r, @l=@s and @l=@t:

11
Let us de…ne g = (g1 ; g2 ; g3 )T ; with gi : R3 ! R for i = 1; 2; 3; as follows

g1 (r; s; t) = r + t

g2 (r; s; t) = s

g3 (r; s; t) = s + t:

Then g : R3 ! R3 : In addition, let h : R3 ! R be de…ned as h (x; y; z) = xy 2 z: Then l =


f (r; s; t) = h [g (r; s; t)]. Notice that
0 1
1 0 1
B C
B C
Dg (r; s; t) = B 0 1 0 C , g (r; s; t) = r+t s s+t
@ A
0 1 1

Dh (x; y; z) = y 2 z 2xyz xy 2 :

It follows that
h i
Dh [g (r; s; t)] = s2 (s + t) 2 (r + t) s (s + t) (r + t) s2 :

By the Chain Rule

Df (r; s; t) = Dh [g (r; s; t)] Dg (r; s; t)


0 1
1 0 1
h iB C
B C
= s2 (s + t) 2 (r + t) s (s + t) (r + t) s2
B 0 1 0 C
@ A
0 1 1
h i
= s2 (s + t) s (r + t) (3s + 2t) s2 (r + s + 2t) :

[Check the result directly, by obtaining an expression for l = f (r; s; t) in terms of r; s


and t and taking the partial derivatives.] N

12

You might also like