Chapter 2. Differentiation and Integration Final
Chapter 2. Differentiation and Integration Final
Differential and
Integral Calculus
1
Introduction
• Many economic theories begin with the assumption
that an economic agent is seeking to find the
optimal value of some function
– consumers seek to maximize utility
– firms seek to maximize profit
– Consumer surplus
• We need to make use of some mathematical
developments to solve the optimization problems
and to give insights into economic behavior.
• This chapter introduces the mathematical tools
which helps us solve these problems
2
2.1. Differential Calculus
• Derivative has many applications in
economics:
– Rate of change
– Slope of the tangent
– Optimization
– Elasticity
The Rate of Change
• For y = f (x), the average rate of change from x = a
to x = a + h is
f ( a h) f ( a )
, h 0
h
f ( a h) f ( a )
Q h
slope
h
The Instantaneous Rate of Change
Consider the function y = f (x) only near the point P
= (a, f (a)).
The difference quotient f (a h) f (a) , h 0
gives the average rate of changeh of f over the
interval [a, a+h].
If we make h smaller and smaller, in the limit we
obtain the instantaneous rate of change of the
function at the point P:
f ( a h) f ( a )
lim
h 0 h
Visual Interpretation
Q
Tangent
Slope of tangent =
f (a + h) – f (a) instantaneous rate
of change.
P lim f ( a h) f ( a )
h 0 h
Let h
approach 0
h
Instantaneous Rate of Change
Given y = f (x), the instantaneous rate of change at x
= a is
f ( a h) f ( a )
lim
h 0 h
provided that the limit exists. It can be interpreted as the
slope of the tangent at the point (a, f (a)). See
illustration on previous slide.
Definition of Derivative
For y = f (x), we define the derivative of f at
x, denoted f (x), to be
f (x h) f (x)
f (x) lim
h 0
if the limit exists. h
If f (a) exists, we call f differentiable at a.
If f (x) exist for each x in the open interval (a,
b), then f is said to be differentiable over (a,
b).
Derivatives
• If a derivative exists, it can be expressed in many
different forms:
a) dy/dx
b) df(x)/dx
c) f ’(x)
d) Fx(x)
e) y’
Interpretations of the Derivative
• If f is a function, then f is a new function with
the following interpretations:
■ For each x in the domain of f , f (x) is the slope of the
line tangent to the graph of f at the point (x, f (x)).
■ For each x in the domain of f , f (x) is the instantaneous
rate of change of y = f (x) with respect to x.
■ If f (x) is the position of a moving object at time x, then
v = f (x) is the velocity of the object at that time.
Example 1
Find the derivative of f (x) = x 2 – 3x.
Step 1. f (x + h) = (x + h)2 – 3(x + h) = x2 + 2xh + h2 –
3x – 3h
Step 2. f (x + h) – f (x) = 2xh + h2 – 3h
Step 3. f ( x h) f ( x) 2 xh h 2 3h 2 x h 3
h h
Step 4. f ( x h) f ( x )
lim lim 2 x h 3 2 x 3
h 0 h h 0
Therefore f’(x)=2x-3
Example 2
Find the slope of the tangent to the graph of f (x) = x 2 –
3x at x = 0, x = 2, and x = 3.
Solution: In example 2 we found the derivative of this
function at x to be
f (x) = 2x – 3
Hence
f (0) = -3
f (2) = 1, and
f (3) = 3
Nonexistence of the Derivative
The existence of a derivative at x = a depends on the
existence of the limit
f (a h) f (a)
f (a) lim
h 0 h
If the limit does not exist, we say that the function is
nondifferentiable at x = a, or f (a) does not exist.
Some of the reasons why the derivative of a function may
not exist at x = a are
■ The graph of f has a hole or break at x = a, or
■ The graph of f has a sharp corner at x = a, or
■ The graph of f has a vertical tangent at x = a.
Higher Derivatives
• The second derivative of a function f is the
derivative of the derivative of f at a point x in the
domain of the first derivative.
Derivative Notations
d2y
Second f dx 2
d3y
Third f dx3
(4) d4y
Fourth f dx 4
n dny
nth f
dx n
Example of Higher Derivatives
Given f ( x) 3x5 2 x3 14 find f ( x).
f ( x) 15 x 4 6 x 2
3
f ( x) 60 x 12 x
f ( x) 180 x 2 12
Example of Higher Derivatives
2 x 1
Given f ( x) find f (2).
3x 2
2 3 x 2 3 2 x 1 7 2
f ( x) 2
2
7 3 x 2
3x 2 3x 2
3 42
f ( x) 14 3 x 2 3 3
3x 2
42 42 21
f (2) 3
3
3(2) 2 4 32
Rules of Derivatives
db
1. If b is a constant, then 0
dx
d [bf ( x)]
2. If b is a constant, then bf ' ( x)
dx
dx b
3. If b is constant, then bx b 1
dx
d ln x 1
4.
dx x
da x
5. a x ln a for any constant a
dx 18
Rules of Derivatives
• Suppose that f(x) and g(x) are two functions
of x and f’(x) and g’(x) exist
• Then
d [ f ( x) g ( x)]
6. f ' ( x) g ' ( x)
dx
d [ f ( x) g ( x)]
7. f ( x) g ' ( x) f ' ( x) g ( x)
dx
f ( x)
d
g ( x) f ' ( x) g ( x) f ( x) g ' ( x)
8.
dx [ g ( x)]2
provided that g ( x) 0
19
Rules of Derivatives
• If y = f(x) and x = g(z) (i.e. y=f(g(z)) and if
both f’(x) and g’(z) exist, then:
dy dy dx df dg
9.
dz dx dz dx dz
• This is called the chain rule. The chain
rule allows us to study how one variable
(z) affects another variable (y) through
its influence on some intermediate
variable (x)
20
Rules of Derivatives
• Some examples of the chain rule include:
de ax de ax d (ax)
10. e ax a ae ax
dx d (ax) dx
d [ln(ax)] d [ln(ax)] d (ax) 1 1
11. a
dx d (ax) dx ax x
d [ln( x 2 )] d [ln( x 2 )] d ( x 2 ) 1 2
12. 2
2 2 x
dx d (x ) dx x x
21
Functions of Several Variables
• Most goals of economic agents depend on
several variables
– trade-offs must be made
• The dependence of one variable (y) on a
series of other variables (x1,x2,…,xn) is
denoted by:
y f ( x1 , x2 ,..., xn )
22
Partial Derivatives
24
Calculating Partial Derivatives
1. If y f ( x1 , x2 ) ax12 bx1 x2 cx22 , then
f
f1 2ax1 bx2 and
x1
f
f 2 bx1 2cx2
x2
2. If y f ( x1 , x2 ) e ax1 bx2 , then
f ax1 bx2 f
f1 ae and f 2 be ax1 bx2
x1 x2
25
Calculating Partial Derivatives
3. If y f ( x1 , x2 ) a ln x1 b ln x2 , then
f a f b
f1 and f2
x1 x1 x2 x2
26
Partial Derivatives
• Partial derivatives are the mathematical
expression of the ceteris paribus
assumption
– show how changes in one variable affect some
outcome when other influences are held
constant
27
Partial Derivatives
• We must be concerned with how variables
are measured
– if q represents the quantity of gasoline
demanded (measured in billions of gallons) and
p represents the price in dollars per gallon,
then q/p will measure the change in demand
(in billions of gallons per year) for a dollar per
gallon change in price
28
Elasticity
• Elasticity measures the proportional effect
of a change in one variable on another
– unit free
• The elasticity of y with respect to x is
y
y y x y x
ey,x
x x y x y
x
29
Elasticity and Functional Form
• Suppose that
y = a + bx + other terms
• In this case,
y x x x
e y, x b b
x y y a bx
• ey,x is not constant
– it is important to note the point at which the
elasticity is to be computed
30
Elasticity and Functional Form
• Suppose that
y = axb
• In this case,
y x b 1 x
ey,x abx b b
x y ax
31
Elasticity and Functional Form
• Suppose that
y = axb => ln y = ln a + b ln x
• In this case,
y
y x y ln y
ey ,x b
x y x ln x
x
• Elasticities can be calculated through logarithmic
differentiation
32
Second-Order Partial Derivatives
• The partial derivative of a partial derivative
is called a second-order partial derivative
(f / xi ) 2 f
f ij
x j x j xi
33
Young’s Theorem
34
Use of Second-Order Partials
• Second-order partials play an important
role in many economic theories
• One of the most important is a variable’s
own second-order partial, fii
– shows how the marginal influence of xi on y
(i.e. (y/xi)) changes as the value of xi
increases
– a value of fii < 0 indicates diminishing marginal
effectiveness
35
Total Differential
• Suppose that y = f(x1,x2,…,xn)
• If all x’s are varied by a small amount, the total
effect on y called total differential will be:
f f f
dy dx1 dx2 ... dxn
x1 x2 xn
36
Implicit function
• The equation
y=mx + b
can be written as
y – mx – b =0
or, even more generally, as
f( x, y, m, b) = 0
• This is called implicit function - the relationship
between variables and parameters are implicitly
present in the equation
37
Derivative of implicit functions
0 f x dx f y dy
dy fx
dx fy
38
Production Possibility Frontier
dy f x 4 x 2 x
dx fy 2y y
39
The Envelope Theorem
• The envelope theorem concerns how the
optimal value for a particular function changes
when a parameter of the function changes
• Example: Suppose that y is a function of x
y = -x2 + ax
• For different values of a, this function
represents a family of inverted parabolas
• If a is assigned a specific value, then y becomes
a function of x only and the value of x that
maximizes y can be calculated 40
The Envelope Theorem
Optimal Values of x and y for alternative values of a
As a increases,
10
4
The relationship
3
2
between a and y
1
is quadratic
0 a
0 1 2 3 4 5 6 7
42
The Envelope Theorem
• Suppose we are interested in how y* changes
as a changes
• There are two ways we can do this
– calculate the slope of y directly
– hold x constant at its optimal value and calculate
y/a directly
43
The Envelope Theorem
• To calculate the slope of the function (i.e. y = -
x2 + ax), we must solve for the optimal value
of x for any value of a
dy/dx = -2x + a = 0
x* = a/2
• Substituting, we get
y* = -(x*)2 + a(x*) = -(a/2)2 + a(a/2)
y* = -a2/4 + a2/2 = a2/4
44
The Envelope Theorem
• Therefore,
dy*/da = 2a/4 = a/2 = x*
45
The Envelope Theorem
y/ a = x
• Holding x = x*
y/ a = x* = a/2
46
The Envelope Theorem
• The envelope theorem states that the change
in the optimal value of a function with respect
to a parameter of that function can be found by
partially differentiating the objective function
while holding x (or several x’s) at its optimal
value
dy * y
{x x * (a )}
da a
47
The Envelope Theorem
• The envelope theorem can be extended to the
case where y is a function of several variables
y = f(x1,…xn,a)
48
The Envelope Theorem
• Optimal values for theses x’s would be
determined that are a function of a
x1* = x1*(a)
x2* = x2*(a)
.
.
.
xn*= xn*(a)
49
The Envelope Theorem
• Substituting into the original objective function
yields an expression for the optimal value of y
(y*)
y* = f [x1*(a), x2*(a),…,xn*(a),a]
• Differentiating yields
dy * f dx1 f dx2 f dxn f
...
da x1 da x2 da xn da a
50
The Envelope Theorem
• Because of first-order conditions, all terms
except f/a are equal to zero if the x’s are at
their optimal values
• Therefore,
dy * f
{x x * (a )}
da a
51
2.2. Integral Calculus
2.2.1. Antiderivatives and Indefinite Integrals
Antiderivatives
• Many operations in mathematics have reverses –
inverses – such as multiplication and division.
The reverse operation of finding a derivative
(antiderivative) will now command our
attention.
53
Examples
54
Examples - continued
x2 x2 + 3 x2 - 5
• The above functions that you found are
antiderivatives.
• Note that you can find more than one such function?
• In general if a function has more than one
antiderivative then the antiderivatives differ by at
most a constant.
55
Antiderivatives and Indefinite Integrals
56
Indefinite Integral Formulas and Properties
n 1
1. x
dx n 1 C , n 1
n
x Power rule.
2. ∫ ex dx = ex + C.
3. ∫ 1/x dx = ∫ x - 1 dx = ln |x| + C, x ≠ 0.
4. ∫ k f (x) dx = k ∫ f (x) dx
57
Examples
59
Applications - continued
• Note, f '(x) = 0.048 x + 0.95 Where x is years after 1970.
• Noting that f (20) = 80.3, find f (x).
60
Applications - continued
Note, f '(x) = 0.048t + 0.95 Where x is years after 1970.
f (x) = 0.024 x 2 + 0.95 x + 51.7 .
Find f (0) and f (30), the production levels for 1970 and
2000.
f (0) = (0.024)(02) + (0.95)(0) + 51.7 = 51.7
51.7 short tons in 1970
f (30) = (0.024)(302) + (0.95)(30) + 51.7 = 101.8
101.8 short tons in 2000
61
2.2.2. Integration by Substitution
f '[ g ( x) ] g ' ( x) dx f [ g ( x) ] C
• This means that in order to integrate g (x) its derivative,
g'(x), must be present.
62
General Integral Formulas
n 1
[f ( x )]
1. ∫ [f (x) ] n f'(x) dx = C, n 1
n 1
1
3. f ' ( x ) dx ln f ( x ) C
f ( x)
63
Example
( x
5 3 4
2) (5 x ) dx
Note that the derivative of x 5 – 2 , (i.e. 5x 4 ), is present
and the integral appears to be in the chain rule form ∫ [f
(x) ] n f '(x) dx, with f (x) = x 5 – 2 .
n 1
[ f ( x)]
∫ [f (x) ] f '(x) dx =
n C, n 1
n 1
It follows that:
5 4
( x 2)
5 3 4
( x 2 ) (5 x ) dx C
4
64
Differential
• If y = f (x) is a differentiable function, then
1. The differential dx of the independent
variable x is any arbitrary real number.
2. The differential dy of the dependent
variable y is defined as the product of
f '(x) and dx – that is, as
dy = f '(x) dx
65
Examples
1. If y = f (x) = x 5 – 2 , then
dy = f ‘ (x) dx = 5x 4 dx
2. If y = f (x) = e 5x , then
dy = f ‘ (x) dx = 5e 5x dx
66
Integration by Substitution
67
General Indefinite Integral Formulas
n 1
u
∫ un du = C, n 1
n 1
∫ e u du = e u + C
1
u du ln u C
68
Integration by Substitution
69
Example 2
70
Example 3
∫ (x 2 + 5) 1/2 (2x ) dx
Step 1 – Select u.
Let u = x2 + 5 and then du = 2x dx
Step 2 – Express integral in terms of u.
∫ (x2 + 5) 1/2 (2x) dx = ∫ u 1/2 du
Step 3 – Integrate.
∫ u 1/2 du = u 3/2/(3/2) + c = 2/3 u 3/2 + c
Step 4 – Express the answer in terms of x.
2/3 u 3/2 + c = 2/3 (x2 + 5) 3/2 + c
71
Substitution Technique 1 – Example 1
1. ∫ (x3 - 5)4 (x2) dx Let u = x3 – 5 then du = 3x2 dx
∫ (x3 - 5)4 (x2) dx = 1/3 ∫ (x3 - 5)4 (3x2) dx =
1/3 ∫ u4 du = 1/3 u5/5 = 1/15 u5 =
Note – we
1/15 (x3 – 5)5 + c need a 3.
73
Substitution Technique 1 – Example 3
3. x Let u = 5 – 2x2 then du = - 4x dx
dx
( 5 2 x 2 )5
x 1 4x
2 5
dx dx Note – we
( 5 2x ) 2
4 ( 5 2x ) 5
need a - 4.
1 1 1 5
5 du u du -1/4 · u - 4 /-4 =
4 u 4
1
1/16 (5 – 2x ) 2 -4
+ c = 2 4
c
16 (5 2x )
74
Substitution Technique 2 – Example 1
4. x x 6 dx
8
Let u = x + 6 then du = dx
75
Applications
76
Applications - continued
300
2
dx . . . Let u = 3x + 25 and du = 3 dx
( 3x 25)
3 1 2
100 2
dx 100 du 100 u du
2
( 3x 25) u
100
c
u 77
Applications - continued
78
Applications - continued
100
p ( x) c Now we need to find c using the fact
3x 25
That 75 bottles sell for $1.60 per bottle.
100
1.60 c and c = 2
3(75) 25
79
Applications - continued
100
So p ( x) 2
3x 25
80
2.2.3.The Definite Integral
• We have been studying the indefinite integral or the
antiderivative of a function.
81
Area
• One way we can determine the area we want is by
filling it with rectangles and calculating the sum of the
areas of the rectangles.
f (x) = .5 x + 2
2
84
Error of the Area
• If we calculate the left and right areas as before using n
rectangles and if a is the left side of the area and b the
right side of the area then: f (x) = .5 x 2 + 2
• Error =|Area – L n| |R – L |
n n
|f (b) – f (a)| Δx =
1 2 3 4 5
b a
Error | f (b ) f (a ) |
n
• For our previous example this is computed as:
5 1
|14.5 2.5 | 12 Error 12
4 85
Error of the Area
• Note: If f (x) is either increasing or decreasing on [a,b],
then its left and right sums approach the same real
number as n → ∞.
87
Approximating Area continued
• If we wanted a particular
accuracy, say 0.05 we could
f (x) = .5 x 2 + 2
use this last formula to
calculate, n, the number of
rectangles needed.
5 1
|14 . 5 2 . 5 | 0 . 05 1 2 3 4 5
n
• And solving for n yields n = 960.
• Meaning that 960 rectangles would be need to
guarantee an error that does not exceed 0.05 !!!!
88
Definite Integral as Limit of Sums
• Let f be a function on interval [a, b]. Partition [a, b] into
n subintervals of equal length ∆ x = (b – a)/n with
endpoints a = x0 < x1 < x2 , … < xn – 1 < xn = b, Then
n
L n f ( x 0 ) x f ( x 1 ) x . . . f ( x n 1 ) x f ( x k 1 ) x
k 1
n
R n f ( x 1 ) x f ( x 2 ) x . . . f ( x n ) x f ( x k ) x
k 1
n
S n f (c1 ) x f (c 2 ) x . . . f (c n ) x f (c k ) x
k 1
a = x0 x1 x2 ... x n -1 xn = b
c1 c2 cn
92
Negative Values
If f (x) is positive for some values of x on [a,b] and
negative for others, then the definite integral symbol
b
f (x) dx
a
93
Examples
Calculate the definite integrals by referring to the figure
with the indicated areas.
Area A = 3.5
b
a
f ( x ) dx - 3.5 Area B = 12
y = f (x)
c
f (x) dx 12
b a B
A b c
c
f (x) dx - 3.5 + 12 = 8.5
a
94
Definite Integral Properties
a
f (x) dx 0
a
b a
f (x) dx f (x) dx
a b
b b
k f (x) dx k f (x) dx
a a
b b b
[ f (x) g (x) ] dx f (x) dx g (x) dx
a a a
b c b
f (x) dx f (x) dx
a a c
f ( x ) dx
95
Examples
3 9 3 2 4 37
If x dx , 0 x dx 9 , and 3 x dx , then
2
0 2 3
3 3
A) 4 x dx 4 x dx 4 (9) 36
2 2
0 0
3 3 3
(3 x
2x ) dx 3 x dx 2 x dx
2 2
B) 0 0 0
9
3 (9) 2 ( ) 18
2
3 4 37
C)
4 x dx 3 x dx 3
2 2
4
D) 4 x dx 0
2
4 3 4 37
F) 3 x dx 3 x dx 3 x dx 3 9 3 64
2 2 2
0 0 3 3
96
2.2.4. Fundamental Theorem of Calculus
If f is a continuous function on the closed interval
[a, b] and F is any antiderivative of f, then
b
a
f ( x ) dx F( x ) ba F(b ) F(a )
97
Example 1
3
5 dx
1
3 3
5 dx 5x
1 x 1
5 · 3 – 5 · 1 = 15 – 5 = 10
0x4
-1y6
98
Example 2
3
x dx
1
2
3
x dx x 3 9 1
1 4
2 x 1 2 2
Make a drawing to confirm your answer.
0x4
-1y4
99
Example 3
3
3 x
1. 0 x 2 dx 3
x 0
9-0= 9
3
0x4
- 2 y 10
100
Example 4
1 2x Let u = 2x 1 1 2x
2.
1 e dx 1 e 2 dx
du = 2 dx 2
1 1 u u 2x
e 1 e 1
1 e du x 1
x 1
2 2 2
e2 e 2
3.6268604
2 2
101
Example 5
2 1 2
3. 1 dx ln x
x x 1
= ln 2 – ln 1 = ln 2
= 0.69314718
102
Examples 6
3 2 2x 1 This is a combination
4. 1 x e dx of the previous three
x problems
3 2x
x e 3
ln x x 1
3 2
= 9 + (e 6)/2 + ln 3 – 1/3 – (e2)/2 – ln 1
= 207.78515
103
Examples 7
2 2
5 x Let u = x + 4 1
3
5 3 x
5. 0 dx
0 3
dx
3 du = 3x dx 3 x 4
x 4 2
3
1 51 ln u 5 ln ( x 4) 5
0 du x 0
x 0
3 u 3 3
(ln 129)/3 – (ln 4)/3 = 1.1578393
104
Examples 7 REVISITED
2
5 x Let u = x3 + 4
5. 0
3
dx
x 4 du = 3x2 dx
1 5 3x 2 1 51 ln u 5
0 3 dx 0 du x 0
3 x 4 3 u 3
At this point instead of substituting for u we can
replace the x value in terms of u. If x = 0 then u = 4 and
if x = 5, then u = 129.
ln u 129
(ln 129)/3 – (ln 4)/3 = 1.1578393
3 u 4
105
Numerical Integration on a Graphing
Calculator
Use some of the examples from above.
3. 2
1
1 dx
x 0x3
-1y
2 3
5 x
5. 0 dx
x3 4
-1 x
6 y
- 0.2
0.5
106
Example 8
3
2
90 x 5,000 dx 30 x 3 + 5,000x | x 3
108
Example
b a
a
f ( x ) dx
1000 0
(20000 10 x) dx
1 1000
( 20000x 5x 2 )
1000 x 0
111
2.2.5. Integration by Parts
Integration by parts is based on the product formula
for derivatives: d f ( x) g ( x) f ( x ) g' ( x) g ( x) f ' ( x)
dx
We rearrange the above equation to get:
d
f ( x ) g' ( x ) f ( x ) g ( x ) g ( x ) f ' ( x )
dx
And integrating both sides yields:
d
f ( x ) g' ( x ) f ( x ) g ( x ) g ( x ) f ' ( x )
dx
Which reduces to:
f ( x ) g' ( x ) f ( x ) g ( x ) g ( x ) f ' ( x )
112
Integration by Parts Formula
• If we let u = f (x) and v = g (x) in the preceding
formula the equation transforms into a more
convenient form:
114
Example
u dv u v v du
Consider x e dx x
x e dx
x
e x
x dx
x ln x dx ln x dx
3
4 4 x
Which when integrated is:
x4 x4
ln x C
Check by differentiating. 4 16
d x4 x4 x 1
4
4 x 3
ln x – C x 3 ln x x 3 ln x
dx 4 16 4 x 16
118