Univariate Calculus

Univariate Calculus
Professor Peter Cramton
Economics 300
Outline
• Rules of differentiation
–
–
–
–
–
–
–
–
Sum rule
Scale rule
Product rule
Power rule
Exponential rule
Chain rule
Quotient rule
Logarithmic rule
Outline
• Second derivatives and convexity
• Economic applications
–
–
–
–
Risk aversion and utility functions
Elasticities
Total revenue
Average, marginal, and total cost
Rules of differentiation
• Used to evaluate derivative of any function
• Much easier than working with basic definition
dy
f ( x  x)  f ( x)
 lim
dx x0
x
Sum rule
y  h( x )  f ( x )  g ( x )
dy
 h( x)  f ( x)  g ( x)
dx
Scale rule
y  h( x)  kf ( x)
dy
 h( x)  kf ( x)
dx
Product rule
y  h( x )  f ( x ) g ( x )
dy
 h( x)  f ( x) g ( x)  f ( x) g ( x)
dx
Power rule
y  h( x)  kx
dy
n 1
 h( x)  nkx
dx
n
Exponential rule
y  h( x )  e
dy
kx
 h( x)  ke
dx
kx
Chain rule
y  h( x)  g ( f ( x))
dy
 h( x)  g ( f ( x)) f ( x)
dx
y  g (u )
u  f ( x)
dy dy du

dx du dx
Quotient rule
f ( x)
y  h( x ) 
g ( x)
dy
f ( x) g ( x)  f ( x) g ( x)
 h( x) 
2
dx
g ( x)
Logarithmic rule
y  f ( x)  ln x
dy
1
 f ( x) 
dx
x
y  f ( x)  log b x
dy
1 1
 f ( x) 
dx
x ln b
Exercise
y x
y  25
7
y 4
4x
2
y  8 x  3 x  14
1 2
y  x  2x
3
3
dy 3

x
dx 2
dy
5
 7 x
dx
dy
3 1/2
 16 x  x
dx
2
dy
2 3
 x 2
dx
3
Exercise
y  4  20 x  4 x
ye
y  3ln x
2x
y  2( x  1)
2
2
dy
 20  8 x
dx
dy
2x
 2e
dx
dy 3

dx x
dy
 4( x  1)
dx
f ( x)  ( x  1)  ( x  2 x)  5
2
2

f ( x)  3( x  1)  2( x  2 x)(2 x  2)
3
f ( x)  (2 x  4)
2
99
2
98

f ( x)  99(2 x  4) 2
f ( x)  ab(e )
x ab 1 x
f ( x )  (e )
x ab
e  abe
abx
f ( x )  (e )
x a b 1 x a
a 1
x a b a 1
f ( x)  b(e ) e ax  ab(e ) x
xa b
f ( x )  (e
a  bx  cx 2 10
)
f ( x)  10(e
a  bx  cx 2 10
) (b  2cx)
Exercise
y  log 2 (2 x  3)
y  log 4 (8 x )
2
y  x log 2 x
3
log 3 x
y
2x
2
1
y 
2 x  3 ln 2
16 x 1
2 1
y  2

8 x ln 4 x ln 4
1 1
y  3x log 2 x  x
x ln 2
2
3
1 2
1 1 1
y   x log 3 x 
2
2 x x ln 3
Second derivative
• First derivative
– Rate of change
– Slope of the function
– Velocity
dy
 f ( x)
dx
• Second derivative
– Rate of change of the rate of change
– Rate of change of the slope of the function
– Acceleration
2
d  dy  d y
   2  f ( x)
dx  dx  dx
Example: square-root utility
U (c)  ac
1
2
1
dU

 U (c)  12 ac 2
dc
2
3
dU

1
2


U
(
c
)


ac
4
2
dc
Square-root utility function
U (c )  c
1
dU

 U (c)  12 c 2
dc
1
2
2
3
dU

1
2


U
(
c
)


c
4
2
dc
Example: logarithmic utility
U ( x)   ln x
dU

 U ( x) 
dx
x
dU



U
( x)   2
2
dx
x
2
Logarithmic utility function
Second derivative and convexity
• Strictly convex
– Slope strictly increasing
– Second derivative positive: f”(x) > 0
• Strictly concave
– Slope strictly decreasing
– Second derivative negative: f”(x) < 0
Second derivative and convexity
• Convex
– Slope increasing
– Second derivative f”(x)  0
• Concave
– Slope decreasing
– Second derivative f”(x)  0
Concave and convex functions
Strictly concave
Strictly convex
Which do you prefer?
• $12 for sure
• 50-50 chance of $6 or $18
• Expected value of both is $12
.5($6) + .5($18) = $12
• Risk averse
– Prefer sure thing
– U(12) > .5U(6) + .5U(18)
– Concave utility
• Risk seeking
– Prefer gamble
– U(12) < .5U(6) + .5U(18)
– Convex utility
Risk-averse and risk-loving utility
Exercise: Concave or convex?
y  18  12 x  6 x  x
2
y  12  12 x  3x
y  12  6 x
3
30
25
Concave y”<0
Convex y”>0
20
1
2
3
4
2
Elasticities
• How sensitive is demand to a change in price?
• Does revenue increase or decrease when price is
raised?
• Depends on price elasticity of demand
• % change in quantity / % change in price
Q / Q

P / P
Elasticities
dQ
Q  0, percentage change in Q is
Q
dP
P  0, percentage change in P is
P
Price elasticity of demand
dQ / Q dQ P


dP / P dP Q
Elasticities
•  < -1 demand is price elastic
– quantity falls by more than 1% if price increases by 1%
•  > -1 demand is price inelastic
– quantity falls by less than 1% if price increases by 1%
• Elasticities in different markets are comparable,
since based on % change
P
P
Elastic
Inelastic
D
D
Q
Q
Elasticities with linear demand
q    p
dq p
p

 
dp q
q
  1  q   p
  p    p
Elastic
Inelastic


p
,q 
2
2
Arc elasticity for discrete changes
 arc
QB  QA
(QA  QB ) / 2

PB  PA
( PA  PB ) / 2
Alternative form for elasticity
Price elasticity of demand
dQ / Q dQ P


dP / P dP Q
d ln Q 1
dQ
  d ln Q 
dQ
Q
Q
d ln P 1
dP
  d ln P 
dP
P
P
dQ P d ln Q


dP Q d ln P
Log-linear demand
Infant mortality and income/capita
Elasticity and other economic concepts
• Substitutes
– Products with good substitutes are more elastic
• Complements
– Products with many complements are less elastic
• Luxury goods tend to be more elastic
• Necessities tend to be less elastic
Do consumers or producers bear a tax?
• Depends on elasticity of demand and supply
– Party least able to substitute away pays more of tax
PC  PP  T
dPC  dPP  dT
QD ( PC )  QS ( PP )
dQS
dQD
dPC 
dPP
dPC
dPP
 dQD P dQS P 
dQD P

dT

 dPP  
dPC Q
 dPC Q dPP Q 
dPC
S
dPP
D

and

dT  S   D
dT  S   D
Impact of quantity change on revenue
• Depends on elasticity of demand
– Producer wants to reduce quantity if it faces inelastic
demand
R  PQ
 dP Q 
dR dP
 1

Q  P  P 1 
 P 1  

dQ dQ
 
 dQ P 
•  > -1 then revenue declines when produce more
•  < -1 then revenue increases when produce more
• Monopolist allows produces in elastic portion of
demand ( < -1)
P = 100 – Q; R = (100 – Q)Q
2500
2000
1500
 < -1
 > -1
1000
500
20
40
60
80
100
Exercise: Find elasticity
y  100  2 x, x  4
dy x
4

 2  8 / 92
dx y
92
y  16  8 x  x , x  1.5
2
x 2 x
  (8  2 x) 
 3 / 2.5
y 4 x
ln y  6  .5ln x, x  3   .5
2
y  50 x , x  2
3
50 x x
  2
 2
2
50 x
Total, average, and marginal
• Total product
• Average product
• Marginal product
Q  100 L
1/2
Q / L  100 L
1/2
dQ / dL  50 L
1/2
800
Total product
Q
600
Average product > marginal product
since concave
400
200
10
20
30
40
50
60
L
Total, average, and marginal
C

Q

15
Q

93
Q

100
Total cost
Average cost C / Q
3
2
•
•
dC
2

3
Q
 30Q  93
• Marginal cost
dQ
$
Total cost
700
600
500
400
Average cost = marginal cost
at minimum average cost
300
200
2
4
6
8
10
12
Q
Average cost = marginal cost at min
300
Marginal cost
250
200
150
Competitive firm size
Average cost
100
50
5
10
15