Maths
Maths
Denition of Derivative
We say that a function f is dierentiable at x if
f (x + h) − f (x)
f 0 (x) = lim .
h→0 h
If f is dierentiable for all x in its domain, then we say f is a dierentiable function.
Example:
Find the derivative of f (x) = x2 .
(x + h)2 − x2 0 x2 + 2xh + h2 − x2 2xh
f 0 (x) = lim f (x) = lim = lim = 2x
h→0 h h→0 h h→0 h
Derivative Rules
Assume k is an arbitrary constant, and that the two functions u(x) and v(x) are dierentiable. Then the
following rules hold:
1. Addition Rule
d du dv
(u(x) + v(x)) = +
dx dx dx
2. Multiplicative Constant Rule
d du
(k · u(x)) = k ·
dx dx
3. Product Rule
d du dv
(u(x) · v(x)) = · v(x) + · u(x)
dx dx dx
4. Quotient Rule
du dv
· v(x) − dx · u(x)
d u(x) dx
= 2
dx v(x) v(x)
5. Power Rule
d
xk = k · xk−1
dx
Leibnitz's Rule
In order to dierentiate under a denite integral, we use Leibniz Rule,
Z b(z) Z b(z)
∂ ∂f ∂b ∂a
f (x, z)dx = dx + f [b(z), z] − f [a(z), z]
∂z a(z) a(z) ∂z ∂z ∂z
Example:
Find the derivative of x2 y 2 dx with respect to y .
R1
0
Z 1 Z 1
∂
x2 y 2 dx = 2x2 ydx
∂y 0 0
Example:
Find the derivative of 2y x y dx with respect to y .
R 3y 2 2
Z 3y Z 3y
∂
x2 y 2 dx = 2x2 ydx + (3y)2 y 2 · 3 − (2y)2 y 2 · 2
∂y 2y 2y
1
Derivatives of a Single Function of Several Variables
Partial Derivative
Let f be a function of many variables. The partial derivative of f with respect to x, denoted ∂f ∂x or fx ,
is the function obtained by dierentiating f with repect to x and treating all other variables as constants.
Rigorously, this is
f (x + h, y, z) − f (x, y, z)
fx (x, y, z) = lim
h→0 h
Example:
Let f (x, y) = x2 y 3 . Then
∂f
= 2xy 3
∂x
Example:
Let f (x, y) = x2 y 3 . Then
∂2f
= 2y 3
∂x2
∂2f
= 6x2 y
∂y 2
∂2f
= 6xy 2
∂x∂y
∂2f
= 6xy 2
∂y∂x
Notice that ∂2f
∂x∂y = ∂2f
∂y∂x .
2
The Total Derivative or Gradient
The total derivative is merely a vector containing all of the partial derivatives of a function,
F (x + h, y, z) − f (x, y, z) F (x, y + j, z) − f (x, y, z) F (x, y, z + l) − f (x, y, z)
DF (x, y, z) = lim , lim , lim
h→0 h j→0 h l→0 h
Or, in dierent notation,
∂F ∂F ∂F
DF (x, y, z) = , ,
∂x ∂y ∂z
The transpose of this vector, evaluated at a specic point a = (x∗ , y ∗ , z ∗ ) is called the gradient of F at a, or
∇F (a).
Example:
Let f (x, y) = x2 y 3 , and a = (1, 2). Then
2xy 3
∇f =
3x2 y 2
and
16
∇f (a) =
12
Chain Rule
Let x(t) = (x1 (t), . . . , xn (t)). Also, let f be some function of x(t). Then
df ∂f dx1 ∂f dxn
(x(t)) = · + ... + · .
dt ∂x1 dt ∂xn dt
Example:
Let K (capital stock) and L (labor stock) be functions of time, such that dK
dt = sY − δK and dL
dt = nL. If
Y = K α L1−α , what is dY
dt ?
dY ∂Y dK ∂Y dL
= · + ·
dt ∂K dt ∂L dt
3
1−α
α
dY L K
=α · (sY − δK) + (1 − α) · nL
dt K L
( " # )
1−α
dY L
= α s − δ + (1 − α) n · Y
dt K
Directional Derivatives
Assume a function f (x), where x = (x1 , . . . , xn ) is a point in Rn . Now let there be a vector v = (v1 , . . . , vn ),
and a parameter t. The point of a directional derivative is to see how the value of the function f (x) changes
as we move along the vector v from the original point x. A line can be drawn from x along v in Rn
by constructing a point x + t · v, and allowing t to vary. Dene a new function g(t) = f (x + t · v) =
f (x1 + t · v1 , . . . , xn + t · vn ), and derivate it with respect to t,
dg ∂f ∂f
= (x1 + t · v1 , . . . , xn + t · vn ) · v1 + . . . + (x1 + t · v1 , . . . , xn + t · vn ) · vn .
dt ∂x1 ∂xn
Since we are interested in the change of f at the original point x, we let t = 0 to get
dg ∂f ∂f 0
(0) = (x1 , . . . , xn ) · v1 + . . . + (x1 , . . . , xn ) · vn = [∇f (x)] · v.
dt ∂x1 ∂xn
This is the directional derivative. It is merely the dot product of the total derivative at x with the vector v.
Other notiations are DFx · v or ∂F ∂v (x).
Level Sets
Consider a function F (x) with x = (x1 , . . . , xn ). A level set is the set of all x's such that F (x) = c, where c is
some specied constant. For example, indierence curves are level sets, as are isoquant curves. We will talk
more about level sets when we discuss the Implicit Function Theorem, quasi-concavity, and upper contour
sets.
How do we interpret ∂F
∂x1 ? Since F is actually m functions, we say that
∂f1
∂x1
∂F ..
= .
∂x1
∂fm
∂x1
4
where x∗ is a particular value of x = (x1 , . . . , xn ).
Example:
Find the Jacobian of the following system:
X
W =
Y
V = XY
Notice that
1 X
DW = ( ,− 2)
Y Y
and
DV = (Y, X),
so the Jacobian is 1
− YX2
Y .
Y X
Homework
Dierentiate the following:
1. f (x) = x2 + 3x − 4
2. y = x− 3
2
3. g(x) = x2 + x−3
4. y = x2 +4x+3
√
x
5. f (x) = x2 ex
6. V (x) = (2x + 3) x4 − 2x
7. f (x) = x
c
x+ x
8. F (y) = 1 3
y2 − y4 y + 5y 3
√
9. y = e x
10. y = eax
2
+bx+c
11. y = ln(t + 9)
12. y = ln(x) − ln(1 + x)
R ex
13. Dierentiate x
2xexy dy with respect to x
In 1st semester micro, you will solve general equilibrium models. Sometimes when solving these models it
is useful to see if utility functions are concave. One way of testing for concavity involves calculating the
function's Hessian. Find the Hessian matrices of the following utility functions (these functions were used
in last year's homeworks and tests):
2√ 1√
1. (Core Exam) U (x1 , x2 ) = 3 x1 + 3 x2
5
3. (Second Midterm Exam) U (x1 , x2 ) = 13 ln(x1 ) + 23 ln(x2 )
4. (Homework problem) U (x1 , x2 , x3 ) = − x11 + x2 − δ x13
The Slutsky Equation breaks changes in demand into income eects and substitution eects. Last semester
for one of the homework problems, we were asked to calculate the Slutsky equation to nd the substitution
eect and the income eect. In the problem, the utility function was the same as in question 3 above, and
it can be shown that the direct demand functions are
w
x1 (p1 , p2 , w) =
3p1
2w
x2 (p1 , p2 , w) =
3p2
Let the function x(p, w) : R3 → R2 be the combined demand function, where p = (p1 , p2 ). The Slutsky
equation is as follows:
Dp x + Dw x · x0 = Dp v,
where the subscripts denote which derivative it is respect to (Note: these are total derivatives, not directional
derivatives). Find Dp x (the total eect), Dw x·x0 (the wealth eect), and Dp v (the substitution eect). Hint:
Dp x is a 2 × 2 matrix, Dw x is 2 × 1, and x is 2 × 1. This involves matrix multiplication, something we
haven't covered yet, but that you should already know.
If the graph of a function F : R3 → R1 lives in R4 , in which space does the gradient ∇F live?
In 1st semester econometrics, you will be asked to integrate probability density functions (or p.d.f.s) in order
to nd the probability that certain events will occur. Sometimes it is necessary to transform the random
variables. In order to do so, the Jacobian must be computed.
Assume and X1 and X2 are random variables with a known p.d.f. However, we are interested in nding
the distributions of
X1
Y1 =
X2
Y2 = X1 X2 .
We can transform this system so that we solve for the X 's as a function of the Y 's, and then use the known
p.d.f. of the X 's to calculate the densities of the Y 's. Conrm that the new system can be written as
p
X1 = Y1 Y2
r
Y1
X2 = ,
Y2
and then calculate the Jacobian matrix of this system.