Differentiation
Differentiation
Differentiation
c 0
x 1
xa axa -1 (x > 0)
cf(x) cf ′(x)
d
f ( x) g( x) = f ¢( x) g( x) + f ( x) g ¢( x)
dx
f(x) g(x)
Example 3x - 1
y=
x 2 + 5x
dy 3( x 2 + 5x ) - (3x - 1)(2 x + 5)
=
dx ( x 2 + 5x ) 2
- 3x 2 + 2 x + 5
=
( x 2 + 5x ) 2
Differentiation Rules
The Chain Rule
d
g[ f ( x )] = g ¢[ f ( x )] f ¢( x )
dx
Example: y = (x2 + 1)3
Let y = g(z) = z3, z = f(x) = x2 + 1
y = g(f(x) = (f(x))3 = (x2 + 1)3
dy/dx = 3z2(2x)
= 3(x2 + 1)2(2x)
= 6x(x2 + 1)
Differentiation Rules
The Chain Rule in Leibniz notation:
y = g ( z), z = f ( x )
dy dy dz
=
dx dz dx
d f ¢( x )
ln f ( x ) =
dx f ( x)
Example: y = ln (x + 2)
dy/dx = 1/(x + 2)
Example: y = ln (x2 + 2)
dy/dx = 2x/(x2 + 2)
Special case: y = ln x
dy/dx = 1/x
Differentiation Rules
n Derivative of the Natural Exponential
Function
d f ( x)
e = e f ( x ) f ¢( x )
dx
Example: y = e1− 5t
dy/dt = e1− 5t(− 5) = −5e1− 5t
Differentiation Rules
n Derivative of the Sine Function
d
sin x = cos x
dx
Example: y = sin2 x
dy/dx = 2(sin x)(cos x)
Example: y = sin(x2)
Let u = x2 so that y = sin u, u = x2.
By the Chain Rule:
dy/dx = (dy/du)(du/dx) = (cos u)(2x)
= 2x cos(x2)
Differentiation Rules
n Derivative of the Cosine Function
d
cos x = - sin x
dx
Example: y = cos(ex)
Let u = ex so that y = cos u, u = ex
By the Chain Rule:
dy/dx = (dy/du)(du/dx) = (−sin u)(ex)
= −(ex)sin(ex)
Implicit Differentiation
n Implicit differentiation is used when it is not easy
to express y as an explicit function of x.
n Example: y3 – 3y2 +3y + x2 = 2
n Differentiating term by term with respect to x, we
get
dy
2 dy dy
3y - 6y + 3 + 2x = 0
dx dx dx
dy - 2x
= 2
dx 3 y - 6 y + 3
Logarithmic Differentiation
n Logarithmic differentiation refers to the process
of transforming the functions by logarithms
before performing a differentiation.
n Example: y = xx, x > 0
ln y = x ln x dy æ 1 ö
= y ç x + ln x÷ = x x (1 + ln x )
dx è x ø
1 dy 1
= x + ln x
y dx x
Higher-Order Derivatives
n Since f ′ is a function, we may also define its
derivative and call it the second derivative of f
and denote it by f ″.
n We may continue this process and get the third
derivative f (3), the fourth derivative f (4) and so on.
n If y = f(x), we often use the following notations
for the higher-order derivatives:
n Second derivative:
d2y
f ¢¢( x ) º 2
dx
Higher-Order Derivatives
d 3y
n Third derivative: f ¢¢¢( x ) º
dx 3
(4) d4y
n Fourth derivative: f ( x) = 4
dx
f ( x)
AF ( x ) =
x
The marginal function is defined as
MF(x) = f ′(x)
Marginal Functions and Average
Functions
n Theorem. Let f be Proof:
differentiable on the f ( x)
AF ( x ) =
set of positive x
numbers. Then dAF xf ¢( x ) - f ( x )
=
dAF dx x2
(a ) < 0 Û MF ( x ) < AF ( x )
dx 1é f ( x) ù
dAF = ê f ¢( x ) -
(b) = 0 Û MF ( x ) = AF ( x ) xë x úû
dx
1
( c)
dAF
> 0 Û MF ( x ) > AF ( x ) = [ MF ( x ) - AF ( x )]
dx x
The conclusions follow.
Marginal Functions and Average
Functions
n Example. The total cost C(x) of producing output
x is given by
n C(x) = 0.2x3 – 1.3x2 + 3.7x
dAC
(a ) < 0 Û MC( x ) < AC( x ) AC
dx
dAC dAC dAC
(b) = 0 Û MC( x ) = AC( x ) <0 >0
dx dx dx
dAC
( c) > 0 Û MC( x ) > AC( x ) dAC x
dx =0
dx
Elasticity
n Definition. Let y = f(x) where x > 0 and f is
differentiable. The point elasticity of y with
respect to x is defined as
dy / dx x dy
e yx = =
y/x y dx
n |εyx| > 1: y is elastic with respect to x.
n |εyx| < 1: y is inelastic with respect to x.
n |εyx| = 1: y is unit elastic with respect to x.
n Note: Elasticity is MF divided by AF.
Elasticity
n Theorem. Let y = f(x), where x > 0, y > 0 and f is
differentiable. Then
d ln y
e yx =
d ln x
Proof: Let u = ln y, v = ln x. Then
u = ln y, y = f(x), x = ev
By the Chain Rule,
d ln y du du dy dx 1 dy v x dy
= = = e = = e yx
d ln x dv dy dx dv y dx y dx
Price Elasticity and Revenue
dR dq q æ dq ö
=p +q = çp + q÷
dp dp q è dp ø
dR æ p dq ö dR
= qç + 1÷ = q (e qp + 1)
dp è q dp ø dp
dR
Price Elasticity and Revenue = q (e qp + 1)
dp
dR
= q (e qp + 1) = 0
dp
Thus, a price change will not affect revenue.
If demand is price elastic, then εqp < –1; hence,
εqp + 1 < 0.
dR
= q (e qp + 1) < 0
dp
In this case, a price increase will decrease revenue.
Rates of Growth
n Definition. Let y = f(t) where y > 0, t > 0, f
is differentiable, and t denotes time.
n The instantaneous rate of growth of y is
defined as 1 dy
ry =
y dt
1 dy d
Note that ry = = ln y
y dt dt
Rates of Growth
n Theorem.
n ρuv = ρu + ρv
n ρu/v = ρu − ρv
n Example 1: n Example 2:
n GNP(t) = nominal GNP n Y(t) = national income
n P(t) = price deflator at time t n N(t) = population at time t
n GNP(t)/P(t) = real GNP at n Y(t)/N(t) = per capita income
time t at time t
n Rate of growth of real GNP is n Rate of growth of per capita
ρGNP − ρP income is ρY − ρN
Partial Derivatives
Partial Derivatives
n Let y = f(x1, x2, . . .,xn). The partial derivative of f
with respect to xi at the point x = [x1 x2 . . . xn] is
defined as
f ( x1 ,.., x i + D x i ,.., x n ) - f ( x1 ,.., x i ,.., x n )
f i (x) = lim
D xi ® 0 D xi
Gradient of f
é f K ( K , L) ù é aAK a -1 Lb ù
f ¢ ( K , L) = Ñ f ( K , L) = ê ú = ê a b - 1 ú
ë f L ( K , L) û êë bAK L úû
Partial Derivative: Example
n The Stone-Geary utility function
¶u a1
= f 1 ( x1 , x 2 , x 3 ) = Gradient of u:
¶ x1 x1 - g 1
¶u a2 é a1 ù
= f 2 ( x1 , x 2 , x 3 ) = ê x1 - g 1 ú
¶ x2 x2 - g 2 a2
u ¢ ( x) = Ñ u ( x) = x 2 - g 2 ú
ê
ê a ú
¶u a3 ê x -3g ú
= f 3 ( x1 , x 2 , x 3 ) = ë 3 3û
¶ x3 x3 - g 3
Geometric Interpretation of the
Partial Derivative
n Given z = f(x,y) z = f(x,y)
n Let L be a line parallel
to the x-axis (y
constant).
n Consider the curve on
the surface above L. y
n The slope of this curve
is the partial derivative
fx(x,y).
L
x
Geometric Interpretation of the
Partial Derivative
n Let L1 be a line z = f(x,y)
parallel to the y-axis (x
constant).
n Consider the curve on
the surface above L1.
n The slope of this curve y
is the partial derivative
fy(x,y). L1
x
Marginal Functions
n Partial derivatives are also referred to as marginal
functions.
n Thus, if C = f(q1,q2, . . .,qn) is the joint cost of
producing quantities q1, q2, . . ., qn of n
commodities, then fi is the marginal cost of qi.
n Similarly, if Q = F(K, L) represents a production
function with output Q corresponding to inputs K
and L, then FK is the marginal product of input K
and FL is the marginal product of L.
Partial Elasticity
Definition. Let y = f(x1,x2, . . .,xn). The partial elasticity
of y with respect to xi is defined as
xi ¶ y
e yxi =
y ¶ xi
Example Q = f ( K , L) = AK a Lb , A>0
K ¶Q K a -1 b
e QK = = a b
aAK L =a
Q ¶ K AK L
L ¶Q L a b -1
e QL = = a b
bAK L =b
Q ¶ L AK L
Higher-Order Partial Derivatives:
Notations
n Let y = f(x1,x2, . . .,xn). Since the partial derivative
is a function, we may also define its partial
derivatives.
n The second-order partial derivatives are denoted
as follows:
¶ ¶y ¶2y
f ij º º
¶ x j ¶ xi ¶ x j ¶ xi
¶ ¶y ¶2y
f ii º º
¶ x i ¶ x i ¶ x i2
Higher-Order Partial Derivatives:
Notations
n If z = f(x,y), then the second-order partial
derivatives are denoted by the following symbols
¶ ¶z ¶ 2z ¶ ¶z ¶ 2z
f xx º ( fx)x º º f xy º (fx)y º º
¶ x ¶ x ¶ x2 ¶ y ¶ x ¶ y¶ x
¶ ¶z ¶ 2z ¶ ¶z ¶ 2z
f yx º ( f y )x º º f yy º (fy)y º º
¶ x ¶ y ¶ x¶ y ¶ y ¶ y ¶ y2
Higher-Order Partial Derivatives:
Example
(a ) z = x 3 + 2 xy + y 3
¶z ¶z
f x ( x, y) = = 3x 2 + 2 y f y ( x, y) = = 2 x + 3y 2
¶x ¶y
2
¶ z f xy ( x , y ) =
¶ 2z
=2
f xx ( x , y ) = = 6x
¶x 2 ¶ y¶ x
¶ 2z ¶ 2z
f yx ( x , y ) = =2 f yy ( x , y ) = = 6y
¶ x¶ y ¶y 2
Higher-Order Partial Derivatives:
A Cobb-Douglas Production Function
n Q = f(K,L) = KαLβ (0 < α, β < 1)
n Marginal product of capital:
n fK(K,L) = αKα−1Lβ
n Differentiating fK with respect to K:
n fKK(K,L) = α(α−1)Kα−2Lβ < 0
n The negative sign indicates diminishing marginal
productivity. The marginal product of capital decreases as
more of capital is used, holding labor constant.
n Differentiating fK with respect to L:
n fKL(K,L) = αβKα−1Lβ−1 > 0
n The marginal product of capital increases as more of labor
is used, holding capital constant.
Higher-Order Partial Derivatives:
A Cobb-Douglas Production Function
n Q = f(K,L) = KαLβ (0 < α, β < 1)
n Marginal product of labor:
n fL(K,L) = βKαLβ−1
n Differentiating fL with respect to L:
n fLL(K,L) = β(β−1)KαLβ−2 < 0
n The negative sign indicates diminishing marginal
productivity. The marginal product of labor decreases as
more of labor is used, holding capital constant.
n Differentiating fL with respect to K:
n fLK(K,L) = αβKα−1Lβ−1 > 0
n The marginal product of labor increases as more of capital
is used, holding labor constant.
Young’s Theorem
n From the preceding examples we notice that the
cross partial derivatives are equal. This is true
provided that the function has continuous second
order partial derivatives.
n Theorem (Young). Let f have continuous second
order partial derivatives. Then fij = fji.
n Remark: If a function of many variables has
continuous higher-order partial derivatives, then a
repeated application of Young’s Theorem results in
the invariance of higher-order partial derivatives
to the order of differentiation.
Total Differentials and
Total Derivatives
Total Differentials and Total
Derivatives
n A partial derivative measures the effect of an independent
variable while holding other independent variables fixed. If
several independent variables change, their joint effects
cannot be captured by the partial derivative.
n Joint effects are captured by including the effect of each
independent variable as part of the total. This leads to the
idea of total differentials and total derivatives.
n Definition. Let y = f(x) where f is differentiable. A
differential dx is any increment in x. The differential dy
corresponding to the differential dx is defined as
n dy = f ′(x)dx ■
Differentials
n Let y = f(x) where f is
differentiable. A
differential dx is any
increment in x.
n The differential dy
Δy
corresponding to dx is
defined as dx
n dy = f ′(x)dx
x x+dx
n Let Δy = f(x+dx) – f(x)
Differentials
n Let T be the tangent to the
curve at the point (x, f(x)).
T
n Consider the segment a.
n Slope of T = f ′(x) = a/dx
n Hence, a = f ′(x)dx a Δy
n By definition, dy = f ′(x)dx
n Hence, a = dy,
dx
x x+dx
n i.e., dy is an
approximation of Δy.
Differentials
n As differentials, dy and dx may be treated just like
numbers.
n Although there is no restriction on the value of dx,
the concept of the differential is, as a rule, used
when dx is small.
n The preceding figures show that dy approximates
the actual change Δy and the smaller dx is, the
better the approximation.
Rules for Differentials
Derivative Differential
dc
(a ) = 0, dc = 0
dx
d (cu) du
(b) =c , d (cu) = cdu
dx dx
d (u ± v ) du dv
( c) = ± d (u ± v ) = du ± dv
dx dx dx
Rules for Differentials
Derivative Differential
d (uv ) dv du
(d ) =u +v d (uv ) = udv + vdu
dx dx dx
æ uö æ du ö æ dv ö
dç ÷ v ç ÷ - uç ÷
è vø è dx ø è dx ø æ u ö vdu - udv
( e) = dç ÷ = , (v ¹ 0)
dx v2 è vø v 2
Rules for Differentials: Examples
2 6x + 1
(a ) y = 4 x + 8x - 6 (b) y=
2x
dy dy (2 x )6 - (6 x + 1)2 1
= 8x + 8 = =- 2
dx dx 4x 2
2x
1
dy = 8( x + 1)dx dy = - dx
2
2x
Total Differentials
n Definition. Let y = f(x1,x2, . . .,xn). Given the
differentials dx1, dx2, . . ., dxn, the total
differential dy is defined as
n dy = f1dx1 + f2dx2 + … + fndxn (1)
n Let y = f(x1, x2, . . .,xn) and suppose that
n x1 = u1(t), x2 = u2(t), …, xn = un(t)
n Dividing (1) by dt, we get
dy dx1 dx 2 dx n
= f1 + f2 + ! + fn
dt dt dt dt
Total Derivatives
n Theorem. Let y = f(x1,x2, . . ., xn), where f has
continuous partial derivatives and
x1 = u1 (t ), x 2 = u2 (t ), ! , x n = u n (t )
Then
dy dx1 dx 2 dx n
= f1 + f2 + ! + fn
dt dt dt dt
dy dx1 dx 2 dx n
= f1 + f2 + ! + fn
dt dt dt dt
When t is equal to x1 (or any xi), then the total
derivative of y with respect to x1 is
dy dx 2 dx n
= f1 + f 2 + ! + fn
dx1 dx1 dx1
Total Derivative: Special Case
n Let y = f(x1, x2) and x2 = u(x1).
n Then y
dy dx 2
= f1 + f 2
dx1 dx1 x1 x2
2 2 3
(a ) z=x +y , x = t, y = t +3
¶z ¶z
dz = dx + dy = 2 xdx + 2 ydy
¶x ¶y
dz ¶ z dx ¶ z dy
= + = 2 x (1) + 2 y (3t 2 )
dt ¶ x dt ¶ y dt
= 2t (1 + 3t 4 + 9t )
Total Derivative
Example: Rates of Growth
Q(t ) = AK (t ) a L(t ) b
dQ ¶Q dK ¶Q dL
= +
dt ¶ K dt ¶ L dt
a -1 bdK a b - 1 dL
= aAK L + bAK L
dt dt
1 dK
a b a b 1 dL
= aAK L + bAK L
K dt L dt
1 dK 1 dL
= aQ + bQ
K dt L dt
Total Derivative
Example: Rates of Growth
1 dQ 1 dK 1 dL
=a +b
Q dt K dt L dt
r Q = ar K + br L
dp * Dy
=
dy S p - Dp
Sp – Dp > 0.
Hence, dp*/dy depends on the sign of Dy.
n Y = C(Y) + I(R) + G0
n M(Y,R) = M0
Changes in Equilibrium in an IS-
LM Model
n Y = C(Y) + I(R) + G0 (1)
n M(Y,R) = M0 (2)
n Let (R*,Y*) be the overall equilibrium.
n Suppose we wish to determine the effects on R*
and Y* of a change in money supply, holding
government expenditure constant.
n Totally differentiate (1) and (2):
n dY = C′(Y)dY + I′(R)dR + dG0
n MY(R,Y)dY + MR(R,Y)dR = dM0
Changes in Equilibrium in an IS-
LM Model
In matrix form
é 1 - C ¢ (Y ) - I ¢ ( R) ù édY ù é dG0 ù
ê M ( R, Y ) =ê
ë Y M R ( R, Y ) û ëdR û ëdM 0 úû
ú ê ú
J
Denoting the coefficient matrix by J 0 < C′ < 1
we get I′ < 0
MY > 0
det( J ) = (1 - C ¢ (Y )) M R + M Y I ¢ ( R) < 0 MR < 0
Changes in Equilibrium in an IS-
LM Model
Solving for dY and dR (using Cramer’s Rule):
M R dG0 + I ¢( R)dM 0
dY =
det( J )
dR * 1 - C ¢(Y )
= <0
dM 0 det( J )
Holding government expenditure constant, an increase in
money supply increases income.
Holding government expenditure constant, an increase in
money supply decreases interest rate.
Changes in Equilibrium in an IS-
LM Model
Let government expenditure be increased by dG0 while holding
money supply fixed (i.e. dM0 = 0). Then
dY * MR
= >0
dG0 det( J )
dR * - M Y
= >0
dG0 det( J )
Holding money supply constant, an increase in government
expenditure increases income.
dy Fx ( x , y )
=-
dx Fy ( x , y )
Level Curves
Let z = f(x,y). A level curve of f is the curve defined by
f(x,y) = c, where c is a constant. Thus, y is defined
implicitly as a function of x by the equation
F ( x, y) = f ( x, y) - c = 0
Assuming that the conditions of the Implicit Function
Theorem hold, we can get the slope of the level curve
by the formula
dy Fx ( x , y ) f x ( x, y)
=- =-
dx Fy ( x , y ) f y ( x, y)
Level Curves: Isoquants
A level curve of a production function is called an
isoquant. If the production function is Q = f(K,L),
then the slope of an isoquant is given by
dK f L ( K , L)
=-
dL f K ( K , L)
Example: Cobb-Douglas production function
Q = f ( K , L) = AK a L1- a ( A > 0)
Slope of an isoquant
dK f L ( K , L) AK a (1 - a ) L- a (1 - a ) K
= - = - a a = -
dL f K ( K , L) AaK - 1
L1- aL
Level Curves: Indifference Curve
The level curve of a utility function is called an
indifference curve. Let the utility function be given by
u = f ( x1 , x 2 )
where xi is the consumption of good i (i = 1,2).
Slope of an indifference curve is given by
dx 2 f 1 ( x1 , x 2 )
=-
dx1 f 2 ( x1 , x 2 )
Example u = f ( x1 , x 2 ) = a ln x1 + b ln x 2
dx 2 f 1 ( x1 , x 2 ) a / x1 ax 2
=- =- =-
dx1 f 2 ( x1 , x 2 ) b / x2 bx 1
The Implicit Function Theorem:
F(x,y,z) = 0
n Let F(x,y,z) be defined on an open ball B containing
(x0,y0,z0) and suppose that
n (a) F(x0,y0,z0) = 0;
n (b) Fx, Fy, Fz are continuous on B;
n (c) Fz(x0,y0,z0) ≠ 0;
n Then there exists a function f defined on an open disk
D containing (x0,y0) such that
n (1) z = f(x,y) on D;
n (2) F((x,y),f(x,y)) = 0 on D;
n (3) f has continuous partial derivatives on D.
Implications of the Implicit
Function Theorem
Theorem. Let z be defined implicitly as a function of x and y by
the equation F(x,y,z) = 0 such that Fx, Fy, and Fz are continuous,
and Fz(x,y,z) ≠ 0. Then
¶z Fx ( x , y , z) ¶z Fy ( x , y , z )
=- =-
¶x Fz ( x , y , z) ¶y Fz ( x , y , z)
Example A production function is given implicitly by F(K,L,Q) =
0, where Q = output, K = capital input, and L = labor input. If the
conditions of Implicit Function Theorem hold, then the marginal
products of capital and labor are
¶Q FK ( K , L, Q) ¶Q F L ( K , L , Q)
=- =-
¶K FQ ( K , L, Q) ¶L FQ ( K , L, Q)
Taylor's Theorem
n Among the differentiable functions, the
polynomials are the most well-behaved and are the
easiest to handle.
n This explains why polynomial approximations of
differentiable functions are useful in mathematical
analysis.
n Taylor's Theorem states that a differentiable
function can be approximated by a polynomial.
n In fact, a linear or a quadratic approximation is
often adequate for many purposes.
Taylor's Theorem for a Function
of One Variable
Let f have continuous derivatives up to the (n + 1)th
order on an open interval (a,b). For every pair of
points x and x1 in (a,b), there is a point p between x
and x1 such that
f ¢ ( x1 ) f ( n ) ( x1 ) n
f ( x ) = f ( x1 ) + ( x - x1 ) + ! + ( x - x1 )
1! n!
f ( n +1) ( p) n +1
+ ( x - x1 )
(n + 1)!
The Mean Value Theorem:
f(x) = f(x1) + f ′(p)(x − x1)
n We derive this equation
by using a graph. B
n Slope of AB: f(x) − f(x1)
f ( x ) - f ( x1 ) A
x − x1
m AB =
x - x1
a x1 x b
The Mean Value Theorem:
f(x) = f(x1) + f ′(p)(x − x1)
n Draw a line parallel to AB
and tangent to the curve at
B
P. P
n Let p be the x-coordinate f(x) − f(x1)
of P. A
x − x1
n Slope of tangent = f ′(p)
n Slope of tangent = slope
of AB
a x1 p x b
n Hence,
f ( x ) - f ( x1 )
= f ¢ ( p) f ( x ) = f ( x1 ) + f ¢( p)( x - x1 )
x - x1
Taylor's Theorem for Functions of
Several Variables
Let f be a function of x = [x1,x2, . . .,xn]. Suppose that f has
second-order partial derivatives. The Hessian matrix of f at
x is defined as
é f 11 (x) f 12 (x) ! f 1n (x) ù
ê f ( x) f 22 (x) ! ú
f 2 n ( x) ú
H f ( x) = ê 21
ê " " " " ú
ê ú
ë f n1 (x) f n 2 ( x) ! f nn (x) û
The Hessian matrix of f at x is also denoted by f ″(x).
If f has continuous second-order partial derivatives,
then fij = fji; the Hessian matrix in this case is symmetric.
Taylor's Theorem for Functions of
Several Variables
n Let f have continuous second-order partial derivatives
on an open ball B in Rn.
n For each pair of points x, x1 ε B, there is a point p on
the line segment joining x and x1 such that
n f(x) = f(x1) + f ′(p)T(x – x1).
( c) f ( x ) = x f (t x ) = t x = t 1/ 2 x ½
(d ) f ( x , y ) = x + y f (t x , t y ) = t x + t y = t f ( x , y ) 1
D
Euler’s Theorem
n Theorem. Let y = f(x),
where x = [x1,x2,...,xn]. If f
is homogeneous of degree
k, then its partial derivatives
are homogeneous of degree
k–1.
n EULER’S THEOREM. Let y
= f(x), x = [x1,x2,...,xn]. If f
is homogeneous of degree
k, then
n f1(x)x1+...+fn(x)xn = kf(x).
f L ( K , L) = (1 - a ) K a L - a
= K a L1-a = f ( K , L)