0% found this document useful (0 votes)
7 views191 pages

Single Variable Calculus All Notes

This document is a lecture from MIT's OpenCourseWare on Single Variable Calculus, focusing on derivatives. It covers the geometric and physical interpretations of derivatives, methods for differentiation, and the concept of limits and continuity. The lecture includes examples and visual aids to illustrate the principles of calculus.

Uploaded by

saiganesh.k
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views191 pages

Single Variable Calculus All Notes

This document is a lecture from MIT's OpenCourseWare on Single Variable Calculus, focusing on derivatives. It covers the geometric and physical interpretations of derivatives, methods for differentiation, and the concept of limits and continuity. The lecture includes examples and visual aids to illustrate the principles of calculus.

Uploaded by

saiganesh.k
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MIT OpenCourseWare

[Link]

18.01 Single Variable Calculus


Fall 2006

For information about citing these materials or our Terms of Use, visit: [Link]
Lecture 1 18.01 Fall 2006

Unit 1: Derivatives
A. What is a derivative?
• Geometric interpretation
• Physical interpretation
• Important for any measurement (economics, political science, finance, physics, etc.)

B. How to differentiate any function you know.


d � x arctan x �
• For example: e . We will discuss what a derivative is today. Figuring out how to
dx
differentiate any function is the subject of the first two weeks of this course.

Lecture 1: Derivatives, Slope, Velocity, and Rate


of Change

Geometric Viewpoint on Derivatives

y
Q

Secant line
Tangent line
P

f(x)

x0 x0+∆x

Figure 1: A function with secant and tangent lines

The derivative is the slope of the line tangent to the graph of f (x). But what is a tangent line,
exactly?

1
Lecture 1 18.01 Fall 2006

• It is NOT just a line that meets the graph at one point.


• It is the limit of the secant line (a line drawn between two points on the graph) as the distance
between the two points goes to zero.

Geometric definition of the derivative:

Limit of slopes of secant lines P Q as Q → P (P fixed). The slope of P Q:

Q
(x0+∆x, f(x0+∆x))

Secant Line
∆f

(x0, f(x0))
P
∆x

Figure 2: Geometric definition of the derivative

Δf f (x0 + Δx) − f (x0 )


lim = lim = f � (x0 )
Δx→0 Δx Δx→0
� Δx
�� � � �� �
“difference quotient” “derivative of f at x0 ”

1
Example 1. f (x) =
x
One thing to keep in mind when working with derivatives: it may be tempting to plug in Δx = 0
Δf 0
right away. If you do this, however, you will always end up with = . You will always need to
Δx 0
do some cancellation to get at the answer.
1 1

� � � �
Δf x0 +Δx x0 1 x0 − (x0 + Δx) 1 −Δx −1
= = = =
Δx Δx Δx (x0 + Δx)x0 Δx (x0 + Δx)x0 (x0 + Δx)x0

Taking the limit as Δx → 0,


−1 −1
lim = 2
Δx→0 (x0 + Δx)x0 x0

2
Lecture 1 18.01 Fall 2006

x
x0

1
Figure 3: Graph of x

Hence,
−1
f � (x0 ) =
x20
Notice that f � (x0 ) is negative — as is the slope of the tangent line on the graph above.

Finding the tangent line.

Write the equation for the tangent line at the point (x0 , y0 ) using the equation for a line, which you
all learned in high school algebra:

y − y0 = f � (x0 )(x − x0 )
1 −1
Plug in y0 = f (x0 ) = and f � (x0 ) = 2 to get:
x0 x0

1 −1
y− = 2 (x − x0 )
x0 x0

3
Lecture 1 18.01 Fall 2006

x
x0

1
Figure 4: Graph of x

Just for fun, let’s compute the area of the triangle that the tangent line forms with the x- and
y-axes (see the shaded region in Fig. 4).
First calculate the x-intercept of this tangent line. The x-intercept is where y = 0. Plug y = 0
into the equation for this tangent line to get:
1 −1
0− = (x − x0 )
x0 x20
−1 −1 1
= x+
x0 x20 x0
1 2
x =
x20 x0
2
x = x20 ( ) = 2x0
x0

So, the x-intercept of this tangent line is at x = 2x0 .


1 1
Next we claim that the y-intercept is at y = 2y0 . Since y =and x = are identical equations,
x y
the graph is symmetric when x and y are exchanged. By symmetry, then, the y-intercept is at
y = 2y0 . If you don’t trust reasoning with symmetry, you may follow the same chain of algebraic
reasoning that we used in finding the x-intercept. (Remember, the y-intercept is where x = 0.)
Finally,
1 1
Area = (2y0 )(2x0 ) = 2x0 y0 = 2x0 ( ) = 2 (see Fig. 5)
2 x0
Curiously, the area of the triangle is always 2, no matter where on the graph we draw the tangent
line.

4
Lecture 1 18.01 Fall 2006

x-1
2y0

y0

x
x0 2x0
1
Figure 5: Graph of x

Notations

Calculus, rather like English or any other language, was developed by several people. As a result,
just as there are many ways to express the same thing, there are many notations for the derivative.
Since y = f (x), it’s natural to write

Δy = Δf = f (x) − f (x0 ) = f (x0 + Δx) − f (x0 )

We say “Delta y” or “Delta f ” or the “change in y”.


If we divide both sides by Δx = x − x0 , we get two expressions for the difference quotient:

Δy Δf
=
Δx Δx
Taking the limit as Δx → 0, we get
Δy dy
→ (Leibniz’ notation)
Δx dx
Δf
→ f � (x0 ) (Newton’s notation)
Δx

When you use Leibniz’ notation, you have to remember where you’re evaluating the derivative
— in the example above, at x = x0 .
Other, equally valid notations for the derivative of a function f include
df �
, f , and Df
dx

5
Lecture 1 18.01 Fall 2006

Example 2. f (x) = xn where n = 1, 2, 3...


d n
What is x ?
dx
To find it, plug y = f (x) into the definition of the difference quotient.

Δy (x0 + Δx)n − xn0 (x + Δx)n − xn


= =
Δx Δx Δx
(From here on, we replace x0 with x, so as to have less writing to do.) Since

(x + Δx)n = (x + Δx)(x + Δx)...(x + Δx) n times

We can rewrite this as


xn + n(Δx)xn−1 + O (Δx)2
� �

O(Δx)2 is shorthand for “all of the terms with (Δx)2 , (Δx)3 , and so on up to (Δx)n .” (This is part
of what is known as the binomial theorem; see your textbook for details.)

Δy (x + Δx)n − xn xn + n(Δx)(xn−1 ) + O(Δx)2 − xn


= = = nxn−1 + O(Δx)
Δx Δx Δx
Take the limit:
Δy
lim = nxn−1
Δx→0 Δx
Therefore,

d n
x = nxn−1
dx

This result extends to polynomials. For example,


d 2
(x + 3x10 ) = 2x + 30x9
dx

Physical Interpretation of Derivatives


You can think of the derivative as representing a rate of change (speed is one example of this).
On Halloween, MIT students have a tradition of dropping pumpkins from the roof of this building,
which is about 400 feet high.
The equation of motion for objects near the earth’s surface (which we will just accept for now)
implies that the height above the ground y of the pumpkin is:

y = 400 − 16t2
Δy distance travelled
The average speed of the pumpkin (difference quotient) = =
Δt time elapsed
When the pumpkin hits the ground, y = 0,

400 − 16t2 = 0

6
Lecture 1 18.01 Fall 2006

Solve to find t = 5. Thus it takes 5 seconds for the pumpkin to reach the ground.
400 ft
Average speed = = 80 ft/s
5 sec

A spectator is probably more interested in how fast the pumpkin is going when it slams into the
ground. To find the instantaneous velocity at t = 5, let’s evaluate y � :

y � = −32t = (−32)(5) = −160 ft/s (about 110 mph)

y � is negative because the pumpkin’s y-coordinate is decreasing: it is moving downward.

7
Lecture 2 18.01 Fall 2006

Lecture 2: Limits, Continuity, and Trigonometric


Limits

More about the “rate of change” interpretation of the


derivative

y
y = f(x)

∆y

∆x

Figure 1: Graph of a generic function, with Δx and Δy marked on the graph

Δy dy
→ as Δx → 0
Δx dx

Average rate of change → Instantaneous rate of change

Examples
dq
1. q = charge = electrical current
dt
ds
2. s = distance = speed
dt
dT
3. T = temperature = temperature gradient
dx

1
Lecture 2 18.01 Fall 2006

4. Sensitivity of measurements: An example is carried out on Problem Set 1. In GPS, radio


signals give us h up to a certain measurement error (See Fig. 2 and Fig. 3). The question is
ΔL
how accurately can we measure L. To decide, we find . In other words, these variables are
Δh
related to each other. We want to find how a change in one variable affects the other variable.

satellite

h
s

you
L

Figure 2: The Global Positioning System Problem (GPS)

h
s

L
Figure 3: On problem set 1, you will look at this simplified “flat earth” model

2
Lecture 2 18.01 Fall 2006

Limits and Continuity

Easy Limits
x2 + x 32 + 3 12
lim = = =3
x→3 x + 1 3+1 4
With an easy limit, you can get a meaningful answer just by plugging in the limiting value.
Remember,
Δf f (x0 + Δx) − f (x0 )
lim = lim
x→x0 Δx x→x0 Δx
is never an easy limit, because the denominator Δx = 0 is not allowed. (The limit x → x0 is
� x0 .)
computed under the implicit assumption that x =

Continuity

We say f (x) is continuous at x0 when

lim f (x) = f (x0 )


x→x0

Pictures

Figure 4: Graph of the discontinuous function listed below


x+1 x>0
f (x) =
−x x≥0

3
Lecture 2 18.01 Fall 2006

This discontinuous function is seen in Fig. 4. For x > 0,

lim f (x) = 1
x→ 0

but f (0) = 0. (One can also say, f is continuous from the left at 0, not the right.)

1. Removable Discontinuity

Figure 5: A removable discontinuity: function is continuous everywhere, except for one point

Definition of removable discontinuity

Right-hand limit: lim+ f (x) means lim f (x) for x > x0 .


x→x0 x→x0

Left-hand limit: lim f (x) means lim f (x) for x < x0 .


x→x− x→x0
0

If lim+ f (x) = lim− f (x) but this is not f (x0 ), or if f (x0 ) is undefined, we say the disconti­
x→x0 x→x0
nuity is removable.

sin(x)
For example, � 0. We will see later how to evaluate the limit as x → 0.
is defined for x =
x

4
Lecture 2 18.01 Fall 2006

2. Jump Discontinuity

x0

Figure 6: An example of a jump discontinuity

lim for (x < x0 ) exists, and lim− for (x > x0 ) also exists, but they are NOT equal.
x→x+
0 x→x0

3. Infinite Discontinuity

1
Figure 7: An example of an infinite discontinuity:
x

1 1
Right-hand limit: lim = ∞; Left-hand limit: lim = −∞
x→0+ x x→0− x

5
Lecture 2 18.01 Fall 2006

4. Other (ugly) discontinuities

Figure 8: An example of an ugly discontinuity: a function that oscillates a lot as it approaches the origin

This function doesn’t even go to ±∞ — it doesn’t make sense to say it goes to anything. For
something like this, we say the limit does not exist.

6
Lecture 2 18.01 Fall 2006

Picturing the derivative

y’
x

1 1
Figure 9: Top: graph of f (x) = and Bottom: graph of f � (x) = − 2
x x

Notice that the graph of f (x) does NOT look like the graph of f � (x)! (You might also notice
that f (x) is an odd function, while f � (x) is an even function. The derivative of an odd function is
always even, and vice versa.)

7
Lecture 2 18.01 Fall 2006

Pumpkin Drop, Part II


This time, someone throws a pumpkin over the tallest building on campus.

Figure 10: y = 400 − 16t2 , −5 ≤ t ≤ 5

Figure 11: Top: graph of y(t) = 400 − 16t2 . Bottom: the derivative, y� (t)

8
Lecture 2 18.01 Fall 2006

Two Trig Limits

Note: In the expressions below, θ is in radians— NOT degrees!

sin θ 1 − cos θ
lim = 1; lim =0
θ →0 θ θ →0 θ

Here is a geometric proof for the first limit:

arc
1 sinθ length
θ =θ

Figure 12: A circle of radius 1 with an arc of angle θ

arc
1 length
sin θ
θ =θ

Figure 13: The sector in Fig. 12 as θ becomes very small

Imagine what happens to the picture as θ gets very small (see Fig. 13). As θ → 0, we see that
sin θ
→ 1.
θ

9
Lecture 2 18.01 Fall 2006

What about the second limit involving cosine?

arc
1 length

θ 1 - cos θ
cos θ

Figure 14: Same picture as Fig. 12 except that the horizontal distance between the edge of the triangle and the
perimeter of the circle is marked

From Fig. 15 we can see that as θ → 0, the length 1 − cos θ of the short segment gets much
1 − cos θ
smaller than the vertical distance θ along the arc. Hence, → 0.
θ

1 arc
length

θ cos θ
1 - cos θ
Figure 15: The sector in Fig. 14 as θ becomes very small

10
Lecture 2 18.01 Fall 2006

We end this lecture with a theorem that will help us to compute more derivatives next time.

Theorem: Differentiable Implies Continuous.


If f is differentiable at x0 , then f is continuous at x0 .
� �
f (x) − f (x0 )
Proof: lim (f (x) − f (x0 )) = lim (x − x0 ) = f � (x0 ) · 0 = 0.
x→x0 x→x0 x − x0
x − x0
Remember: you can never divide by zero! The first step was to multiply by . It looks as
x − x0
0
if this is illegal because when x = x0 , we are multiplying by . But when computing the limit as
0
x → x0 we always assume x �= x0 . In other words x − x0 �= 0. So the proof is valid.

11
Lecture 3 18.01 Fall 2006

Lecture 3
Derivatives of Products, Quotients, Sine, and
Cosine

Derivative Formulas
There are two kinds of derivative formulas:
� �
d n d 1
1. Specific Examples: x or
dx dx x
2. General Examples: (u + v)� = u� + v � and (cu) = cu� (where c is a constant)

A notational convention we will use today is:

(u + v)(x) = u(x) + v(x); uv(x) = u(x)v(x)

Proof of (u + v) = u� + v � . (General)

Start by using the definition of the derivative.

(u + v)(x + Δx) − (u + v)(x)


(u + v)� (x) = lim
Δx→0 Δx
u(x + Δx) + v(x + Δx) − u(x) − v(x)
= lim
Δx→0
� Δx �
u(x + Δx) − u(x) v(x + Δx) − v(x)
= lim +
Δx→0 Δx Δx
(u + v)� (x) = u� (x) + v � (x)

Follow the same procedure to prove that (cu)� = cu� .

Derivatives of sin x and cos x. (Specific)

Last time, we computed


sin x
lim = 1
x→0 x
d sin(0 + Δx) − sin(0) sin(Δx)
(sin x)|x=0 = lim = lim = 1
dx Δx→0 Δx Δx→0 Δx
d cos(0 + Δx) − cos(0) cos(Δx) − 1
(cos x)|x=0 = lim = lim = 0
dx Δx→0 Δx Δx→0 Δx

d d
So, we know the value of sin x and of cos x at x = 0. Let us find these for arbitrary x.
dx dx
d sin(x + Δx) − sin(x)
sin x = lim
dx Δx→0 Δx

1
Lecture 3 18.01 Fall 2006

Recall:
sin(a + b) = sin(a) cos(b) + sin(b) cos(a)

So,
d sin x cos Δx + cos x sin Δx − sin(x)
sin x = lim
dx Δx→0
� Δx �
sin x(cos Δx − 1) cos x sin Δx
= lim +
Δx→0 Δx Δx
� � � �
cos Δx − 1 sin Δx
= lim sin x + lim cos x
Δx→0 Δx Δx→0 Δx

cos Δx − 1 sin Δx
Since → 0 and that → 1, the equation above simplifies to
Δx Δx
d
sin x = cos x
dx
A similar calculation gives
d
cos x = − sin x
dx

Product formula (General)

(uv)� = u� v + uv �
Proof:
(uv)(x + Δx) − (uv)(x) u(x + Δx)v(x + Δx) − u(x)v(x)
(uv)� = lim = lim
Δx→0 Δx Δx → 0 Δx
Now obviously,
u(x + Δx)v(x) − u(x + Δx)v(x) = 0
so adding that to the numerator won’t change anything.
u(x + Δx)v(x) − u(x)v(x) + u(x + Δx)v(x + Δx) − u(x + Δx)v(x)
(uv)� = lim
Δx→0 Δx
We can re-arrange that expression to get
� � � �
u(x + Δx) − u(x) v(x + Δx) − v(x)
(uv)� = lim v(x) + u(x + Δx)
Δx→0 Δx Δx
Remember, the limit of a sum is the sum of the limits.
� � � � ��
u(x + Δx) − u(x) v(x + Δx) − v(x)
lim v(x) + lim u(x + Δx)
Δx→0 Δx Δx→0 Δx
(uv)� = u� (x)v(x) + u(x)v � (x)
Note: we also used the fact that

lim u(x + Δx) = u(x) (true because u is continuous)


Δx→0

This proof of the product rule assumes that u and v have derivatives, which implies both functions
are continuous.

2
Lecture 3 18.01 Fall 2006

∆v

u ∆u
Figure 1: A graphical “proof” of the product rule

An intuitive justification:

We want to find the difference in area between the large rectangle and the smaller, inner rectangle.
The inner (orange) rectangle has area uv. Define Δu, the change in u, by

Δu = u(x + Δx) − u(x)

We also abbreviate u = u(x), so that u(x + Δx) = u + Δu, and, similarly, v(x + Δx) = v + Δv.
Therefore the area of the largest rectangle is (u + Δu)(v + Δv).
If you let v increase and keep u constant, you add the area shaded in red. If you let u increase
and keep v constant, you add the area shaded in yellow. The sum of areas of the red and yellow
rectangles is:
[u(v + Δv) − uv] + [v(u + Δu) − uv] = uΔv + vΔu
If Δu and Δv are small, then (Δu)(Δv) ≈ 0, that is, the area of the white rectangle is very
small. Therefore the difference in area between the largest rectangle and the orange rectangle is
approximately the same as the sum of areas of the red and yellow rectangles. Thus we have:

[(u + Δu)(v + Δv) − uv] ≈ uΔv + vΔu


(Divide by Δx and let Δx → 0 to finish the argument.)

3
Lecture 3 18.01 Fall 2006

Quotient formula (General)

To calculate the derivative of u/v, we use the notations Δu and Δv above. Thus,

u(x + Δx) u(x) u + Δu u


− = −
v(x + Δx) v(x) v + Δv v
(u + Δu)v − u(v + Δv)
= (common denominator)
(v + Δv)v
(Δu)v − u(Δv)
= (cancel uv − uv)
(v + Δv)v

Hence,
Δu Δv du dv
1

u + Δu u
� ( )v − u( ) v( ) − u( )
− = Δx Δx −→ dx dx as Δx → 0
Δx v + Δv v (v + Δv)v v2

Therefore,
u u� v − uv �
( )� =
v v2
.

4
Lecture 4 Sept. 14, 2006 18.01 Fall 2006

Lecture 4
Chain Rule, and Higher Derivatives

Chain Rule
We’ve got general procedures for differentiating expressions with addition, subtraction, and multi­
plication. What about composition?
Example 1. y = f (x) = sin x, x = g(t) = t2 .
dy
So, y = f (g(t)) = sin(t2 ). To find , write
dt

t0 = t0 t = t0 + Δt
x0 = g(t0 ) x = x0 + Δx
y0 = f (x0 ) y = y0 + Δy

Δy Δy Δx
= ·
Δt Δx Δt
As Δt → 0, Δx → 0 too, because of continuity. So we get:

dy dy dx
= ← The Chain Rule!
dt dx dt
dx dy
In the example, = 2t and = cos x.
dt dx

d � dy dx
sin(t2 )

So, = ( )( )
dt dx dt
= (cos x)(2t)
(2t) cos(t2 )
� �
=

Another notation for the chain rule


� �
d d
f (g(t)) = f � (g(t))g � (t) or f (g(x)) = f � (g(x))g � (x)
dt dx

Example 1. (continued) Composition of functions f (x) = sin x and g(x) = x2

(f ◦ g)(x) = f (g(x)) = sin(x2 )


(g ◦ f )(x) = g(f (x)) = sin2 (x)
Note: f ◦g �= g ◦ f. Not Commutative!

1
Lecture 4 Sept. 14, 2006 18.01 Fall 2006

x g(x) f(g(x))
g f

Figure 1: Composition of functions: f ◦ g(x) = f (g(x))

� �
d 1
Example 2. cos =?
dx x
1
Let u =
x
dy dy du
=
dx du dx
dy du 1
= − sin(u); = − 2
du dx x � �
1
� � sin
dy sin(u) −1 x
= = (− sin u) =
dx x2 x2 x2

d � −n �
Example 3. x =?
dx
� �n
1 1
There are two ways to proceed. x−n = , or x−n = n
x x

� �n � �n−1 � �
d � −n � d 1 1 −1
1. x = = n = −nx−(n−1) x−2 = −nx−n−1
dx dx x x x2
� � � �
d � −n � d 1 −1
2. x = = nx n−1
= −nx−n−1 (Think of xn as u)
dx dx xn x2n

2
Lecture 4 Sept. 14, 2006 18.01 Fall 2006

Higher Derivatives
Higher derivatives are derivatives of derivatives. For instance, if g = f � , then h = g � is the second
derivative of f . We write h = (f � )� = f �� .
Notations

df
f � (x) Df dx
d2 f
f �� (x) D2 f dx2
d3 f
f ��� (x) D3 f dx3
dn f
f (n) (x) Dn f dxn

Higher derivatives are pretty straightforward —- just keep taking the derivative!

Example. Dn xn = ?
Start small and look for a pattern.

Dx = 1
2 2
D x = D(2x) = 2 ( = 1 · 2)
D 3 x3 = D2 (3x2 ) = D(6x) = 6 ( = 1 · 2 · 3)
4 4 3 3 2 2
D x = D (4x ) = D (12x ) = D(24x) = 24 ( = 1 · 2 · 3 · 4)
n n
D x = n! ← we guess, based on the pattern we’re seeing here.

The notation n! is called “n factorial” and defined by n! = n(n − 1) · · · 2 · 1


Proof by Induction: We’ve already checked the base case (n = 1).

Induction step: Suppose we know Dn xn = n! (nth case). Show it holds for the (n + 1)st case.

Dn+1 xn+1 = Dn Dxn+1 = Dn ((n + 1)xn ) = (n + 1)Dn xn = (n + 1)(n!)


� �

Dn+1 xn+1 = (n + 1)!

Proved!

3
Lecture 5 18.01 Fall 2006

Lecture 5
Implicit Differentiation and Inverses

Implicit Differentiation
d a
Example 1. (x ) = axa−1 .
dx
We proved this by an explicit computation for a = 0, 1, 2, .... From this, we also got the formula for
a = −1, −2, .... Let us try to extend this formula to cover rational numbers, as well:
m
m
a= ; y=xn where m and n are integers.
n
dy dy dy
We want to compute . We can say y n = xm so ny n−1 = mxm−1 . Solve for :
dx dx dx
dy m xm−1
=
dx n y n−1

m
We know that y = x( n ) is a function of x.

m xm−1
� �
dy
=
dx n y n−1
xm−1
� �
m
=
n (xm/n )n−1
m xm−1
=
n xm(n−1)/n
m (m−1)− m(n−1)
= x n
n
m n(m−1)−m(n−1)
= x n
n
m nm−n−nm+m
= x n
n
m m−n
= xn n
n
dy m m −1
So, = xn
dx n
This is the same answer as we were hoping to get!
Example√2. Equation of a circle with a radius of 1: x2 +y 2 = 1 which we can write as y 2 = 1−x2 .
So y = ± 1 − x2 . Let us look at the positive case:

� 1
y = + 1 − x2 = (1 − x2 ) 2
� �
dy 1 −1 −x −x
= (1 − x2 ) 2 (−2x) = √ =
dx 2 1−x 2 y

1
Lecture 5 18.01 Fall 2006

Now, let’s do the same thing, using implicit differentiation.


x2 + y 2 = 1
d � 2 d
x + y2

= (1) = 0
dx dx
d 2 d 2
(x ) + (y ) = 0
dx dx

Applying chain rule in the second term,


dy
2x + 2y = 0
dx
dy
2y = −2x
dx
dy −x
=
dx y
Same answer!

Example 3. y 3 + xy 2 + 1 = 0. In this case, it’s not easy to solve for y as a function of x. Instead,
dy
we use implicit differentiation to find .
dx
dy dy
3y 2 + y 2 + 2xy = 0
dx dx
dy
We can now solve for in terms of y and x.
dx
dy
(3y 2 + 2xy) = −y 2
dx
dy −y 2
=
dx 3y 2 + 2xy

Inverse Functions

If y = f (x) and g(y) = x, we call g the inverse function of f , f −1 :


x = g(y) = f −1 (y)

Now, let us use implicit differentiation to find the derivative of the inverse function.
y = f (x)
−1
f (y) = x
d −1 d
(f (y)) = (x) = 1
dx dx

By the chain rule:


d −1 dy
(f (y)) = 1
dy dx
and
d −1 1
(f (y)) =
dy dy
dx

2
Lecture 5 18.01 Fall 2006

So, implicit differentiation makes it possible to find the derivative of the inverse function.
Example. y = arctan(x)

tan y = x
d dx
[tan(y)] = = 1
dx dx
d dy
[tan(y)] = 1
dy dx
� �
1 dy
2
= 1
cos (y) dx
dy
= cos2 (y) = cos2 (arctan(x))
dx

This form is messy. Let us use some geometry to simplify it.

y
(1+x2)1/2
1

Figure 1: Triangle with angles and lengths corresponding to those in the example illustrating differentiation using
the inverse function arctan

In this triangle, tan(y) = x so


arctan(x) = y

The Pythagorian theorem tells us the length of the hypotenuse:



h = 1 + x2

From this, we can find


1
cos(y) = √
1 + x2
From this, we get
� �2
2 1 1
cos (y) = √ =
1 + x2 1 + x2

3
Lecture 5 18.01 Fall 2006

So,
dy 1
=
dx 1 + x2
In other words,
d 1
arctan(x) =
dx 1 + x2

Graphing an Inverse Function.

Suppose y = f (x) and g(y) = f −1 (y) = x. To graph g and f together we need to write g as a
function of the variable x. If g(x) = y, then x = f (y), and what we have done is to trade the
variables x and y. This is illustrated in Fig. 2
f −1 (f (x)) = x f −1 ◦ f (x) = x

f (f −1 (x)) = x f ◦ f −1 (x) = x

y y=x
f(x)
g(x)

b=f(a)

a=f-1(b) x

Figure 2: You can think about f −1 as the graph of f reflected about the line y = x

4
Lecture 6 18.01 Fall 2006

Lecture 6: Exponential and Log, Logarithmic


Differentiation, Hyperbolic Functions

Taking the derivatives of exponentials and logarithms

Background

We always assume the base, a, is greater than 1.

a0 = 1; a1 = a; a2 = a · a; ...

ax1 +x2 = ax1 ax2


x2
(ax1 ) = a x1 x2
p √q
a q = ap (where p and q are integers)

To define ar for real numbers r, fill in by continuity.

d x
Today’s main task: find a
dx
We can write
d x ax+Δx − ax
a = lim
dx Δx→0 Δx

We can factor out the ax :


ax+Δx − ax aΔx − 1 aΔx − 1
lim = lim ax = ax lim
Δx→0 Δx Δx→0 Δx Δx→0 Δx
Let’s call
aΔx − 1
M (a) ≡ lim
Δx→0 Δx
We don’t yet know what M (a) is, but we can say
d x
a = M (a)ax
dx
Here are two ways to describe M (a):

d x
1. Analytically M (a) = a at x = 0.
dx
a0+Δx − a0

d x ��
Indeed, M (a) = lim = a
Δx→0 Δx dx �x=0

1
Lecture 6 18.01 Fall 2006

ax

M(a)
(slope of ax at x=0)

Figure 1: Geometric definition of M (a)

2. Geometrically, M (a) is the slope of the graph y = ax at x = 0.

The trick to figuring out what M (a) is is to beg the question and define e as the number such
that M (e) = 1. Now can we be sure there is such a number e? First notice that as the base a
increases, the graph ax gets steeper. Next, we will estimate the slope M (a) for a = 2 and a = 4
geometrically. Look at the graph of 2x in Fig. 2. The secant line from (0, 1) to (1, 2) of the graph
y = 2x has slope 1. Therefore, the slope of y = 2x at x = 0 is less: M (2) < 1 (see Fig. 2).
1 1
Next, look at the graph of 4x in Fig. 3. The secant line from (− , ) to (1, 0) on the graph of
2 2
y = 4x has slope 1. Therefore, the slope of y = 4x at x = 0 is greater than M (4) > 1 (see Fig. 3).
Somewhere in between 2 and 4 there is a base whose slope at x = 0 is 1.

2
Lecture 6 18.01 Fall 2006

y=2x
slope = 1
(1,2)
e
t lin
n
seca
slope M(2)

Figure 2: Slope M (2) < 1

y=4x

(4)
o p eM
s l
t lin e
secan
(-1/2, 1/2) (1,0)

Figure 3: Slope M (4) > 1

3
Lecture 6 18.01 Fall 2006

Thus we can define e to be the unique number such that


M (e) = 1
or, to put it another way,
eh − 1
lim =1
h→0 h
or, to put it still another way,
d x
(e ) = 1 at x = 0
dx
d x d x
What is (e )? We just defined M (e) = 1, and (e ) = M (e)ex . So
dx dx
d x
(e ) = ex
dx

Natural log (inverse function of ex )

To understand M (a) better, we study the natural log function ln(x). This function is defined as
follows:

If y = ex , then ln(y) = x

(or)

If w = ln(x), then ex = w

Note that ex is always positive, even if x is negative.


Recall that ln(1) = 0; ln(x) < 0 for 0 < x < 1; ln(x) > 0 for x > 1. Recall also that

ln(x1 x2 ) = ln x1 + ln x2
d dw
Let us use implicit differentiation to find ln(x). w = ln(x). We want to find .
dx dx

ew = x
d w d
(e ) = (x)
dx dx
d w dw
(e ) = 1
dw dx
w dw
e = 1
dx
dw 1 1
= =
dx ew x

d 1
(ln(x)) =
dx x

4
Lecture 6 18.01 Fall 2006

d x
Finally, what about (a )?
dx
There are two methods we can use:

Method 1: Write base e and use chain rule.

Rewrite a as eln(a) . Then, � �x


ax = eln(a) = ex ln(a)

That looks like it might be tricky to differentiate. Let’s work up to it:


d x
e = ex
dx
and by the chain rule,
d 3x
e = 3e3x
dx

Remember, ln(a) is just a constant number– not a variable! Therefore,


d (ln a)x
e = (ln a)e(ln a)x
dx
or
d x
(a ) = ln(a) · ax
dx

Recall that
d x
(a ) = M (a) · ax
dx
So now we know the value of M (a): M (a) = ln(a).
Even if we insist on starting with another base, like 10, the natural logarithm appears:
d x
10 = (ln 10)10x
dx

The base e may seem strange at first. But, it comes up everywhere. After a while, you’ll learn to
appreciate just how natural it is.

Method 2: Logarithmic Differentiation.

d d
The idea is to find f (x) by finding ln(f (x)) instead. Sometimes this approach is easier. Let
dx dx
u = f (x). � �
d d ln(u) du 1 du
ln(u) = =
dx du dx u dx
du
Since u = f and = f � , we can also write
dx

f�
(ln f )� = or f � = f (ln f )�
f

5
Lecture 6 18.01 Fall 2006

Apply this to f (x) = ax .


d d d
ln f (x) = x ln a =⇒ ln(f ) = ln(ax ) = (x ln(a)) = ln(a).
dx dx dx
(Remember, ln(a) is a constant, not a variable.) Hence,
d f� d x
(ln f ) = ln(a) =⇒ = ln(a) =⇒ f � = ln(a)f =⇒ a = (ln a)ax
dx f dx

d x
Example 1. (x ) = ?
dx

With variable (“moving”) exponents, you should use either base e or logarithmic differentiation.
In this example, we will use the latter.

f = xx
ln f = x ln x
� �
� 1
(ln f ) = 1 · (ln x) + x = ln(x) + 1
x
f�
(ln f )� =
f
Therefore,
f � = f (ln f )� = xx (ln(x) + 1)

If you wanted to solve this using the base e approach, you would say f = ex ln x and differentiate
it using the chain rule. It gets you the same answer, but requires a little more writing.

� �k
1
Example 2. Use logs to evaluate lim 1+ .
k→∞ k

Because the exponent k changes, it is better to find the limit of the logarithm.
�� �k �
1
lim ln 1+
k→∞ k

We know that �� �k � � �
1 1
ln 1+ = k ln 1 +
k k
� �
1
This expression has two competing parts, which balance: k → ∞ while ln 1 + → 0.
k
�� �k �
ln 1 + k1
� � � �
1 1 ln(1 + h) 1
ln 1 + = k ln 1 + = 1 = (with h = )
k k k
h k

Next, because ln 1 = 0 �� �k �
1 ln(1 + h) − ln(1)
ln 1 + =
k h

6
Lecture 6 18.01 Fall 2006

1
Take the limit: h = → 0 as k → ∞, so that
k
ln(1 + h) − ln(1) d �
lim = ln(x)� =1

h→0 h dx x=1

In all,
� �k
1
lim ln 1 + = 1.
k→∞ k
� �k
1
We have just found that ak = ln[ 1 + ] → 1 as k → ∞.
k
� �k
1
If bk = 1 + , then bk = eak → e1 as k → ∞. In other words, we have evaluated the limit we
k
wanted:

� �k
1
lim 1 + =e
k→∞ k

Remark 1. We never figured out what the exact numerical value of e was. Now we can use this
limit formula; k = 10 gives a pretty good approximation to the actual value of e.
Remark 2. Logs are used in all sciences and even in finance. Think about the stock market. If I
say the market fell 50 points today, you’d need to know whether the market average before the drop
was 300 points or 10, 000. In other words, you care about the percent change, or the ratio of the
change to the starting value:
f � (t) d
= ln(f (t))
f (t) dt

7
Lecture 7 18.01 Fall 2006

Lecture 7: Continuation and Exam Review

Hyperbolic Sine and Cosine

Hyperbolic sine (pronounced “sinsh”):

ex − e−x
sinh(x) =
2
Hyperbolic cosine (pronounced “cosh”):

ex + e−x
cosh(x) =
2
d e − e−x ex − (−e−x )
� x �
d
sinh(x) = = = cosh(x)
dx dx 2 2
Likewise,
d
cosh(x) = sinh(x)
dx
d
(Note that this is different from cos(x).)
dx
Important identity:
cosh2 (x) − sinh2 (x) = 1

Proof:
�2 � x �2
ex + e−x e − e−x

cosh2 (x) − sinh2 (x) = −
2 2
1 � 2x � 1 � 2x 1
cosh2 (x) − sinh2 (x) e + 2ex e−x + e−2x − e − 2 + e−2x = (2 + 2) = 1

=
4 4 4

Why are these functions called “hyperbolic”?


Let u = cosh(x) and v = sinh(x), then
u2 − v 2 = 1
which is the equation of a hyperbola.
Regular trig functions are “circular” functions. If u = cos(x) and v = sin(x), then

u2 + v 2 = 1

which is the equation of a circle.

1
Lecture 7 18.01 Fall 2006

Exam 1 Review

General Differentiation Formulas

(u + v)� = u� + v �
(cu)� = cu�
(uv)� = u� v + uv � (product rule)
� u �� u� v − uv �
= (quotient rule)
v v2
d
f (u(x)) = f � (u(x)) · u� (x) (chain rule)
dx

You can remember the quotient rule by rewriting


� u ��
= (uv −1 )�
v
and applying the product rule and chain rule.

Implicit differentiation

Let’s say you want to find y � from an equation like

y 3 + 3xy 2 = 8
d
Instead of solving for y and then taking its derivative, just take of the whole thing. In this
dx
example,

3y 2 y � + 6xyy � + 3y 2 = 0
(3y 2 + 6xy)y � = −3y 2
−3y 2
y� =
3y 2 + 6xy

Note that this formula for y � involves both x and y. Implicit differentiation can be very useful for
taking the derivatives of inverse functions.
For instance,
y = sin−1 x ⇒ sin y = x
Implicit differentiation yields
(cos y)y � = 1
and
1 1
y� = =√
cos y 1 − x2

2
Lecture 7 18.01 Fall 2006

Specific differentiation formulas

You will be responsible for knowing formulas for the derivatives and how to deduce these formulas
from previous information: xn , sin−1 x, tan−1 x, sin x, cos x, tan x, sec x, ex , ln x .
d
For example, let’s calculate sec x:
dx
d d 1 −(− sin x)
sec x = = = tan x sec x
dx dx cos x cos2 x

d d
You may be asked to find sin x or cos x, using the following information:
dx dx
sin(h)
lim = 1
h→0 h
cos(h) − 1
lim = 0
h→0 h

Remember the definition of the derivative:


d f (x + Δx) − f (x)
f (x) = lim
dx Δx→0 Δx

Tying up a loose end


d r
How to find x , where r is a real (but not necessarily rational) number? All we have done so far
dx
is the case of rational numbers, using implicit differentiation. We can do this two ways:

1st method: base e

x = eln x
� ln x �r
xr = e = er ln x
d r d r ln x d r
x = e = er ln x (r ln x) = er ln x
dx dx dx x
d r r r
� �
r−1
x = x = rx
dx x

2nd method: logarithmic differentiation

f�
(ln f )� =
f
f = xr
ln f = r ln x
r
(ln f )� =
x � �
r
f � = f (ln f )� = xr = rxr−1
x

3
Lecture 7 18.01 Fall 2006

Finally, in the first lecture I promised you that you’d learn to differentiate anything— even
something as complicated as
d x tan−1 x
e
dx
So let’s do it!
d uv d
e = euv (uv) = euv (u� v + uv � )
dx dx
Substituting,
� � ��
d x tan−1 x −1 1
e = ex tan x
tan−1 x + x
dx 1 + x2

4
MIT OpenCourseWare
[Link]

18.01 Single Variable Calculus


Fall 2006

For information about citing these materials or our Terms of Use, visit: [Link]
Lecture 9 18.01 Fall 2006

Lecture 9: Linear and Quadratic Approximations

Unit 2: Applications of Differentiation


Today, we’ll be using differentiation to make approximations.
Linear Approximation

y y = b+a(x-x0)
b = f(x0) ; a = f’(x0 )
y=f(x)

(x0 ,f(x0 ))

Figure 1: Tangent as a linear approximation to a curve

The tangent line approximates f (x). It gives a good approximation near the tangent point x0 .
As you move away from x0 , however, the approximation grows less accurate.

f (x) ≈ f (x0 ) + f � (x0 )(x − x0 )

Example 1. f (x) = ln x, x0 = 1 (basepoint)


1 ��
f (1) = ln 1 = 0; f � (1) = =1
x �x=1
ln x ≈ f (1) + f � (1)(x − 1) = 0 + 1 · (x − 1) = x − 1

Change the basepoint:


x=1+u =⇒ u=x−1
ln(1 + u) ≈ u
Basepoint u0 = x0 − 1 = 0.

1
Lecture 9 18.01 Fall 2006

Basic list of linear approximations

In this list, we always use base point x0 = 0 and assume that |x| << 1.

1. sin x ≈ x (if x ≈ 0) (see part a of Fig. 2)


2. cos x ≈ 1 (if x ≈ 0) (see part b of Fig. 2)
x
3. e ≈ 1 + x (if x ≈ 0)
4. ln(1 + x) ≈ x (if x ≈ 0)
5. (1 + x)r ≈ 1 + rx (if x ≈ 0)

Proofs
Proof of 1: Take f (x) = sin x, then f � (x) = cos x and f (0) = 0
f � (0) = 1, f (x) ≈ f (0) + f � (0)(x − 0) = 0 + 1.x
So using basepoint x0 = 0, f (x) = x. (The proofs of 2, 3 are similar. We already proved 4 above.)
Proof of 5:
f (x) = (1 + x)r ; f (0) = 1
d
f � (0) = (1 + x)r |x=0 = r(1 + x)r−1 |x=0 = r
dx
f (x) = f (0) + f � (0)x = 1 + rx

y=x y=1

sin(x)

cos(x)

(a) (b)

Figure 2: Linear approximation to (a) sin x (on left) and (b) cos x (on right). To find them, apply f (x) ≈ f (x0 ) +
f � (x0 )(x − x0 ) (x0 = 0)

e−2x
Example 2. Find the linear approximation of f (x) = √ near x = 0.
1+x
� �
We could calculate f (x) and find f (0). But instead, we will do this by combining basic approxi­
mations algebraically.
e−2x ≈ 1 + (−2x) (eu ≈ 1 + u, where u = −2x)

2
Lecture 9 18.01 Fall 2006

√ 1
1 + x = (1 + x)1/2 ≈ 1 + x
2
Put these two approximations together to get
e−2x 1 − 2x 1
√ ≈ ≈ (1 − 2x)(1 + x)−1
1+x 1 + 12 x 2

Moreover (1 + 12 x)−1 ≈ 1 − 21 x (using (1 + u)−1 ≈ 1 − u with u = x/2). Thus 1

e−2x 1 1 1
√ ≈ (1 − 2x)(1 − x) = 1 − 2x − x + 2( )x2
1+x 2 2 2
Now, we discard that last x2 term, because we’ve already thrown out a number of other x2 (and
higher order) terms in making these approximations. Remember, we’re assuming that | x |<< 1.
This means that x2 is very small, x3 is even smaller, etc. We can ignore these higher-order terms,
because they are very, very small. This yields
e−2x 1 5
√ ≈ 1 − 2x − x = 1 − x
1+x 2 2
5 −5
Because f (x) ≈ 1 − x, we can deduce f (0) = 1 and f � (0) = directly from our linear approxi­
2 �
2
mation, which is quicker in this case than calculating f (x).

Example 3. f (x) = (1 + 2x)10 .


(1 + 2x)10 − 1
On the first exam, you were asked to calculate lim . The quickest way to do this with
x→0 x
the tools of Unit 1 is as follows.
(1 + 2x)10 − 1 f (x) − f (0)
lim = lim = f � (0) = 20
x→ 0 x x →0 x
(since f � (x) = 10(1 + 2x)9 · 2 = 20 at x = 0)
Now we can do the same problem a different way, namely, using linear approximation.
(1 + 2x)10 ≈ 1 + 10(2x) (Use (1 + u)r ≈ 1 + ru where u = 2x and r = 10.)

Hence,
(1 + 2x)10 − 1 1 + 20x − 1
≈ = 20
x x

Example 4: Planet Quirk Let’s say I am on Planet Quirk, and that a satellite is whizzing
overhead with a velocity v. We want to find the time dilation (a concept from special relativity)
that the clock onboard the satellite experiences relative to my wristwatch. We borrow the following
equation from special relativity:
T
T� = �
2
1 − vc2

1A 1 1 1
shortcut to the two-step process √ ≈ x ≈1− x is to write
1+x 1+ 2
2
1 1
√ = (1 + x)−1/2 ≈ 1 − x
1+x 2

3
Lecture 9 18.01 Fall 2006

satellite

(with velocity v)

me

Figure 3: Illustration of Example 4: a satellite with velocity v speeding past “me” on planet Quirk.

Here, T � is the time I measure on my wristwatch, and T is the time measured onboard the satellite.
�−1/2
v2 1 v2 v2
� � � � �
1
T� = T 1 − 2 ≈1+ (1 + u)4
≈ 1 + ru, where u = − , r = −
c 2 c2 c2 2
v2
If v = 4 km/s, and the speed of light (c) is 3 × 105 km/s, 2 ≈ 10−10 . There’s hardly any difference
c
between the times measured on the ground and in the satellite. Nevertheless, engineers used this very
approximation (along with several other such approximations) to calibrate the radio transmitters
on GPS satellites. (The satellites transmit at a slightly offset frequency.)

Quadratic Approximations

These are more complicated. They are only used when higher accuracy is needed.
f �� (x0 )
f (x) ≈ f (x0 ) + f � (x0 )(x − x0 ) + (x − x0 )2 (x ≈ x0 )
2

Geometric picture: A quadratic approximation gives a best-fit parabola to a function. For


example, let’s consider f (x) = cos(x) (see Figure 4). If x0 = 0, then f (0) = cos(0) = 1, and
f � (x) = − sin(x) =⇒ f � (0) = − sin(0) = 0
f �� (x) = − cos(x) =⇒ f �� (0) = − cos(0) = −1
1 1
cos(x) ≈ 1 + 0 · x − x2 = 1 − x2
2 2
1
You are probably wondering where that in front of the x2 term comes from. The reason it’s
2
there is so that this approximation is exact for quadratic functions. For instance, consider
f (x) = a + bx + cx2 ; f � (x) = b + 2cx; f �� (x) = 2c.
Set the base point x0 = 0. Then,
f (0) = a + b · 0 + c · 02 =⇒ a = f (0)

f (0) = b + 2c · 0 = b =⇒ b = f � (0)
f �� (0)
f �� (0) = 2c =⇒ c=
2

4
Lecture 9 18.01 Fall 2006

x
cos(x)

1- x2/2

Figure 4: Quadratic approximation to cos(x).

0.0.1 Basic Quadratic Approximations

:
f �� (0) 2
f (x) ≈ f (0) + f � (0)x + x (x ≈ 0)
2

1. sin x ≈ x (if x ≈ 0)
x2
2. cos x ≈ 1 − (if x ≈ 0)
2
1
3. ex ≈ 1 + x + x2 (if x ≈ 0)
2
1
4. ln(1 + x) ≈ x − x2 (if x ≈ 0)
2
r(r − 1) 2
5. (1 + x)r ≈ 1 + rx + x (if x ≈ 0)
2

Proofs: The proof of these is to evaluate f (0), f � (0), f �� (0) in each case. We carry out Case 4

f (x) = ln(1 + x) =⇒ f (0) = ln 1 = 0


� 1
f � (x) = [ln(1 + x)] = =⇒ f � (0) = 1
1+x
� ��
1 −1
f �� (x) = = =⇒ f �� (0) = −1
1+x (1 + x)2

Let us apply a quadratic approximation to our Planet Quirk example and see where it gives.
�−1/2 � � 2 �2 �
v2 1 v2 ( −21 )( −21 − 1) −v 2

v 1
1− 2 ≈1+ + − Case 5 with x = ,r = −
c 2 c2 2 c2 c2 2

5
Lecture 9 18.01 Fall 2006

� 2 �2
v2 −10 v
Since 2
≈ 10 , that last term will be of the order ≈ 10−20 . Not even the best atomic
c c2
clocks can measure time with this level of precision. Since the quadratic term is so small, we might
as well ignore it and stick to the linear approximation in this case.

e−2x
Example 5. f (x) = √
1+x
Let us find the quadratic approximation of this expression. We can rewrite it as f (x) = e−2x (1 + x)−1/2 .
Using the approximation of each factor gives
� 1
(− 2 )(− 12 − 1)
� �� � �
1 2 1
f (x) ≈ 1 − 2x + (−2x) 1− x+ x2
2 2 2
1 1 3 5 27
f (x) ≈ 1 − 2x − x + (−2)(− )x2 + 2x2 + x2 = 1 − x + x2
2 2 8 2 8
(Note: we drop the x3 and higher order terms. This is a quadratic approximation, so we don’t care
about anything higher than x2 .)

6
Lecture 9 18.01 Fall 2006

Lecture 10: Curve Sketching

Goal: To draw the graph of f using the behavior of f � and f �� . We want the graph to be
qualitatively correct, but not necessarily to scale.
Typical Picture: Here, y0 is the minimum value, and x0 is the point where that minimum occurs.

y0

x0= critical point

Figure 1: The critical point of a function

Notice that for x < x0 , f � (x) < 0. In other words, f is decreasing to the left of the critical point.
For x > x0 , f � (x) > 0: f is increasing to the right of the critical point.

Another typical picture: Here, y0 is the critical (maximum) value, and x0 is the critical point. f
is decreasing on the right side of the critical point, and increasing to the left of x0 .

y0

f’(x) < 0
x > x0

x0= critical point

Figure 2: A concave-down graph

1
Lecture 9 18.01 Fall 2006

Rubric for curve-sketching


1. (Precalc skill) Plot the discontinuities of f — especially the infinite ones!
2. Find the critical points. These are the points at which f � (x) = 0 (usually where the slope
changes from positive to negative, or vice versa.)

3. (a) Plot the critical points (and critical values), but only if it’s relatively easy to do so.
(b) Decide the sign of f � (x) in between the critical points (if it’s not already obvious).
4. (Precalc skill) Find and plot the zeros of f . These are the values of x for which f (x) = 0.
Only do this if it’s relatively easy.

5. (Precalc skill) Determine the behavior at the endpoints (or at ±∞).

Example 1. y = 3x − x3

1. No discontinuities.
2. y � = 3 − 3x2 = 3(1 − x2 ) so, y � = 0 at x = ±1.

3. (a) At x = 1, y = 3 − 1 = 2.
(b) At x = −1, y = −3 + 1 = −2. Mark these two points on the graph.

4. Find the zeros: y = 3x − x3 = x(3 − x2 ) = 0 so the zeros lie at x = 0, ± 3.
5. Behavior of the function as x → ±∞.
As x → ∞, the x3 term of y dominates, so y → −∞. Likewise, as x → −∞, y → ∞.

Putting all of this information together gives us the graph as illustrated in Fig. 3)

(1,2)

-2 (-√3,0) -1 2
1
(√3,0)

(-1,-2)

Figure 3: Sketch of the function y = 3x − x3 . Note the labeled zeros and critical points

Let us do step 3b (the sign of f � ) to double-check for consistency.

y � = 3 − 3x2 = 3(1 − x2 )

y � > 0 when |x| < 1; y � < 0 when |x| > 1. Sure enough, y is increasing between x = −1 and x = 1,
and is decreasing everywhere else.

2
Lecture 10 18.01 Fall 2006

1
Example 2. y = .
x
This example illustrates why it’s important to find a function’s discontinuities before looking at the
properties of its derivative. We calculate
−1
y� = <0
x2
Warning: The derivative is never positive, so you might think that y is always decreasing, and its
graph looks something like that in Fig. 4.

Figure 4: A monotonically decreasing function

1
But as you probably know, the graph of looks nothing like this! It actually looks like Fig. 5. In
x
1
fact, y = is decreasing except at x = 0, where it jumps from −∞ to +∞. This is why we must
x
watch out for discontinuities.

1
Figure 5: Graph of y = .
x

3
Lecture 10 18.01 Fall 2006

Example 3. y = x3 − 3x2 + 3x.

y � = 3x2 − 6x + 3 = 3(x2 − 2x + 1) = 3(x − 1)2

There is a critical point at x = 1. y � > 0 on both sides of x = 1, so y is increasing everywhere. In


this case, the sign of y � doesn’t change at the critical point, but the graph does level out (see Fig. 6.

(1,1)
1
horizontal slope

Figure 6: Graph of y = y = x3 − 3x2 + 3x

ln x
Example 4. y = (Note: this function is only defined for x > 0)
x

What happens as x decreases towards zero? Let x = 2−n . Then,

ln 2−n
y= = (−n ln 2)2n → −∞ as n → ∞
2−n
In other words, y decreases to −∞ as x approaches zero.
Next, we want to find the critical points.
��
x( 1 ) − 1(ln x)

ln x 1 − ln x
y� = = x 2
=
x x x2

y � = 0 =⇒ 1 − ln x = 0 =⇒ ln x = 1 =⇒ x = e
In other words, the critical point is x = e (from previous page). The critical value is

ln e 1
y(x) |x=e = =
e e

4
Lecture 10 18.01 Fall 2006

Next, find the zeros of this function:

y = 0 ⇔ ln x = 0

So y = 0 when x = 1.
What happens as x → ∞? This time, consider x = 2+n .

ln 2n n ln 2 n(0.7)
y= = ≈
2n 2n 2n
So, y → 0 as n → ∞. Putting all of this together gets us the graph in Fig. 7.

(e,1/e)
1/e

1 e

ln x
Figure 7: Graph of y = x

Finally, let’s double-check this picture against the information we get from step 3b:
1 − ln x
y� = >0 for 0 < x < e
x2
Sure enough, the function is increasing between 0 and the critical point.

5
Lecture 10 18.01 Fall 2006

2nd Derivative Information


When f �� > 0, f � is increasing. When f �� < 0, f � is decreasing. (See Fig. 8 and Fig. 9)

slope < 0 slope > 0

slope = 0

Figure 8: f is convex (concave-up). The slope increases from negative to positive as x increases.

Figure 9: f is concave-down. The slope decreases from positive to negative as x increases.

Therefore, the sign of the second derivative tells us about concavity/convexity of the graph. Thus
the second derivative is good for two purposes.

1. Deciding whether a critical point is a maximum or a minimum. This is known as the second derivative
test.
f � (x0 ) f �� (x0 ) Critical point is a:
0 negative maximum
0 positive minimum

2. Concave/convex “decoration.”

6
Lecture 10 18.01 Fall 2006

The points where f �� = 0 are called inflection points. Usually, at these points the graph changes
from concave up to down, or vice versa. Refer to Fig. 10 to see how this looks on Example 1.

Inflection point
(where f” = 0)

Figure 10: Inflection point: y = 3x − x3 , y�� = −6x = 0, at x = 0.

7
Lecture 11 18.01 Fall 2006

Lecture 11: Max/Min Problems


ln x
Example 1. y = (same function as in last lecture)
x

1/e

x0=e

ln x
Figure 1: Graph of y = .
x

1
• What is the maximum value? Answer: y = .
e

• Where (or at what point) is the maximum achieved? Answer: x = e. (See Fig. 1).)

Beware: Some people will ask “What is the maximum?”. The answer is not e. You will get so used
to finding the critical point x = e, the main calculus step, that you will forget to find the maximum
1 1
value y = . Both the critical point x = e and critical value y = are important. Together, they
e e
1
form the point of the graph (e, ) where it turns around.
e

Example 2. Find the max and the min of the function in Fig. 2

Answer: If you’ve already graphed the function, it’s obvious where the maximum and minimum
values are. The point is to find the maximum and minimum without sketching the whole graph.
Idea: Look for the max and min among the critical points and [Link] can see from Fig. 2
that we only need to compare the heights or y-values corresponding to endpoints and critical points.
(Watch out for discontinuities!)

1
Lecture 11 18.01 Fall 2006

max

min

Figure 2: Search for max and min among critical points and endpoints

Example 3. Find the open-topped can with the least surface area enclosing a fixed volume, V.

Figure 3: Open-topped can.

1. Draw the picture.


2. Figure out what variables to use. (In this case, r, h, V and surface area, S.)
3. Figure out what the constraints are in the problem, and express them using a formula. In this
example, the constraint is
V = πr2 h = constant
We’re also looking for the surface area. So we need the formula for that, too:
S = πr2 + (2πr)h
Now, in symbols, the problem is to minimize S with V constant.

2
Lecture 11 18.01 Fall 2006

4. Use the constraint equation to express everything in terms of r (and the constant V ).
� �
V 2 V
h= ; S = πr + (2πr)
2πr πr2

5. Find the critical points (solve dS/dr = 0), as well as the endpoints. S will achieve its max and
min at one of these places.
� �1/3
dS 2V V V
= 2πr − 2 = 0 =⇒ πr3 − V = 0 =⇒ r3 = =⇒ r =
dr r π π
We’re not done yet. We’ve still got to evaluate S at the endpoints: r = 0 and “r = ∞”.
2V
S = πr2 + , 0≤r<∞
r
2
As r → 0, the second term, , goes to infinity, so S → ∞. As r → ∞, the first term πr2 goes
r
to infinity, so S → ∞. Since S = +∞ at each end, the minimum is achieved at the critical point
r = (V /π)1/3 , not at either endpoint.

s
to ∞
to ∞

Figure 4: Graph of S

We’re still not done. We want to find the minimum value of the surface area, S, and the values
of h. � �1/3 � �−2/3 � �1/3
V V V V V V
r= ; h = 2 = � �2/3 = =
π πr π V π π π
π
� �2/3 � �1/3
V V V
S = πr2 + 2 =π + 2V = 3π −1/3 V 2/3
r π π

Finally, another, often better, way of answering that question is to find the proportions of the
h h (V /π)1/3
can. In other words, what is ? Answer: = = 1.
r r (V /π)1/3

3
Lecture 11 18.01 Fall 2006

Example 4. Consider a wire of length 1, cut into two pieces. Bend each piece into a square. We
want to figure out where to cut the wire in order to enclose as much area in the two squares as
possible.

0 x 1

(1/4)x
(1/4)(1-x)

Figure 5: Illustration for Example 5.


2
The first square will have sides of length x4 . Its area will be x16 . The second square will have
�2
sides of length 1−4 x . Its area will be 1−4 x . The total area is then

�2

� x �2 1−x
A = +
4 4
2x 2(1 − x) x 1 x 1
A� = + (−1) = − + = 0 =⇒ 2x − 1 = 0 =⇒ x =
16 16 8 8 8 2

So, one extreme value of the area is


� 1 �2 � 1 �2
2 2 1
A= + =
4 4 32

We’re not done yet, though. We still need to check the endpoints! At x = 0,
� �2
1−0 1
A = 02 + =
4 16

At x = 1,
� �2
1 1
A= + 02 =
4 16

4
Lecture 11 18.01 Fall 2006

By checking the endpoints in Fig. 6, we see that the minimum area was achieved at x = 12 .
The maximum area is not achieved in 0 < x < 1, but it is achieved at x = 0 or 1. The maximum
corresponds to using the whole length of wire for one square.

Area
1/16

1/32

1/2 1

Figure 6: Graph of the area function.

Moral: Don’t forget endpoints. If you only look at critical points you may find the worst answer,
rather than the best one.

5
Lecture 12 18.01 Fall 2006

Lecture 12: Related Rates

Example 1. Police are 30 feet from the side of the road. Their radar sees your car approaching at
80 feet per second when your car is 50 feet away from the radar gun. The speed limit is 65 miles
per hour (which translates to 95 feet per second). Are you speeding?
First, draw a diagram of the setup (as in Fig. 1):

Police

30
D=50

Car
Road
x

Figure 1: Illustration of example 1: triangle with the police, the car, the road, D and x labelled.

Next, give the variables names. The important thing to figure out is which variables are changing.
dD
At D = 50, x = 40. (We know this because it’s a 3-4-5 right triangle.) In addition, = D� =
dt
−80. D� is negative because the car is moving in the −x direction. Don’t plug in the value for D
yet! D is changing, and it depends on x.
The Pythagorean theorem says
302 + x2 = D2
Differentiate this equation with respect to time (implicit differentiation:

d � 2 2DD�
30 + x2 = D2 =⇒ 2xx� = 2DD� =⇒ x� =

dt 2x
Now, plug in the instantaneous numerical values:
50 feet
x� = (−80) = −100
40 s
This exceeds the speed limit of 95 feet per second; you are, in fact, speeding.

1
Lecture 12 18.01 Fall 2006

There is another, longer, way of solving this problem. Start with



D = 302 + x2 = (302 + x2 )1/2
d 1 dx
D = (302 + x2 )−1/2 (2x )
dt 2 dt
Plug in the values:
1 dx
−80 = (302 + 402 )−1/2 (2)(40)
2 dt
and solve to find
dx feet
= −100
dt s

2 2
(A third strategy is to differentiate x = D − 30 ). It is easiest to differentiate the equation in its
simplest algebraic form 302 + x2 = D2 , our first approach.
The general strategy for these types of problems is:

1. Draw a picture. Set up variables and equations.


2. Take derivatives.
3. Plug in the given values. Don’t plug the values in until after taking the derivatives.

Example 2. Consider a conical tank. Its radius at the top is 4 feet, and it’s 10 feet high. It’s being
filled with water at the rate of 2 cubic feet per minute. How fast is the water level rising when it is
5 feet high?

Figure 2: Illustration of example 2: inverted cone water tank.

From Fig. 2), the volume of the tank is given by


1 2
V = πr h
3

2
Lecture 12 18.01 Fall 2006

The key here is to draw the two-dimensional cross-section. We use the letters r and h to represent
the variable radius and height of the water at any level. We can find the relationship between r and
h from Fig. 3) using similar triangles.

10 r

Figure 3: Relating r and h.

From Fig. 3), we see that


r 4
=
h 10
or, in other words,
2
r= h
5
Plug this expression for r back into V to get
� �2
1 2 4
V = π h h= πh3
3 5 3(25)
dV 4
=V� = πh2 h�
dt 25
dV
Now, plug in the numbers ( = 2, h = 5):
dt
� �
4
2= π(5)2 h�
25
1
h� =

Related rates also arise on Problem Set 3 (Fig. 4). There’s a part II margin of error problem
ΔL
involving a satellite, where you’re asked to find .
Δh

3
Lecture 12 18.01 Fall 2006

satellite

h
c

Figure 4: Illustration of the satellite problem.

L2 + c2 = h2
2LL� = 2hh�
ΔL L� h
Hence, ≈ � =
Δh h L

There is also a parabolic mirror problem based on similar ideas (Fig. 5).

Δa

Δθ

Figure 5: Illustration of the parabolic mirror problem.

Δa Δθ
Here, you want to find either or . This type of sensitivity of measurement problem
Δθ Δa
matters in every measurement problem, for instance predicting whether asteroids will hit Earth.

4
Lecture 13 18.01 Fall 2006

Lecture 13: Newton’s Method and Other


Applications

Newton’s Method
Newton’s method is a powerful tool for solving equations of the form f (x) = 0.
Example 1. f√ (x) = x2 − 3. In other words, solve x2 − 3 = 0. We already know that the solution
to this is x = 3. Newton’s method, gives a good numerical approximation to the answer. The
method uses tangent lines (see Fig. 1).

y = x2 -3

x0=1 x1

(1,-2)

Figure 1: Illustration of Newton’s Method, Example 1.

The goal is to find where the graph crosses the x-axis. We start with a guess of x0 = 1. Plugging
that back into the equation for y, we get y0 = 12 − 3 = −2, which isn’t very close to 0.
Our next guess is x1 , where the tangent line to the function at x0 crosses the x-axis. The equation
for the tangent line is:
y − y0 = m(x − x0 )
When the tangent line intercepts the x-axis, y = 0, so

−y0 = m(x1 − x0 )
y0
− = x1 − x0
m
y0
x1 = x0 −
m
Remember: m is the slope of the tangent line to y = f (x) at the point (x0 , y0 ).

1
Lecture 13 18.01 Fall 2006

In terms of f :

y0 = f (x0 )
m = f � (x0 )

Therefore,
f (x0 )
x1 = x0 −
f � (x0 )

x0 x2
x1

Figure 2: Illustration of Newton’s Method, Example 1.

In our example, f (x) = x2 − 3, f � (x) = 2x. Thus,

(x20 − 3) 1 3
x1 = x0 − = x0 − x0 +
2x 2 2x0
1 3
x1 = x0 +
2 2x0
The main idea is to repeat (iterate) this process:
1 3
x2 = x1 +
2 2x1
1 3
x3 = x2 +
2 2x2

and so on. The procedure approximates 3 extremely well.

2
Lecture 13, Version 3.0 18.01 Fall 2006


x y accuracy: |y − 3|
x0 1
x1 2 3 × 10−1
x2 7
4 2 × 10−2
x3 7
8 + 6
7 10−4
18,817
x4 10,864 3 × 10−9

Notice that the number of digits of accuracy doubles with each iteration.

Summary

Newton’s Method is illustrated in Fig. 3 and can be summarized as follows:

f (xk )
xk+1 = xk −
f � (xk )

y=f(x)
(xk, yk)

xk+1

xk = kth iterate

Figure 3: Illustration of Newton’s Method.

Example 1 considered the particular case of

f (x) = x2 − 3
f (xk ) 1 3
xk+1 = xk − � = ... = xk +
f (xk ) 2 2xk
Now, we define
x = lim xk (xk → x as k → ∞)
k→∞

To evaluate x in Example 1, take the limit as k → ∞ in the equation


1 3
xk+1 = xk +
2 2xk

3
Lecture 13, Version 3.0 18.01 Fall 2006

This yields
1 3 1 3 1 3
x̄ = x̄ + =⇒ x − x = =⇒ x = =⇒ x2 = 3
2 2x̄ 2 2x 2 2x

which is just what we hoped: x = 3.
Warning 1. Newton’s Method can find√an unexpected √ root.
Example: if you take x0 = −1, then xk → − 3 instead of + 3. This convergence to an unexpected
root is illustrated in Fig. 4

y = x2-3

x0
x1
tangent to
curve at x = x0

Figure 4: Newton’s method converging to an unexpected root.

Warning 2. Newton’s Method can fail completely.


This failure is illustrated in Fig. 5. In this case, x2 = x0 , x3 = x1 , and so forth. It repeats in a
cycle, and never converges to a single value.

(x1, y1)
x0

x1

(x0, y0)

Figure 5: Newton’s method converging to an unexpected root.

4
Lecture 13 18.01 Fall 2006

Ring on a String
Consider a ring on a string 1 held fixed at two ends at (0, 0) and (a, b) (see Fig. 6). The ring is
free to slide to any point. Find the position (x, y) of the string.

a-x (a, b)

(0, 0) x

√ [(a-x)2 +(b-y2)]
β
α
√ (x2 +y2)

α=β
(x, y)

Figure 6: Illustration of the Ring on a String problem.

Physical Principle The ring settles at the lowest height (lowest potential energy), so the prob­
lem is to minimize y subject to the constraint that (x, y) is on the string.

Constraint The length L of the string is fixed:


� �
x2 + y 2 + (x − a)2 + (y − b)2 = L

The function y = y(x) is determined implicitly by the constraint equation above. We traced the
constraint curve (possible positions of the ring) on the blackboard. This curve is an ellipse with foci
at (0, 0) and (a, b), but knowing that the curve is an ellipse does not help us find the lowest point.
Experiments with the hanging ring show that the lowest point is somewhere in the middle. Since
the ends of the constraint curve are higher than the middle, the lowest point is a critical point
(a point where y � (x) = 0). In class we also gave a physical demonstration of this by drawing the
horizontal tangent at the lowest point.
To find the critical point, differentiate the constraint equation implicitly with respect to x,
x + yy � x − a + (y − b)y �
� +� =0
x2 + y 2 (x − a)2 + (y − b)2
Since y � = 0 a the critical point, the equation can be rewritten as
x a−x
� =�
x2 + y2 (x − a)2 + (y − b)2
1�
c 1999 and �2007
c David Jerison

5
Lecture 13 18.01 Fall 2006

From Fig. 6, we see that the last equation can be interpreted geometrically as saying that
sin α = sin β
where α and β are the angles the left and right portions of the string make with the vertical.

Physical and geometric conclusions

The angles α and β are equal. Using vectors to compute the force exerted by gravity on the two
halves of the string, one finds that there is equal tension in the two halves of the string - a physical
equilibrium. (From another point of view, the equal angle property expresses a geometric property
of ellipses: Suppose that the ellipse is a mirror. A ray of light from the focus (0, 0) reflects off the
mirror according to the rule angle of incidence equals angle of reflection, and therefore the ray goes
directly to the other focus at (a, b).)

Formulae for x and y

We did not yet find the location of (x, y). We will now show that
� �
a b 1� � �
x= 1− √ , y= b − L2 − a 2
2 L2 − a2 2
Because α = β, � �
x = x2 + y 2 sin α; a − x = (x − a)2 + (y − b)2 sin α
Adding these two equations,
�� � � a
a= x2 + y 2 + (x − a)2 + (y − b)2 sin α = L sin α =⇒ sin α =
L
The equations for the vertical legs of the right triangles are (note that y < 0):
� �
−y = x2 + y 2 cos α; b − y = (x − a)2 + (y − b)2 cos β
Adding these two equations, and using α = β,
�� � � 1
b − 2y = x2 + y 2 + (x − a)2 + (y − b)2 cos α = L cos α =⇒ y = (b − L cos α)
2
a �
2

Use the relation sin α = 2 2
to write L cos α = L 1 − sin α = L − a . Then the formula for y is
L
1� � �
y= b − L2 − a2
2
Finally, to find the formula for x, use the similar right triangles
x a−x
tan α = = =⇒ x(b − y) = (−y)(a − x) =⇒ (b − 2y)x = −ay
−y b−y
Therefore, � �
−ay a b
x= = 1− √
b − 2y 2 L2 − a2
Thus we have formulae for x and y in terms of a, b and L.
I omitted the derivation of the formulae for x and y in lecture because it is long and because we
got all of our physical intuition and understanding out of the problem from the balance condition
that was the immediate consequence of the critical point computation.
Final Remark. In 18.02, you will learn to treat constrained max/min problems in any number
of variables using a method called Lagrange multipliers.

6
Lecture 14 18.01 Fall 2006

Lecture 14: Mean Value Theorem and Inequalities

Mean-Value Theorem
The Mean-Value Theorem (MVT) is the underpinning of calculus. It says:

If f is differentiable on a < x < b, and continuous on a ≤ x ≤ b, then


f (b) − f (a)
= f � (c) (for some c, a < c < b)
b−a

f (b) − f (a)
Here, is the slope of a secant line, while f � (c) is the slope of a tangent line.
b−a

secant line

slope
f’(c)

b
a c

Figure 1: Illustration of the Mean Value Theorem.

Geometric Proof: Take (dotted) lines parallel to the secant line, as in Fig. 1 and shift them up
from below the graph until one of them first touches the graph. Alternatively, one may have to start
with a dotted line above the graph and move it down until it touches.
If the function isn’t differentiable, this approach goes wrong. For instance, it breaks down for
the function f (x) = |x|. The dotted line always touches the graph first at x = 0, no matter what its
slope is, and f � (0) is undefined (see Fig. 2).

1
Lecture 14 18.01 Fall 2006

Figure 2: Graph of y = |x|, with secant line. (MVT goes wrong.)

Interpretation of the Mean Value Theorem

You travel from Boston to Chicago (which we’ll assume is a 1,000 mile trip) in exactly 3 hours. At
1000
some time in between the two cities, you must have been going at exactly mph.
3
f (t) = position, measured as the distance from Boston.

f (3) = 1000, f (0) = 0, a = 0, and b = 3.


1000 f (b) − f (a)
= = f � (c)
3 3
where f � (c) is your speed at some time, c.

Versions of the Mean Value Theorem

There is a second way of writing the MVT:

f (b) − f (a) = f � (c)(b − a)


f (b) = f (a) + f � (c)(b − a) (for some c, a < c < b)

There is also a third way of writing the MVT: change the name of b to x.

f (x) = f (a) + f � (c)(x − a) for some c, a < c < x

The theorem does not say what c is. It depends on f , a, and x.


This version of the MVT should be compared with linear approximation (see Fig. 3).

f (x) ≈ f (a) + f � (a)(x − a) x near a

2
Lecture 14 18.01 Fall 2006

The tangent line in the linear approximation has a definite slope f � (a). by contrast formula is an
exact formula. It conceals its lack of specificity in the slope f � (c), which could be the slope of f at
any point between a and x.

(x,f(x))
error

(a,f(a))
y=f(a) + f’(a)(x-a)

Figure 3: MVT vs. Linear Approximation.

Uses of the Mean Value Theorem.

Key conclusions: (The conclusions from the MVT are theoretical)

1. If f � (x) > 0, then f is increasing.


2. If f � (x) < 0, then f is decreasing.
3. If f � (x) = 0 all x, then f is constant.

Definition of increasing/decreasing:
Increasing means a < b ⇒ f (a) < f (b). Decreasing means a < b =⇒ f (a) < f (b).
Proofs:
Proof of 1:

a < b
f (b) = f (a) + f � (c)(b − a)
Because f � (c) and (b − a) are both positive,
f (b) = f (a) + f � (c)(b − a) > f (a)
(The proof of 2 is omitted because it is similar to the proof of 1)
Proof of 3:

f (b) = f (a) + f � (c)(b − a) = f (a) + 0(b − a) = f (a)

Conclusions 1,2, and 3 seem obvious, but let me persuade you that they are not. Think back to the
definition of the derivative. It involves infinitesimals. It’s not a sure thing that these infinitesimals
have anything to do with the non-infinitesimal behavior of the function.

3
Lecture 14 18.01 Fall 2006

Inequalities

The fundamental property f � > 0 =⇒ f is increasing can be used to deduce many other inequali­
ties.

Example. ex

1. ex > 0
2. ex > 1 for x > 0
3. ex > 1 + x

Proofs. We will take property 1 (ex > 0) for granted. Proofs of the other two properties follow:
Proof of 2: Define f1 (x) = ex − 1. Then, f1 (0) = e0 − 1 = 0, and f1� (x) = ex > 0. (This last assertion
is from step 1). Hence, f1 (x) is increasing, so f (x) > f (0) for x > 0. That is:

ex > 1 for x > 0

.
Proof of 3: Let f2 (x) = ex − (1 + x).

f2� (x) = ex − 1 = f1 (x) > 0 (if x > 0).


Hence, f2 (x) > 0 for x > 0. In other words,

ex > 1 + x

x2 x2
Similarly, ex > 1 + x + (proved using f3 (x) = ex − (1 + x + )). One can keep on going:
2 2
x2 x3
ex > 1 + x + + for x > 0. Eventually, it turns out that
2 3!
x2 x3
ex = 1 + x + + + ··· (an infinite sum)
2 3!
We will be discussing this when we get to Taylor series near the end of the course.

4
Lecture 15 18.01 Fall 2006

Lecture 15: Differentials and Antiderivatives

Differentials
New notation:
dy = f � (x)dx (y = f (x))
Both dy and f � (x)dx are called differentials. You can think of
dy
= f � (x)
dx
as a quotient of differentials. One way this is used is for linear approximations.
Δy dy

Δx dx

Example 1. Approximate 651/3

Method 1 (review of linear approximation method)

f (x) = x1/3
1 −2/3
f � (x) = x
3
f (x) ≈ f (a) + f � (a)(x − a)
1
x1/3 ≈ a1/3 + a−2/3 (x − a)
3
A good base point is a = 64, because 641/3 = 4.
Let x = 65.
� �
1 1 1 1
1/3
65 1/3
= 64 + 64−2/3 (65 − 64) = 4 + (1) = 4 + ≈ 4.02
3 3 16 48
Similarly,
1
(64.1)1/3 ≈ 4 +
480

Method 2 (review)
� �1/3
1 1/3 1 1
651/3 = (64 + 1)1/3 = [64(1 + )] = 641/3 [1 + ]1/3 = 4 1 +
64 64 64
1 1
Next, use the approximation (1 + x)r ≈ 1 + rx with r = and x = .
3 64
1 1 1
651/3 ≈ 4(1 + ( )) = 4 +
3 64 48
This is the same result that we got from Method 1.

1
Lecture 15 18.01 Fall 2006

Method 3 (with differential notation)

y = x1/3 |x=64 = 4
� �
1 −2/3 1 1 1
dy = x dx|x=64 = dx = dx
3 3 16 48

1
We want dx = 1, since (x + dx) = 65. dy = when dx = 1.
48
1
(65)1/3 = 4 +
48

What underlies all three of these methods is


y = x1/3
dy 1 −2/3
= x |x=64
dx 3

Anti-derivatives

F (x) = f (x)dx means that F is the antiderivative of f .

Other ways of saying this are:


F � (x) = f (x) or, dF = f (x)dx

Examples:

1. sin xdx = − cos x + c where c is any constant.

xn+1

2. xn dx = + c for n �= −1.
n+1

dx
3. = ln |x| + c (This takes care of the exceptional case n = −1 in 2.)
x

4. sec2 xdx = tan x + c

dx 1
5. √ = sin−1 x + c (where sin−1 x denotes “inverse sin” or arcsin, and not )
1 − x2 sin x

dx
6. = tan−1 (x) + c
1 + x2

Proof of Property 2: The absolute value |x| gives the correct answer for both positive and negative
x. We will double check this now for the case x < 0:
ln |x| = ln(−x)
� �
d d du
ln(−x) = ln(u) where u = −x.
dx du dx
d 1 1 1
ln(−x) = (−1) = (−1) =
dx u −x x

2
Lecture 15 18.01 Fall 2006

Uniqueness of the antiderivative up to an additive constant.

If F � (x) = f (x), and G� (x) = f (x), then G(x) = F (x) + c for some constant factor c.
Proof:
(G − F )� = f − f = 0

Recall that we proved as a corollary of the Mean Value Theorem that if a function has a derivative
zero then it is constant. Hence G(x) − F (x) = c (for some constant c). That is, G(x) = F (x) + c.

Method of substitution.

Example 1. x3 (x4 + 2)5 dx

Substitution:
1
u = x4 + 2, du = 4x3 dx, (x4 + 2)5 = u5 , x3 dx = du
4
Hence,
u6 u6
� �
3 4 5 1 1 4
x (x + 2) dx = u5 du = = +c= (x + 2)6 + c
4 4(6) 24 24

x
Example 2. √ dx
1 + x2

Another way to find an anti-derivative is “advanced guessing.” First write


� �
x
√ dx = x(1 + x2 )−1/2 dx
1 + x2

Guess: (1 + x2 )1/2 . Check this.

d 1
(1 + x2 )1/2 = (1 + x2 )−1/2 (2x) = x(1 + x2 )−1/2
dx 2
Therefore, �
x(1 + x2 )−1/2 dx = (1 + x2 )1/2 + c


Example 3. e6x dx

Guess: e6x . Check this:


d 6x
e = 6e6x
dx
Therefore, �
1 6x
e6x dx = e +c
6

3
Lecture 15 18.01 Fall 2006


2
Example 4. xe−x dx

2
Guess: e−x Again, take the derivative to check:
d −x2 2
e = (−2x)(e−x )
dx
Therefore, �
2 1 2
xe−x dx = − e−x + c
2

1
Example 5. sin x cos xdx = sin2 x + c
2

Another, equally acceptable answer is



1
sin x cos xdx = − cos2 x + c
2
This seems like a contradiction, so let’s check our answers:
d
sin2 x = (2 sin x)(cos x)
dx
and
d
cos2 x = (2 cos x)(− sin x)
dx
So both of these are correct. Here’s how we resolve this apparent paradox: the difference between
the two answers is a constant.
1 1 1 1
sin2 x − (− cos2 x) = (sin2 x + cos2 x) =
2 2 2 2
So,
1 1 1 1 1
sin2 x − = (sin2 x − 1) = (− cos2 x) = − cos2 x
2 2 2 2 2
The two answers are, in fact, equivalent. The constant c is shifted by 12 from one answer to the
other.

dx
Example 6. (We will assume x > 0.)
x ln x
1
Let u = ln x. This means du = dx. Substitute these into the integral to get
x
� �
dx 1
= du = ln u + c = ln(ln(x)) + c
x ln x u

4
Lecture 16 18.01Fall 2006

Lecture 16: Differential Equations and Separation


of Variables

Ordinary Differential Equations (ODEs)


dy
Example 1. = f (x)
dx

Solution: y = f (x)dx. We consider these types of equations as solved.

� � � �
d dy
Example 2. +x y =0 or + xy = 0
� � dx dx
d
( + x is known in quantum mechanics as the annihilation operator.)
dx
Besides integration, we have only one method of solving this so far, namely, substitution. Solving
dy
for gives:
dx
dy
= −xy
dx
The key step is to separate variables.
dy
= −xdx
y
Note that all y-dependence is on the left and all x-dependence is on the right.

Next, take the antiderivative of both sides:


� �
dy
= − xdx
y
x2
ln |y| = − + c (only need one constant c)
2
c −x2 /2
|y| = e e (exponentiate)
2
y = ae−x /2
(a = ±ec )

Despite the fact that ec = � 0, a = 0 is possible along with all a �= 0, depending on the initial
2 2
conditions. For instance, if y(0) = 1, then y = e−x /2 . If y(0) = a, then y = ae−x /2 (See Fig. 1).

1
Lecture 16 18.01Fall 2006

0.8

0.6
Y

0.4

0.2

0
−6 −4 −2 0 2 4 6

x2
Figure 1: Graph of y = e− 2 .

In general:
dy
= f (x)g(y)
dx
dy
= f (x)dx which we can write as
g(y)
1
h(y)dy = f (x)dx where h(y) = .
g(y)

Now, we get an implicit formula for y:


� �
H(y) = F (x) + c (H(y) = h(y)dy; F (x) = f (x)dx)

where H � = h, F � = f , and
y = H −1 (F (x) + c)
(H −1 is the inverse function.)
In the previous example:

−x 2
f (x) = x; F (x) = ;
2
1 1
g(y) = y; h(y) = = , H(y) = ln |y|
g(y) y

2
Lecture 16 18.01Fall 2006

dy �y�
Example 3 (Geometric Example). =2 .
dx x
Find a graph such that the slope of the tangent line is twice the slope of the ray from (0, 0) to (x, y)
seen in Fig. 2.

(x,y)

Figure 2: The slope of the tangent line (red) is twice the slope of the ray from the origin to the point (x, y).

dy 2dx
= (separate variables)
y x
ln |y| = 2 ln |x| + c (antiderivative)
|y| = ec x2 (exponentiate; remember, e2 ln |x| = x2 )

Thus,
y = ax2
Again, a < 0, a > 0 and a = 0 are all acceptable. Possible solutions include, for example,

y = x2 (a = 1)
y = 2x2 (a = 2)
y = −x2 (a = −1)
y = 0x2 = 0 (a = 0)
y = −2y 2 (a = −2)
y = 100x2 (a = 100)

3
Lecture 16 18.01Fall 2006

Example 4. Find the curves that are perpendicular to the parabolas in Example 3.
We know that their slopes,
dy −1 −x
= =
dx slope of parabola 2y
Separate variables:
−x
ydy = dx
2
Take the antiderivative:
y2 x2 x2 y2
=− +c =⇒ + =c
2 4 4 2
which is an equation for a√family of ellipses. For these ellipses, the ratio of the x-semi-major axis to
the y-semi-minor axis is 2 (see Fig. 3).

Figure 3: The ellipses are perpendicular to the parabolas.

Separation of variables leads to implicit formulas for y, but in this case you can solve for y.
� �
x2

y =± 2 c−
4

Exam Review
Exam 2 will be harder than exam 1 — be warned! Here’s a list of topics that exam 2 will cover:

1. Linear and/or quadratic approximations


2. Sketches of y = f (x)
3. Maximum/minimum problems.
4. Related rates.
5. Antiderivatives. Separation of variables.
6. Mean value theorem.

More detailed notes on all of these topics are provided in the Exam 2 review sheet.

4
18.01 UNIT 2 REVIEW; Fall 2007

The central theme of Unit 2 is that knowledge of f � (and sometimes f �� ) tells us something about
f itself. This is even true of our first topic, approximation. For instance, knowing that f (x) = e x
satisfies f (0) = 1 and f � (0) = 1, we can say

ex � 1 + x provided x � 0

The linear function 1 + x is much simpler than e x , so f (0) and f � (0) give us a (very) simplified
picture of our function, useful only near near 0. For more detail, use the quadratic approximation,

ex � 1 + x + x2 /2 provided x � 0

(still only works well near 0)


The second and third practice exams are actual tests from previous years. The exam this year
is similar to the one from 2006 posted at our site. It has 6 questions covering the following topics.
(No Newton’s method, but there is a seventh, extra credit problem.)
1. Linear and/or quadratic approximations
2. Sketch a graph y = f (x)
3. Max/min
4. Related rates
5. Find antiderivatives and solve a differential equation by separating variables
6. Mean value theorem.
Remarks.
1. Recall that linear [and quadratic] approximation is

f (x) � f (a) + f � (a)(x − a) [+(f �� (a)/2)(x − a)2 ]

2. You should expect to graph a function y = f (x), where f (x) is a rational function (ratio of
polynomials).
Warnings:
a) When asked to label the critical point on the graph, find and mark the point (a, b). In lecture
we called x = a the critical point and y = b the critical value, and this is what is used in 18.02,
and elsewhere. But for this exam (and this is just an inconsistency in language that you will have
to tolerate) the words “critical point” refer to the point on the graph (a, b), not the number a and
the point on the x-axis. The same applies to inflection points.
b) y = 1/(x − 1) is decreasing on the intervals −≈ < x < 1 and 1 < x < ≈, but it is not
decreasing on the interval −≈ < x < ≈. Draw the graph to see.
You cannot just use the fact that y � = −1/(x − 1)2 < 0 because there is a point in the middle
at which y is not differentiable — and not even continuous. So the mean value theorem does not
apply.
c) Similarly, y = 1/(x − 1)2 is concave up on −≈ < x < 1 and 1 < x < ≈, but it is not
concave up on the interval −≈ < x < ≈. Here y �� = 6/(x − 1)4 > 0, but there is a singularity in
the middle. Plot the graph yourself to see.

1
3. The mean value theorem says that if f is differentiable, then for some c, a < c < x,

f (x) = f (a) + f � (c)(x − a)

It is used as follows. Suppose that m < f � (c) < M on the interval a < c < x, then

f (x) = f (a) + f � (c)(x − a) < f (a) + M (x − a)

Similarly,
f (x) = f (a) + f � (c)(x − a) > f (a) + m(x − a)
Put another way, if �f = f (x) − f (a) and �x = x − a, and m < f � (c) < M for a < c < x, then

m�x < �f < M �x

More consequences of the mean value theorem.


A function f is called increasing (also called strictly increasing) if x > a implies f (x) > f (a).
The reasoning above with m = 0 shows that if f � > 0, then f is increasing. Similarly if f � < 0, then
f is decreasing. We use these facts every time we sketch a graph of a function or find a maximum
or minimum.
A similar discussion works when the inequality is not strict. If m � f � (c) � M for a < c < x,
then
f (a) + m(x − a) � f (x) � f (a) + M (x − a)

A function is called nondecreasing if x > a implies f (x) � f (a). If f � � 0, then the inequality
above shows that f is nondecreasing. Conversely, if the function is nondecreasing and differentiable,
then f � � 0. Similarly, differentiable functions are nonincreasing if and only if they satisfy f � � 0.
Key corollary to the mean value theorem: f � = g � implies f − g is constant.
In Unit 2, we have found that information about f � gives information about f . In particular,
knowing a starting value for a function and its rate of change determines the function. A seemingly
obvious example is that if f � = 0 for all x, then f is constant. If this were not true, then the
mathematical notion of derivative would fail to coincide with our intuitive notion of what rate of
change and cause and effect mean.
But this fundamental fact needs a proof. Derivatives are instantaneous quantities, obtained
as limits. It is the mean value theorem that allows us to pass in rigorous mathematical fashion
from the infinitesimal to the practical, human scale. Here is the proof. If f � = 0, then one can
take m = M = 0 in the inequalities above, and conclude that f (x) = f (a). In other words, f is
constant. As an immediate consequence, if f � = g � , then f and g differ by a constant. (Apply the
previous argument to the function f − g, whose derivative is 0.) This basic fact will lead us shortly
to what is known as the fundamental theorem of calculus.

2
MIT OpenCourseWare
[Link]

18.01 Single Variable Calculus


Fall 2006

For information about citing these materials or our Terms of Use, visit: [Link]
Lecture 18 18.01 Fall 2006

Lecture 18: Definite Integrals

Integrals are used to calculate cumulative totals, averages, areas.


Area under a curve: (See Figure 1.)

1. Divide region into rectangles


2. Add up area of rectangles
3. Take limit as rectangles become thin

a b a b
(i) (ii)

Figure 1: (i) Area under a curve; (ii) sum of areas under rectangles

Example 1. f (x) = x2 , a = 0, b arbitrary

1. Divide into n intervals


Length b/n = base of rectangle
2. Heights:
� �2
b b
• 1st : x = , height =
n n
� �2
2b 2b
• 2nd : x = , height =
n n

Sum of areas of rectangles:


� � � � 2 � � � �2 � � � �2 � � � �2
b b b 2b b 3b b nb b3
+ + + ··· + = 3 (12 + 22 + 32 + · · · + n2 )
n n n n n n n n n

1
Lecture 18 18.01 Fall 2006

a=0 b

Figure 2: Area under f (x) = x2 above [0, b].

We will now estimate the sum using some 3-dimensional geometry.


Consider the staircase pyramid as pictured in Figure 3.

n=4

Figure 3: Staircase pyramid: left(top view) and right (side view)

1st level: n × n bottom, represents volume n2 .


2nd level: (n − 1) × (n − 1), represents volumne (n − 1)2 ), etc.
Hence, the total volume of the staircase pyramid is n2 + (n − 1)2 + · · · + 1.
Next, the volume of the pyramid is greater than the volume of the inner prism:
1 1 1
12 + 22 + · · · + n2 > (base)(height) = n2 · n = n3
3 3 3
and less than the volume of the outer prism:
1 1
12 + 22 + · · · + n2 < (n + 1)2 (n + 1) = (n + 1)3
3 3

2
Lecture 18 18.01 Fall 2006

In all,
1 3
1 n 12 + 22 + · · · + n2 1 (n + 1)3
= 3 3 < <
3 n n3 3 n3
Therefore,
b3 2 1
lim (1 + 22 + 32 + · · · + n2 ) = b3 ,
n→∞ n3 3
b3
and the area under x2 from 0 to b is .
3

Example 2. f (x) = x; area under x above [0, b]. Reasoning similar to Example 1, but easier, gives
a sum of areas:
b2 1
(1 + 2 + 3 + · · · + n) → b2 (as n → ∞)
n2 2
This is the area of the triangle in Figure 4.

b
Figure 4: Area under f (x) = x above [0, b].

Pattern:
b3
��
d
= b2
db 3
d b2
� �
=b
db 2
The area A(b) under f (x) should satisfy A� (b) = f (b).

3
Lecture 18 18.01 Fall 2006

General Picture

y=f(x)

a ci b
Figure 5: One rectangle from a Riemann Sum

b−a
• Divide into n equal pieces of length = Δx =
n
• Pick any ci in the interval; use f (ci ) as the height of the rectangle
• Sum of areas: f (c1 )Δx + f (c2 )Δx + · · · + f (cn )Δx

n

In summation notation: f (ci )Δx ← called a Riemann sum.
i=1

Definition:
n
� � b
lim f (ci )Δx = f (x)dx ← called a definite integral
n→∞ a
i=1
This definite integral represents the area under the curve y = f (x) above [a, b].

Example 3. (Integrals applied to quantity besides area.) Student borrows from parents.
P = principal in dollars, t = time in years, r = interest rate (e.g., 6 % is r = 0.06/year).
After time t, you owe P (1 + rt) = P + P rt

The integral can be used to represent the total amount borrowed as follows. Consider a function
f (t), the “borrowing function” in dollars per year. For instance, if you borrow $ 1000 /month, then
f (t) = 12, 000/year. Allow f to vary over time.
Say Δt = 1/12 year = 1 month.

ti = i/12 i = 1, · · · , 12.

4
Lecture 18 18.01 Fall 2006

f (ti ) is the borrowing rate during the ith month so the amount borrowed is f (ti )Δt. The total is
12

f (ti )Δt.
i=1

In the limit as Δt → 0, we have � 1


f (t)dt
0
which represents the total borrowed in one year in dollars per year.
The integral can also be used to represent the total amount owed. The amount owed depends
on the interest rate. You owe
f (ti )(1 + r(1 − ti ))Δt
for the amount borrowed at time ti . The total owed for borrowing at the end of the year is
� 1
f (t)(1 + r(1 − t))dt
0

5
Lecture 19 18.01 Fall 2006

Lecture 19: First Fundamental Theorem of


Calculus

Fundamental Theorem of Calculus (FTC 1)

If f (x) is continuous and F � (x) = f (x), then


� b
f (x)dx = F (b) − F (a)
a

�b �x=b
Notation: F (x) � = F (x) � = F (b) − F (a)
� �
a x=a

b �b
x3 x3 �� b3 a3

Example 1. F (x) = , F � (x) = x2 ; 2
x dx = = −
3 a 3 �a 3 3

Example 2. Area under one hump of sin x (See Figure 1.)


� π �π
sin x dx = − cos x � = − cos π − (− cos 0) = −(−1) − (−1) = 2

0 0

Figure 1: Graph of f (x) = sin x for 0 ≤ x ≤ π.

1 �1
x6 ��

5 1 1
Example 3. x dx = = −0=
0 6 �0 6 6

1
Lecture 19 18.01 Fall 2006

Intuitive Interpretation of FTC:


dx
x(t) is a position; v(t) = x� (t) = is the speed or rate of change of x.
dt
� b
v(t)dt = x(b) − x(a) (FTC 1)
a

R.H.S. is how far x(t) went from time t = a to time t = b (difference between two odometer readings).
L.H.S. represents speedometer readings.
n

v (ti )Δt approximates the sum of distances traveled over times Δt
i=1

The approximation above is accurate if v (t) is close to v (ti ) on the ith interval. The interpretation
of x(t) as an odometer reading is no longer valid if v changes sign. Imagine a round trip so that
x(b) − x(a) = 0. Then the positive and negative velocities v(t) cancel each other, whereas an
odometer would measure the total distance not the net distance traveled.
� 2π �2π
Example 4. sin x dx = − cos x � = − cos 2π − (− cos 0) = 0.

0 0
The integral represents the sum of areas under the curve, above the x-axis minus the areas below
the x-axis. (See Figure 2.)

1
+ 2�

Figure 2: Graph of f (x) = sin x for 0 ≤ x ≤ 2π.

2
Lecture 19 18.01 Fall 2006

Integrals have an important additive property (See Figure 3.)


� b � c � c
f (x)dx + f (x)dx = f (x)dx
a b a

a b c
Figure 3: Illustration of the additive property of integrals

New Definition:
� a � b
f (x)dx = − f (x)dx
b a
This definition is used so that the fundamental theorem is valid no matter if a < b or b < a. It also
makes it so that the additive property works for a, b, c in any order, not just the one pictured in
Figure 3.

3
Lecture 19 18.01 Fall 2006

Estimation:
� b � b
If f (x) ≤ g(x), then f (x)dx ≤ g(x)dx (only if a < b)
a a

Example 5. Estimation of ex
Since 1 ≤ ex for x ≥ 0, � 1 � 1
1dx ≤ ex dx
0 0
� 1 �1
ex dx = ex � = e1 − e0 = e − 1

0 0

Thus 1 ≤ e − 1, or e ≥ 2.

Example 6. We showed earlier that 1 + x ≤ ex . It follows that


� 1 � 1
(1 + x)dx ≤ ex dx = e − 1
0 0

1 ��1
x2 ��
� �
3
(1 + x)dx = x+ =
0 2 �0 2
3 5
Hence, ≤ e − 1,or, e ≥ .
2 2

Change of Variable:

If f (x) = g(u(x)), then we write du = u� (x)dx and


� � �
g(u)du = g(u(x))u (x)dx = f (x)u� (x)dx

(indefinite integrals)

For definite integrals:


� x2 � u2
f (x)u� (x)dx = g(u)du where u1 = u(x1 ), u2 = u(x2 )
x1 u1

� 2 � 3 �4
Example 7. x + 2 x2 dx
1

du
Let u = x3 + 2. Then du = 3x2 dx =⇒ x2 dx = ;
3
x1 = 1, x2 = 2 =⇒ u1 = 13 + 2 = 3, u2 = 23 + 2 = 10, and
� 2 � 10 �10
� 3 �4 du u5 �� 105 − 35
x + 2 x2 dx = u4 = =
1 3 3 15 3� 15

4
Lecture 20 18.01 Fall 2006

Lecture 20: Second Fundamental Theorem

Recall: First Fundamental Theorem of Calculus (FTC 1)

If f is continuous and F � = f , then


� b
f (x)dx = F (b) − F (a)
a

We can also write that as � b � �x=b


f (x)dx = f (x)dx �

a x=a

Do all continuous functions have antiderivatives? Yes. However...


What about a function like this? �
2
e−x dx =??

Yes, this antiderivative exists. No, it’s not a function we’ve met before: it’s a new function.
The new function is defined as an integral:
� x
2
F (x) = e−t dt
0

� −x2
It will have the property that F (x) = e .
2 2 sin x
Other new functions include antiderivatives of e−x , x1/2 e−x , , sin(x2 ), cos(x2 ), . . .
x

Second Fundamental Theorem of Calculus (FTC 2)


� x
If F (x) = f (t)dt and f is continuous, then
a
F � (x) = f (x)

Geometric Proof of FTC 2: Use the area interpretation: F (x) equals the area under the curve
between a and x.

ΔF = F (x + Δx) − F (x)
ΔF ≈ (base)(height) ≈ (Δx)f (x) (See Figure 1.)
ΔF
≈ f (x)
Δx
ΔF
Hence lim = f (x)
Δx→0 Δx

But, by the definition of the derivative:


ΔF
lim = F � (x)
Δx→0 Δx

1
Lecture 20 18.01 Fall 2006

∆F
F(x)

a x x+∆x
Figure 1: Geometric Proof of FTC 2.

Therefore,
F � (x) = f (x)

Another way to prove FTC 2 is as follows:


�� �
x+Δx � x
ΔF 1
= f (t)dt − f (t)dt
Δx Δx a a
� x+Δx
1
= f (t)dt (which is the “average value” of f on the interval x ≤ t ≤ x + Δx.)
Δx x
As the length Δx of the interval tends to 0, this average tends to f (x).

Proof of FTC 1 (using FTC 2)


� x

Start with F = f (we assume that f is continuous). Next, define G(x) = f (t)dt. By FTC2,
a
� � � �
G (x) = f (x). Therefore, (F − G) = F − G = f − f = 0. Thus, F − G = constant. (Recall we
used the Mean Value Theorem to show this).
Hence, F (x) = G(x) + c. Finally since G(a) = 0,
� b
f (t)dt = G(b) = G(b) − G(a) = [F (b) − c] − [F (a) − c] = F (b) − F (a)
a

which is FTC 1.
Remark. In the preceding proof G was a definite integral and F could be any antiderivative. Let
us illustrate with the example f (x) = sin x. Taking a = 0 in the proof of FTC 1,
� x �x
G(x) = cos t dt = sin t� = sin x and G(0) = 0.

0 0

2
Lecture 20 18.01 Fall 2006

If, for example, F (x) = sin x + 21. Then F � (x) = cos x and
� b
sin x dx = F (b) − F (a) = (sin b + 21) − (sin a + 21) = sin b − sin a
a

Every function of the form F (x) = G(x) + c works in FTC 1.

Examples of “new” functions

The error function, which is often used in statistics and probability, is defined as
� x
2 2
erf(x) = √ e−t dt
π 0
and lim erf(x) = 1 (See Figure 2)
x→∞

Figure 2: Graph of the error function.

Another “new” function of this type, called the logarithmic integral, is defined as
� x
dt
Li(x) =
2 ln t

This function gives the approximate number of prime numbers less than x. A common encryption
technique involves encoding sensitive information like your bank account number so that it can be
sent over an insecure communication channel. The message can only be decoded using a secret
prime number. To know how safe the secret is, a cryptographer needs to know roughly how many
200-digit primes there are. You can find out by estimating the following integral:
� 10201
dt
10200 ln t
We know that

ln 10200 = 200 ln(10) ≈ 200(2.3) = 460 and ln 10201 = 201 ln(10) ≈ 462

3
Lecture 20 18.01 Fall 2006

We will approximate to one significant figure: ln t ≈ 500 for 200 ≤ t ≤ 10201 .


1
With all of that in mind, the number of 200-digit primes is roughly
� 10201 � 10201 � 9 · 10200
dt dt 1 � 201
≈ = 10 − 10200 ≈ ≈ 10198
10200 ln t 10200 500 500 500

There are LOTS of 200-digit primes. The odds of some hacker finding the 200-digit prime required
to break into your bank account number are very very slim.
Another set of “new” functions are the Fresnel functions, which arise in optics:
� x
C(x) = cos(t2 )dt
0
� x
S(x) = sin(t2 )dt
0

Bessel functions often arise in problems with circular symmetry:


� π
1
J0 (x) = cos(x sin θ)dθ
2π 0

On the homework, you are asked to find C � (x). That’s easy!

C � (x) = cos(x2 )
� x
dt
We will use FTC 2 to discuss the function L(x) = from first principles next lecture.
1 t

1 The middle equality in this approximation is a very basic and useful fact
� b
c dx = c(b − a)
a

Think of this as finding the area of a rectangle with base (b − a) and height c. In the computation above, a =
1
10200 , b = 10201 , c = 500

4
Lecture 21 18.01 Fall 2006

Lecture 21: Applications to Logarithms and


Geometry

Application of FTC 2 to Logarithms


The integral definition of functions like C(x), S(x) of Fresnel makes them nearly as easy to use as
elementary functions. It is possible to draw their graphs and tabulate values. You are asked to
carry out an example or two of this on your problem set. To get used to using definite integrals
and FTC2, we will discuss in detail the simplest integral that gives rise to a relatively new function,
namely the logarithm.
Recall that
xn+1

xn dx = +c
n+1
except when n = −1. It follows that the antiderivative of 1/x is not a power, but something else.
So let us define a function L(x) by � x
dt
L(x) =
1 t
(This function turns out to be the logarithm. But recall that our approach to the logarithm was fairly
involved. We first analyzed ax , and then defined the number e, and finally defined the logarithm as
the inverse function to ex . The direct approach using this integral formula will be easier.)
All the basic properties of L(x) follow directly from its definition. Note that L(x) is defined for
0 < x < ∞. (We will not extend the definition past x = 0 because 1/t is infinite at t = 0.) Next,
the fundamental theorem of calculus (FTC2) implies
1
L� (x) =
x
Also, because we have started the integration with lower limit 1, we see that
� 1
dt
L(1) = =0
1 t

Thus L is increasing and crosses the x-axis at x = 1: L(x) < 0 for 0 < x < 1 and L(x) > 0 for
x > 1. Differentiating a second time,
L�� (x) = −1/x2
It follows that L is concave down.
The key property of L(x) (showing that it is, indeed, a logarithm) is that it converts multiplication
into addition:
Claim 1. L(ab) = L(a) + L(b)
Proof: By definition of L(ab) and L(a),
� ab � a � ab � ab
dt dt dt dt
L(ab) = = + = L(a) +
1 t 1 t a t a t

1
Lecture 21 18.01 Fall 2006

� ab
dt
To handle , make the substitution t = au. Then
a t

dt = adu; a < t < ab =⇒ 1 < u < b

Therefore,
� ab � u=b � b
dt adu du
= = = L(b)
a t u=1 au 1 u
This confirms L(ab) = L(a) + L(b).
Two more properties, the end values, complete the general picture of the graph.
Claim 2. L(x) → ∞ as x → ∞.
Proof: It suffices to show that L(2n ) → ∞ as n → ∞, because the fact that L is increasing fills in
all the values in between the powers of 2.

L(2n ) = L(2 · 2n−1 ) = L(2) + L(2n−1 )


= L(2) + L(2) + L(2n−2 ) = L(2) + L(2) + · · · + L(2) (n times)

Consequently, L(2n ) = nL(2) → ∞ as n → ∞. (In more familiar notation, ln 2n = n ln 2.)


Claim 3. L(x) → −∞ as x → 0+ .
� �
1
Proof: 0 = L(1) = L x · = L(x) + L(1/x) =⇒ L(x) = −L(1/x). As x → 0+ , 1/x → +∞, so
x
Claim 2 implies L(1/x) → ∞. Hence

L(x) = −L(1/x) → −∞, as x → 0+

Thus L(x), defined on 0 < x < ∞ increases from −∞ to ∞, crossing the x-axis at x = 1. It is
concave down and its graph can be drawn as in Fig. 1.
This provides an alternative to our previous approach to the exponential and log functions.
Starting from L(x), we can define the log function by ln x = L(x), define e as the number such that
L(e) = 1, define ex as the inverse function of L(x), and define ax = exL(a) .

to +∞

.(1,0)

to −∞

Figure 1: Graph of y = ln(x).

2
Lecture 21 18.01 Fall 2006

Application of FTCs to Geometry (Volumes and Areas)

1. Areas between two curves

f(x)

y g(x)

dx

a b

Figure 2: Finding the area between two curves.

Refer to Figure 2. Find the crossing points a and b. The area, A, between the curves is
� b
A= (f (x) − g(x)) dx
a

Example 1. Find the area in the region between x = y 2 and y = x − 2.

(4, 2)
x = y2

y=x−2
(0, 0)

(1,−1)
(0, -2)

Figure 3: The intersection of x = y2 and y = x − 2.

3
Lecture 21 18.01 Fall 2006

First, graph these functions and find the crossing points (see Figure 3).

y+2 = x = y2
y2 − y − 2 = 0
(y − 2)(y + 1) = 0

Crossing points at y = −1, 2. Plug these back in to find the associated x values, x = 1 and x = 4.
Thus the curves meet at (1, −1) and (4, 2) (see Figure 3).
There are two ways of finding the area between these two curves, a hard way and an easy way.

Hard Way: Vertical Slices


If we slice the region between the two curves vertically, we need to consider two different regions.

(4, 2)
x = y2
dx

y=x−2
(0, 0)

(1,−1)

(0, -2)

Figure 4: The intersection of x = y2 and y = x − 2.

Where x > 1, the region’s lower bound is the straight line. For x < 1, however, the region’s lower
bound is the lower half of the sideways parabola. We find the area, A, between the two curves by
integrating the difference between the top curve and the bottom curve in each region:
� 1 � 4
√ �

�√ �√ �
A= x − (− x) dx + x − (x − 2) dx = (ytop − ybottom ) dx
0 1

Easy Way: Horizontal Slices


Here, instead of subtracting the bottom curve from the top curve, we subtract the right curve from
the left one.

y=2
y2 −y 3
� � � ��
�2 4 8 1 1 9
(y + 2) − y 2 dx =
� �
A= (xleft −xright ) dy = + 2y + � = +4− −( −2+ ) =
y=−1 2 3 −1 2 3 2 3 2

4
Lecture 21 18.01 Fall 2006

(4, 2)
x = y2

dy
y = x − 2 ; (x = y +2)
(0, 0)

(1,−1)

(0, -2)

Figure 5: The intersection of x = y2 and y = x − 2.

2. Volumes of solids of revolution

Rotate f (x) about the x-axis, coming out of the page, to get:

rotate an x-y plane section


y by 2π radians

f(x)

dx

Figure 6: A solid of revolution: the purple slice is rotated by π/4 and π/2.

We want to figure out the volume of a “slice” of that solid. We can approximate each slice as a
disk with width dx, radius y, and a cross-sectional area of πy 2 . The volume of one slice is then:
dV = πy 2 dx (for a solid of revolution around the x-axis)
Integrate with respect to x to find the total volume of the solid of revolution.

5
Lecture 21 18.01 Fall 2006

Example 2. Find the volume of a ball of radius a.

−a a x
dx

Figure 7: A ball of radius a

The equation for the upper half of the circle is



y = a2 − x2 .

If we spin the upper part of the curve about the x-axis, we get a ball of radius a. Notice that x
ranges from −a to +a. Putting all this together, we find
� x=a
πx3 ��a
� � � � �
2 2 4
V = πy 2 dx = π(a2 − x2 )dx = πa2 x − � = πa3 − − πa3 = πa3
x=−a 3 −a 3 3 3

One can often exploit symmetry to further simplify these types of problems. In the problem
above, for example, notice that the curve is symmetric about the y-axis. Therefore,
� a � a
x3 ��a
� �
V = π(a2 − x2 )dx = 2 π(a2 − x2 )dx = 2 πa2 x −
3

−a 0 0

(The savings is that zero is an easier lower limit to work with than −a.) We get the same answer:

x3 ��a
� �
2
� π � 4
V = 2 πa x − � = 2 πa3 − a3 = πa3
3 0 3 3

6
Lecture 22 18.01 Fall 2006

Lecture 22: Volumes by Disks and Shells

Disks and Shells


We will illustrate the 2 methods of finding volume through an example.
Example 1. A witch’s cauldron

Figure 1: y = x2 rotated around the y-axis.

Method 1: Disks

thickness of dy
x

Figure 2: Volume by Disks for the Witch’s Cauldron problem.

The area of the disk in Figure 2 is πx2 . The disk has thickness dy and volume dV = πx2 dy.
The volume V of the cauldron is
� a
V = πx2 dy (substitute y = x2 )
0
� a
y 2 ��a πa2
V = πy dy = π � =
0 2 0 2

1
Lecture 22 18.01 Fall 2006

π 2
If a = 1 meter, then V = a gives
2
π 3 π π
V = m = (100 cm)3 = 106 cm3 ≈ 1600 liters (a huge cauldron)
2 2 2

Warning about units.

If a = 100 cm, then


π π π
(100)2 = 104 cm3 = 10 ∼ 16 liters
V =
2 2 2
But 100cm = 1m. Why is this answer different? The resolution of this paradox is hiding in the
equation.
y = x2
At the top, 100 = x2 =⇒ x = 10 cm. So the second cauldron looks like Figure 3. By contrast, when

20 cm
100 cm

Figure 3: The skinny cauldron.

a = 1 m, the top is ten times wider: 1 = x2 or x = 1 m. Our equation, y = x2 , is not scale-invariant.


The shape described depends on the units used.

Method 2: Shells

This really should be called the cylinder method.


y

x
a

x
√a

Figure 4: x = radius of cylinder. Thickness of cylinder = dx. Height of cylinder = a − y = a − x2 .

2
Lecture 22 18.01 Fall 2006

The thin shell/cylinder has height a − x2 , circumference 2πx, and thickness dx.

dV = (a − x2 )(2πx)dx
� x=√a � √a
2
V = (a − x )(2πx)dx = 2π (ax − x3 )dx
x=0 0
� 2 � √
x4 �� a
� 2
a2
� 2�
πa2

x a a
= 2π a − � = 2π − = 2π = (same as before)
2 4 0 2 4 4 2

Example 2. The boiling cauldron


Now, let’s fill this cauldron with water, and light a fire under it to get the water to boil (at 100o C).
Let’s say it’s a cold day: the temperature of the air outside the cauldron is 0o C. How much energy
does it take to boil this water, i.e. to raise the water’s temperature from 0o C to 100o C? Assume the
y

70oC

100oC x

Figure 5: The boiling cauldron (y = a = 1 meter.)

temperature decreases linearly between the top and the bottom (y = 0) of the cauldron:

T = 100 − 30y (degrees Celsius)

Use the method of disks, because the water’s temperature is constant over each horizontal disk. The
total heat required is
� 1
H = T (πx2 )dy (units are (degree)(cubic meters))
0
� 1
= (100 − 30y)(πy)dy
0
� 1 �1
= π (100y − 30y 2 )dy = π(50y 2 − 10y 3 )� = 40π (deg.)m3

0 0

How many calories is that?


� �3
1 cal 100 cm
# of calories = (40π) = (40π)(106 ) cal = 125 × 103 kcal
cm3 · deg 1m

There are about 250 kcals in a candy bar, so there are about
� �
1
# of calories = candy bar × 103 ≈ 500 candy bars
2

So, it takes about 500 candy bars’ worth of energy to boil the water.

3
Lecture 22 18.01 Fall 2006

velocity

Figure 6: Flow is faster in the center of the pipe. It slows– “sticks”– at the edges (i.e. the inner surface of the pipe.)

Example 3. Pipe flow


Poiseuille was the first person to study fluid flow in pipes (arteries, capillaries). He figured out the
velocity profile for fluid flowing in pipes is:

v = c(R2 − r2 )
distance
v = speed =
time

v
cR2

v=c(R2-r2)

r
R

Figure 7: The velocity of fluid flow vs. distance from the center of a pipe of radius R.

The flow through the “annulus” (a.k.a ring) is (area of ring)(flow rate)

area of ring = 2πrdr (See Fig. 8: circumference 2πr, thickness dr)

v is analogous to the height of the shell.

4
Lecture 22 18.01 Fall 2006

dr

Figure 8: Cross-section of the pipe.

� R � R
total flow through pipe = v(2πrdr) = c (R2 − r2 )2πrdr
0 0
� R � 2 2
r4 ��R

R r
= 2πc (R2 r − r3 )dr = 2πc −
2 4

0 0
π 4
flow through pipe = cR
2
Notice that the flow is proportional to R4 . This means there’s a big advantage to having thick pipes.
Example 4. Dart board
You aim for the center of the board, but your aim’s not always perfect. Your number of hits, N , at
2
radius r is proportional to e−r .
2
N = ce−r
This looks like:

y = ce-r
2

r 2

Figure 9: This graph shows how likely you are to hit the dart board at some distance r from its center.

The number of hits within a given ring with r1 < r < r2 is


� r2
2
c e−r (2πrdr)
r1

We will examine this problem more in the next lecture.

5
Lecture 23 18.01 Fall 2006

Lecture 23: Work, Average Value, Probability

Application of Integration to Average Value


You already know how to take the average of a set of discrete numbers:
a 1 + a2 a1 + a2 + a3
or
2 3
Now, we want to find the average of a continuum.

y=f(x)
y4.

.
a x4 b

Figure 1: Discrete approximation to y = f (x) on a ≤ x ≤ b.

y1 + y2 + ... + yn
Average ≈
n
where
a = x0 < x1 < · · · xn = b
y0 = f (x0 ), y1 = f (x1 ), . . . yn = f (xn )
and
b−a
n(Δx) = b − a ⇐⇒ Δx =
n
and
The limit of the Riemann Sums is
b
b−a

lim (y1 + · · · + yn ) = f (x) dx
n→∞ n a

Divide by b − a to get the continuous average


b
y1 + · · · + yn

1
lim = f (x) dx
n→∞ n b−a a

1
Lecture 23 18.01 Fall 2006

y=√1-x2

area = �/2

Figure 2: Average height of the semicircle.


Example 1. Find the average of y = 1 − x2 on the interval −1 ≤ x ≤ 1. (See Figure 2)

� 1
1 � 1 �π� π
Average height = 1 − x2 dx = =
2 −1 2 2 4

Example 2. The average of a constant is the same constant


� b
1
53 dx = 53
b−a a

Example 3. Find the average height y on a semicircle, with respect to arclength. (Use dθ not dx.
See Figure 3)

equal weighting in θ

different weighting in x

Figure 3: Different weighted averages.

2
Lecture 23 18.01 Fall 2006

y = sin θ
� π π
1 1 � 1 2
Average = sin θ dθ = (− cos θ) � = (− cos π − (− cos 0)) =

π 0 π 0 π π

Example 4. Find the average temperature of water in the witches cauldron from last lecture. (See
Figure 4).

2m

1m

Figure 4: y = x2 , rotated about the y-axis.

First, recall how to find the volume of the solid of revolution by disks.
� 1 � 1
πy 2 ��1 π
V = (πx2 ) dy = πy dy = � =
0 0 2 0 2
Recall that T (y) = 100 − 30y and (T (0) = 100o ; T (1) = 70o ). The average temperature per unit
volume is computed by giving an importance or “weighting” w(y) = πy to the disk at height y.
�1
0
T (y)w(y) dy
�1
0
w(y) dy
The numerator is
� 1 � 1 �1
T πy dy = π (100 − 30y)ydy = π(500y 2 − 10y 3 ) � = 40π

0 0 0

Thus the average temperature is:


40π
= 80o C
π/2
Compare this with the average taken with respect to height y:
1 1
� � 1 �1
T dy = (100 − 30y)dy = (100y − 15y 2 ) � = 85o C

1 0 0 0

T is linear. Largest T = 100o C, smallest T = 70o C, and the average of the two is
70 + 100
= 85
2

3
Lecture 23 18.01 Fall 2006

The answer 85o is consistent with the ordinary average. The weighted average (integration with
respect to πy dy) is lower (80o ) because there is more water at cooler temperatures in the upper
parts of the cauldron.

Dart board, revisited

Last time, we said that the accuracy of your aim at a dart board follows a “normal distribution”:
2
ce−r

Now, let’s pretend someone – say, your little brother – foolishly decides to stand close to the dart
board. What is the chance that he’ll get hit by a stray dart?

dart board

r₁ 3r₁
2r₁ little
brother

Figure 5: Shaded section is 2ri < r < 3r1 between 3 and 5 o’clock.

To make our calculations easier, let’s approximate your brother as a sector (the shaded region
in Fig. 5). Your brother doesn’t quite stand in front of the dart board. Let us say he stands at a
distance r from the center where 2r1 < r < 3r1 and r1 is the radius of the dart board. Note that
your brother doesn’t surround the dart board. Let us say he covers the region between 3 o’clock
1
and 5 o’clock, or of a ring.
6

Remember that
part
probability =
whole

4
Lecture 23 18.01 Fall 2006

width dr,
circumference 2πr
r weighting ce-r 2
dr

Figure 6: Integrating over rings.


� 2

The ring has weight ce−r (2πr)(dr) (see Figure 6). The probability of a dart hitting your brother
is:
1 3r1 −r 2

6 2r1 ce 2πr dr
�∞ 2
−r
ce 2πr dr
0
1 5−3
Recall that = is our approximation to the portion of the circumference where the little
6 12 2 2
brother stands. (Note: e−r = e(−r ) not (e−r )2 )

� b � �
1 2 �b 1 1 d −r2

−r 2 2 2 2
re dr = − e−r � = − e−b + e−a e = −2re−r
a 2 a 2 2 dr
Denominator: � ∞
1 2 �R→∞ 1 1 1
2
� 2 2
e−r rdr = − e−r � = − e−R + e−0 =
0 2 0 2 2 2
−R2
(Note that e → 0 as R → ∞.)

Figure 7: Normal Distribution.

� 3r1 2 � 3r1 2
1
ce−r 2πr dr 1
e−r r dr 3r1 2
−e−r ��3r1

6 2r1 6
2r1 1 2
Probability = �∞ = �∞ = e−r r dr =
ce−r2 2πr dr −r 2 r dr 3 6

0 0
e 2r1 2r1

5
Lecture 23 18.01 Fall 2006

2 2
−e−9r1 + e−4r1
Probability =
6
Let’s assume that the person throwing the darts hits the dartboard 0 ≤ r ≤ r1 about half the time.
(Based on personal experience with 7-year-olds, this is realistic.)
� r1
1 2 2 2 1
P (0 ≤ r ≤ r1 ) = = 2e−r rdr = −e−r1 + 1 =⇒ e−r1 =
2 0 2
2 1
e−r1 =
2
� �9
�9
−9r12

−r12 1
e = e = ≈0
2
2
� 2 �4 � 1 � 4 1
e−4r1 = e−r1 = =
2 16
So, the probability that a stray dart will strike your little brother is
� �� �
1 1 1

16 6 100

In other words, there’s about a 1% chance he’ll get hit with each dart thrown.

6
Lecture 23 18.01 Fall 2006

Volume by Slices: An Important Example


� ∞
2
Compute Q = e−x dx
−∞

2
Figure 8: Q = Area under curve e(−x ) .

This is one of the most important integrals in all of calculus. It is especially important in probability
and statistics. It’s an improper integral, but don’t let those ∞’s scare you. In this integral, they’re
actually easier to work with than finite numbers would be.
To find Q, we will first find a volume of revolution, namely,
2 �
V = volume under e−r (r = x2 + y 2 )

We find this volume by the method of shells, which leads to the same integral as in the last problem.
2
The shell or cylinder under e−r at radius r has circumference 2πr, thickness dr; (see Figure 9).
2
Therefore dV = e−r 2πrdr. In the range 0 ≤ r ≤ R,
� R
2 �R
2
� 2
e−r 2πr dr = −πe−r � = −πe−R + π
0 0

2
When R → ∞, e−R → 0,
� ∞
2
V = e−r 2πr dr = π (same as in the darts problem)
0

7
Lecture 23 18.01 Fall 2006

width dr

Figure 9: Area of annulus or ring, (2πr)dr.

Next, we will find V by a second method, the method of slices. Slice the solid along a plane
where y is fixed. (See Figure 10). Call A(y) the cross-sectional area. Since the thickness is dy (see
Figure 11), � ∞
V = A(y) dy
−∞

z
A(y)

y
x

Figure 10: Slice A(y).

8
Lecture 23 18.01 Fall 2006

dy
x
above level of y
in cross-section
of area A(y)
top view

Figure 11: Top view of A(y) slice.

To compute A(y), note that it is an integral (with respect to dx)


� ∞ � ∞ � ∞
−r 2 −x2 −y 2 −y 2 2 2
A(y) = e dx = e dx = e e−x dx = e−y Q
−∞ −∞ −∞

Here, we have used r2 = x2 + y 2 and


2
−y 2 2 2
e−x = e−x e−y

and the fact that y is a constant in the A(y) slice (see Figure 12). In other words,
� ∞ � ∞
2 2 2
ce−x dx = c e−x dx with c = e−y
−∞ −∞

y fixed
ce-x
2

x -∞ x ∞

Figure 12: Side view of A(y) slice.

9
Lecture 23 18.01 Fall 2006

It follows that
� ∞ � ∞ � ∞
−y 2 2
V = A(y) dy = e Q dy = Q e−y dy = Q2
−∞ −∞ −∞

Indeed, � ∞ � ∞
−x2 2
Q= e dx = e−y dy
−∞ −∞

because the name of the variable does not matter. To conclude the calculation read the equation
backwards: √
π = V = Q2 =⇒ Q = π

We can rewrite Q = π as � ∞
1 2
√ e−x dx = 1
π −∞

An equivalent rescaled version of this formula (replacing x with x/ 2σ)is used:
� ∞
1 2 2
√ e−x /2σ dx = 1
2πσ −∞
1 2 2
This formula is central to probability and statistics. The probability distribution √ e−x /2σ on
2πσ
−∞ < x < ∞ is known as the normal distribution, and σ > 0 is its standard deviation.

10
Lecture 24 18.01 Fall 2006

Lecture 24: Numerical Integration

Numerical Integration
We use numerical integration to find the definite integrals of expressions that look like:
� b
(a big mess)
a

We also resort to numerical integration when an integral has no elementary antiderivative. For
instance, there is no formula for
� x � 3
2
2
cos(t )dt or e−x dx
0 0

Numerical integration yields numbers rather than analytical expressions.


We’ll talk about three techniques for numerical integration: Riemann sums, the trapezoidal rule,
and Simpson’s rule.
1. Riemann Sum

a b

Figure 1: Riemann sum with left endpoints: (y0 + y1 + . . . + yn−1 )Δx

Here,
xi − xi−1 = Δx

(or, xi = xi−1 + Δx)

a = x0 < x1 < x2 < . . . < xn = b


y0 = f (x0 ), y1 = f (x1 ), . . . yn = f (xn )

1
Lecture 24 18.01 Fall 2006

2. Trapezoidal Rule

The trapezoidal rule divides up the area under the function into trapezoids, rather than rectangles.
The area of a trapezoid is the height times the average of the parallel bases:
� � � �
base 1 + base 2 y3 + y4
Area = height = Δx (See Figure 2)
2 2

y4

y3

∆x

� �
y3 + y 4
Figure 2: Area = Δx
2

a b

Figure 3: Trapezoidal rule = sum of areas of trapezoids.

� �
y0 + y1 y1 + y2 y2 + y3 yn−1 + yn
Total Trapezoidal Area = Δx + + + ... +
2 2 2 2
�y yn �
0
= Δx + y1 + y2 + ... + yn−1 +
2 2

2
Lecture 24 18.01 Fall 2006

Note: The trapezoidal rule gives a more symmetric treatment of the two ends (a and b) than a
Riemann sum does — the average of left and right Riemann sums.

3. Simpson’s Rule

This approach often yields much more accurate results than the trapezoidal rule does. Here, we
match quadratics (i.e. parabolas), instead of straight or slanted lines, to the graph. This approach
requires an even number of intervals.

y0
y2
y1

x₀ x₁ x₂
∆x ∆x

Figure 4: Area under a parabola.

� �
y0 + 4y1 + y2
Area under parabola = (base)(weighted average height) = (2Δx)
6
Simpson’s rule for n intervals (n must be even!)
� �
1
Area = (2Δx) [(y0 + 4y1 + y2 ) + (y2 + 4y3 + y4 ) + (y4 + 4y5 + y6 ) + · · · + (yn−2 + 4yn−1 + yn )]
6

Notice the following pattern in the coefficients:

1 4 1
1 4 1
1 4 1
1 4 2 4 2 4 1

3
Lecture 24 18.01 Fall 2006

1st chunk 2nd chunk

0 1 2 3 4

Figure 5: Area given by Simpson’s rule for four intervals

Simpson’s rule:
� b
Δx
f (x) dx ≈ (y0 + 4y1 + 2y2 + 4y3 + 2y4 + . . . + 4yn−3 + 2yn−2 + 4yn−1 + yn )
a 3

The pattern of coefficients in parentheses is:

1 4 1 = sum 6
1 4 2 4 1 = sum 12
1 4 2 4 2 4 1 = sum 18

To double check – plug in f (x) = 1 (n even!).

Δx Δx � �n� �n ��
(1 + 4 + 2 + 4 + 2 + · · · + 2 + 4 + 1) = 1+1+4 +2 − 1 = nΔx (n even)
3 3 2 2

4
Lecture 24 18.01 Fall 2006

� 1
1
Example 1. Evaluate dx using two methods (trapezoidal and Simpson’s) of numerical
0 1 + x2
integration.

0 ∆x ∆x 1
1
Figure 6: Area under (1+x2 )
above [0, 1].

x 1/(1 + x2 )
0 1
1 4
2 5
1
1 2

By the trapezoidal rule:


� � � � �� � �
1 1 1 1 4 1 1 1 1 4 1
Δx y0 + y1 + y2 = (1) + + = + + = 0.775
2 2 2 2 5 2 2 2 2 5 4

By Simpson’s rule:
� � ��
Δx 1/2 4 1
(y0 + 4y1 + y2 ) = 1+4 + = 0.78333...
3 3 5 2

Exact answer:
� 1 �1
1 π π
dx = tan−1 x� = tan−1 1 − tan−1 0 = − 0 = ≈ 0.785

1+x 2 0 4 4
0

Roughly speaking, the error, | Simpson’s − Exact |, has order of magnitude (Δx)4 .

5
Exam 3 Review 18.01 Fall 2006

Lecture 25: Exam 3 Review

Integration
1. Evaluate definite integrals. Substitution, first fundamental theorem of calculus (FTC 1), (and
hints?)
2. FTC 2: � x
d
f (t) dt = f (t)
dx a
� x
If F (x) = f (t) dt, find the graph of F , estimate F , and change variables.
a

3. Riemann sums; trapezoidal and Simpson’s rules.


4. Areas, volumes.
5. Other cumulative sums: average value, probability, work, etc.

There are two types of volume problems:

1. solids of revolution
2. other (do by slices)

In these problems, there will be something you can draw in 2D, to be able to see what’s going on in
that one plane.
In solid of revolution problems, the solid is formed by revolution around the x-axis or the y-axis.
You will have to decide how to chop up the solid: into shells or disks. Put another way, you must
decide whether to integrate with dx or dy. After making that choice, the rest of the procedure is
systematically determined. For example, consider a shape rotated around the y-axis.

• Shells: height y2 − y1 , circumference 2πx, thickness dx

• Disks (washers): area πx2 (or πx22 − πx21 ), thickness dy; integrate dy.

Work

Work = Force · Distance


We need to use an integral if the force is variable.

1
Exam 3 Review 18.01 Fall 2006

Example 1: Pendulum. See Figure 1


Consider a pendulum of length L, with mass m at angle θ. The vertical force of gravity is mg (g =
gravitational coefficient on Earth’s surface)

L
θ

mass m
mg

Figure 1: Pendulum.

In Figure 2, we find the component of gravitational force acting along the pendulum’s path
F = mg sin θ.

mg
θ

Figure 2: F = mg sin θ (force tangent to path of motion).

2
Exam 3 Review 18.01 Fall 2006

Is it possible to build a perpetual motion machine? Let’s think about a simple pendulum, and
how much work gravity performs in pulling the pendulum from θ0 to the bottom of the pendulum’s
arc.
Notice that F varies. That’s why we have to use an integral for this problem.
� θ0 � θ0
W = (Force) · (Distance) = (mg sin θ)(L dθ)
0 0
�θ0
W = −Lmg cos θ� = −Lmg(cos θ0 − 1) = mg [L(1 − cos θ0 )]

0

In Figure 3, we see that the work performed by gravity moving the pendulum down a distance
L(1 − cos θ) is the same as if it went straight down.

θ
L

L(1-cosθ)

Figure 3: Effect of gravity on a pendulum.

In other words, the amount of work required depends only on how far down the pendulum goes.
It doesn’t matter what path it takes to get there. So, there’s no free (energy) lunch, no perpetual
motion machine.

3
MIT OpenCourseWare
[Link]

18.01 Single Variable Calculus


Fall 2006

For information about citing these materials or our Terms of Use, visit: [Link]
Lecture 26 18.01 Fall 2006

Lecture 26: Trigonometric Integrals and Substitution

Trigonometric Integrals

How do you integrate an expression like sinnx cosmx dx? (n = 0, 1, 2... and m = 0, 1, 2, . . .)

We already know that:


� �
sin x dx = − cos x + c and cos x dx = sin x + c

Method A

Suppose either n or m is odd.



Example 1. sin3x cos2x dx.
Our strategy is to use sin2x + cos2x = 1 to rewrite our integral in the form:
� �
3 2
sin x cos x dx = f (cosx) sinx dx

Indeed, � � �
sin3x cos2x dx = sin2x cos2x sin x dx = (1 − cos2x) cos2x sin x dx

Next, use the substitution


u = cos x and du = − sin x dx
Then, � �
(1 − cos2 x) cos2 x sin x dx = (1 − u2 )u2 (−du)

1 1 1 1
= (−u2 + u4 )du = − u3 + u5 + c = − cos3 u + cos5 x + c
3 5 3 5

Example 2. � � �
cos3 x dx = f (sin x) cos x dx = (1 − sin2 x) cos x dx

Again, use a substitution, namely

u = sin x and du = cos x dx


u3 sin3 x
� �
cos3 x dx = (1 − u2 )du = u − + c = sin x − +c
3 3

1
Lecture 26 18.01 Fall 2006

Method B

This method requires both m and n to be even. It requires double-angle formulae such as
1 + cos 2x
cos2 x =
2
(Recall that cos 2x = cos2 x − sin2 x = cos2 x − (1 − sin2 x) = 2 cos2 x − 1)
Integrating gets us � �
2 1 + cos 2x x sin(2x)
cos x dx = dx = + +c
2 2 4
We follow a similar process for integrating sin2 x.

1 − cos(2x)
sin2 x =
2
1 − cos(2x)
� �
2 x sin(2x)
sin x dx = dx = − +c
2 2 4
The full strategy for these types of problems is to keep applying Method B until you can apply
Method A (when one of m or n is odd).

Example 3. sin2 x cos2 x dx.
Applying Method B twice yields
� � �� � � � �
1 − cos 2x 1 + cos 2x 1 1 2
dx = − cos 2x dx
2 2 4 4
� � �
1 1 1 1
= − (1 + cos 4x) dx = x − sin 4x + c
4 8 8 32
There is a shortcut for Example 3. Because sin 2x = 2 sin x cos x,
� � �2
1 − cos 4x
� �
2 2 1 1
sin x cos x dx = sin 2x dx = dx = same as above
2 4 2

The next family of trig integrals, which we’ll start today, but will not finish is:

secn x tanm x dx where n = 0, 1, 2, . . . and m = 0, 1, 2, . . .

Remember that
sec2 x = 1 + tan2 x
which we double check by writing

1 sin2 x cos2 x + sin2 x


= 1 + =
cos2 x cos2 x cos3 x
� �
sec2 x dx = tan x + c sec x tan x dx = sec x + c

2
Lecture 26 18.01 Fall 2006

To calculate the integral of tan x, write


� �
sin x
tan x dx = dx
cos x
Let u = cos x and du = − sin x dx, then
� � �
sin x du
tan x dx = dx = − = − ln(u) + c
cos x u

tan x dx = − ln(cos x) + c

(We’ll figure out what sec x dx is later.)

Now, let’s see what happens when you have an even power of secant. (The case n even.)
� � �
sec4 x dx = f (tanx) sec2 x dx = (1 + tan2 x) sec2 x dx

Make the following substitution:


u = tan x
and
du = sec2 x dx
u3 tan3 x
� �
sec4 x dx = (1 + u2 )du = u + + c = tan x + +c
3 3

What happens when you have a odd power of tan? (The case m odd.)
� �
tan3 x sec x dx = f (sec x) d(sec x)

= (sec2 x − 1) sec x tan x dx

(Remember that sec2 x − 1 = tan2 x.)


Use substitution:
u = sec x
and
du = sec x tan x dx
Then,
u3 sec3 x
� �
3
tan x secx dx = (u2 − 1)du = −u+c= − sec x + c
3 3

We carry out one final case: n = 1, m = 0



sec x dx = ln (tan x + sec x) + c

3
Lecture 26 18.01 Fall 2006

We get the answer by “advanced guessing,” i.e., “knowing the answer ahead of time.”

sec2 x + sec x tan x


� � � �
sec x + tan x
sec x dx = sec x dx = dx
sec x + tan x tan x + sec x
Make the following substitutions:
u = tan x + sec x
and
du = (sec2 x + sec x tan x) dx
This gives � �
du
sec x dx = = ln(u) + c = ln(tan x + sec x) + c
u
Cases like n = 3, m = 0 or more generally n odd and m even are more complicated and will be

discussed later.

Trigonometric Substitution
Knowing how to evaluate all of these trigonometric integrals turns out to be useful for evaluating
integrals involving square roots.

Example 4. y = a2 − x2

Figure 1: Graph of the circle x2 + y2 = a2 .

We already know that the area of the top half of the disk is
� a�
πa2
a2 − x2 dx =
−a 2

4
Lecture 26 18.01 Fall 2006

What if we want to find this area?

0 x

Figure 2: Area to be evaluated is shaded.

To do so, you need to evaluate this integral:


� t=x �
a2 − t2 dt
t=0

Let t = a sin u and dt = a cos u du. (Remember to change the limits of integration when you do a
change of variables.)
Then, �
a2 − t2 = a2 − a2 sin2 u = a2 cos2 u; a2 − t2 = a cos u
Plugging this into the integral gives us
� x � � � u=sin−1 (x/a)
a2 − t2 dt = (a cos u) a cos u du = a2 cos2 u du
0 u=0

Here’s how we calculated the new limits of integration:

t = 0 =⇒ a sin u = 0 =⇒ u = 0
t = x =⇒ a sin u = x =⇒ u = sin−1 (x/a)
� x � sin−1 (x/a) � � � −1
� u sin 2u �sin (x/a)
a2 − t2 dt = a2 cos2 u du = a2 +
2 4

0 0 0

2 −1 � 2

a sin (x/a) a
2 sin(sin−1 (x/a)) cos(sin−1 (x/a))
� �
= +
2 4
(Remember, sin 2u = 2 sin u cos u.)
We’ll pick up from here next lecture (Lecture 28 since Lecture 27 is Exam 3).

5
Lecture 28 18.01 Fall 2006

Lecture 28: Integration by Inverse Substitution;


Completing the Square

Trigonometric Substitutions, continued

-a 0 x a

Figure 1: Find area of shaded portion of semicircle.


� x �
a2 − t2 dt
0
t = a sin u;
dt = a cos u du

a2 − t2 = a2 − a2 sin2 u = a2 cos2 u =⇒ a2 − t2 = a cos u (No more square root!)

Start: x = −a ⇔ u = −π/2; Finish: x = a ⇔ u = π/2


� � � � � �
1 + cos(2u) u sin(2u)
a2 − t2 dt = a2 cos2 u du = a2 du = a2 + +c
2 2 4

1 + cos(2u)
(Recall, cos2 u = ).
2
We want to express this in terms of x, not u. When t = 0, a sin u = 0, and therefore u = 0.
When t = x, a sin u = x, and therefore u = sin−1 (x/a).

sin(2u) 2 sin u cos u 1


= = sin u cos u
4 4 2
� x
sin u = sin sin−1 (x/a) =

a

1
Lecture 28 18.01 Fall 2006

How can we find cos u = cos sin−1 (x/a) ? Answer: use a right triangle (Figure 2).
� �

a
x
u
√a²-x²
p
Figure 2: sin u = x/a; cos u = a2 − x2 /a.

From the diagram, we see √


a 2 − x2
cos u =
a
And finally,
x

−1
√ �
(x/a) 1 � x � a2 − x2
� � �

2 u 1 2 sin
a2 − t2 dt = a + sin u cos u − 0 = a +
0 4 2 2 2 a a

x
a2
� � x 1 �
a2 − t2 dt = sin−1 ( ) + x a2 − x2
0 2 a 2
When the answer is this complicated, the route to getting there has to be rather complicated.
There’s no way to avoid the complexity.
1
Let’s double-check this answer. The area of the upper shaded sector in Figure 3 is a2 u. The
√ 2

area of the lower shaded region, which is a triangle of height a2 − x2 and base x, is 12 x a2 − x2 .

2
Lecture 28 18.01 Fall 2006

0 x

Figure 3: Area divided into a sector and a triangle.

Here is a list of integrals that can be computed using a trig substitution and a trig identity.

integral
� substitution trig identity
dx
√ x = tan u tan2 u + 1 = sec2 u
� x2 + 1
dx
√ x = sec u sec2 u − 1 = tan2 u
� x2 − 1
dx
√ x = sin u 1 − sin2 u = cos2 u
1 − x2

Let’s extend this further. How can we evaluate an integral like this?

dx

2
x + 4x
When you have a linear and a quadratic term under the square root, complete the square.

x2 + 4x = (something)2 ± constant

In this case,
(x + 2)2 = x2 + 4x + 4 =⇒ x2 + 4x = (x + 2)2 − 4
Now, we make a substitution.
v =x+2 and dv = dx
Plugging these in gives us � �
dx dv
� = √
(x + 2)2 − 4 v2 − 4
Now, let
v = 2 sec u and dv = 2 sec u tan u
� � �
dv 2 sec u tan u du
√ = = sec u du
v2 − 4 2 tan u

3
Lecture 28 18.01 Fall 2006

Remember that �
sec u du = ln(sec u + tan u) + c

Finally, rewrite everything in terms of x.


2
v = 2 sec u ⇔ cos u =
v
Set up a right triangle as in Figure 4. Express tan u in terms of v.

v
√v²-4
u
2
Figure 4: sec u = v/2 or cos u = 2/v.

Just from looking at the triangle, we can read off



v v2 − 4
sec u = and tan u =
2 2
� √ �
v2 − 4

v
2 sec u du = ln + +c
2 2

= ln(v + v 2 − 4) − ln 2 + c
We can combine those last two terms into another constant, c̃.

dx �
√ = ln(x + 2 + x2 + 4x) + c̃
x2 + 4x

Here’s a teaser for next time. In the next lecture, we’ll integrate all rational functions. By
“rational functions,” we mean functions that are the ratios of polynomials:
P (x)
Q(x)

It’s easy to evaluate an expression like this:


� � �
1 3
+ dx = ln |x − 1| + 3 ln |x + 2| + c
x−1 x+2

4
Lecture 28 18.01 Fall 2006

If we write it a bit differently, however, it becomes much harder to integrate:

1 3 x + 2 + 3(x − 1) 4x − 1
+ = = 2
x−1 x+2 (x − 1)(x + 2) x +x−2

4x − 1

= ???
x2 + x − 2
How can we reorganize what to do starting from (4x − 1)/(x2 + x − 2)? Next time, we’ll see how.
It involves some algebra.

5
Lecture 29 18.01 Fall 2006

Lecture 29: Partial Fractions

We continue the discussion we started last lecture about integrating rational functions. We
defined a rational function as the ratio of two polynomials:

P (x)
Q(x)

We looked at the example


� � �
1 3
+ dx = ln |x − 1| + 3 ln |x + 2| + c
x−1 x+2

That same problem can be disguised:

1 3 (x + 2) + 3(x − 1) 4x − 1
+ = = 2
x−1 x+2 (x − 1)(x + 2) x +x−2

which leaves us to integrate this:


4x − 1

dx = ???
x2 + x − 2

P (x)
Goal: we want to figure out a systematic way to split into simpler pieces.
Q(x)
First, we factor the denominator Q(x).

4x − 1 4x − 1 A B
= = +
x2 + x − 2 (x − 1)(x + 2) x−1 x+2

There’s a slow way to find A and B. You can clear the denominator by multiplying through by
(x − 1)(x + 2):
(4x − 1) = A(x + 2) + B(x − 1)
From this, you find
4=A+B and − 1 = 2A − B
You can then solve these simultaneous linear equations for A and B. This approach can take a very
long time if you’re working with 3, 4, or more variables.

There’s a faster way, which we call the “cover-up method”. Multiply both sides by (x − 1):

4x − 1 B
=A+ (x − 1)
x+2 x+2
Set x = 1 to make the B term drop out:
4−1
=A
1+2
A=1

1
Lecture 29 18.01 Fall 2006

The fastest way is to do this in your head or physically cover up the struck-through terms. For
instance, to evaluate B:
4x − 1 A� B
= � +
(x − 1)�
(x�+�
2) �
� x−1 � (x�
+� 2)

Implicitly, we are multiplying by (x + 2) and setting x = −2. This gives us

4(−2) − 1
=B =⇒ B=3
−2 − 1

What we’ve described so far works when Q(x) factors completely into distinct factors and the
degree of P is less than the degree of Q.

If the factors of Q repeat, we use a slightly different approach. For example:

x2 + 2 A B C
2
= + 2
+
(x − 1) (x + 2) x − 1 (x − 1) x+2

Use the cover-up method on the highest degree term in (x − 1).

x2 + 1 2 12 + 2
= B + [stuff](x − 1) =⇒ =B =⇒ B=1
x+2 1+2
Implicitly, we multiplied by (x − 1)2 , then took the limit as x → 1.
C can also be evaluated by the cover-up method. Set x = −2 to get
2
x2 + 2 (−2)2 + 2 2
= C + [stuff](x + 2) =⇒ =C =⇒ C=
(x − 1) (−2 − 1)2 3
This yields
x2 + 2 A 1 2/3
2
= + 2
+
(x − 1) (x + 2) x − 1 (x − 1) x+2
Cover-up can’t be used to evaluate A. Instead, plug in an easy value of x: x = 0.
2 A 1 1 1
2
= +1+ =⇒ 1 = 1 + − A =⇒ A =
(−1) (2) −1 3 3 3
Now we have a complete answer:

x2 + 2 1 1 2
= + +
(x − 1)2 (x + 2) 3(x − 1) (x − 1)2 3(x + 2)

Not all polynomials factor completely (without resorting to using complex numbers). For exam­
ple:
1 A1 B1 x + C1
2
= +
(x + 1)(x − 1) x−1 x2 + 1
We find A1 , as usual, by the cover-up method.
1 1
= A1 =⇒ A1 =
12 +1 2

2
Lecture 29 18.01 Fall 2006

Now, we have
1 1/2 B1 x + C1
= +
(x2 + 1)(x − 1) x−1 x2 + 1
Plug in x = 0.
1 1 C1 1
=− + =⇒ C1 = −
1(−1) 2 1 2
Now, plug in any value other than x = 0, 1. For example, let’s use x = −1.

1 1/2 B1 (−1) − 1/2 B1 − 1/2 1


= + =⇒ 0 = − =⇒ B1 = −
2(−2) −2 2 2 2

Alternatively, you can multiply out to clear the denominators (not done here).
Let’s try to integrate this function, now.
� � � �
dx 1 dx 1 x dx 1 dx
2
= − 2
− 2
(x + 1)(x − 1) 2 x−1 2 x +1 2 x +1
1 1 1
= ln |x − 1| − ln | x2 + 1 | − tan−1 x + c
2 4 2

What if we’re faced with something that looks like this?



dx
(x − 1)10

This is actually quite simple to integrate:



dx 1
= − (x − 1)−9 + c
(x − 1)10 9

What about this? �


dx
(x2 + 1)10
Here, we would use trig substitution:

x = tan u and dx = sec2 udu

and the trig identity


tan2 u + 1 = sec2 u
to get
sec2 u du
� �
= cos18 u du
(sec2 u)10
From here, we can evaluate this integral using the methods we introduced two lectures ago.

3
Lecture 30 18.01 Fall 2006

Lecture 30: Integration by Parts, Reduction


Formulae

Integration by Parts
Remember the product rule:
(uv)� = u� v + uv �
We can rewrite that as
uv � = (uv)� − u� v
Integrate this to get the formula for integration by parts:
� �
uv dx = uv − u� v dx


Example 1. tan−1 x dx.
At first, it’s not clear how integration by parts helps. Write
� � �
tan−1 x dx = tan−1 x(1 · dx) = uv � dx

with
u = tan−1 x and v � = 1.
Therefore,
1
v = x and u� =
1 + x2
Plug all of these into the formula for integration by parts to get:
� � �
1
tan−1 x dx = uv � dx = (tan−1 x)x − (x)dx
1 + x2
1
= x tan−1 x − ln |1 + x2 | + c
2

Alternative Approach to Integration by Parts

As above, the product rule:


(uv)� = u� v + uv �
can be rewritten as
uv � = (uv)� − u� v
This time, let’s take the definite integral:
� b � b � b
� �
uv dx = (uv) dx − u� v dx
a a a

1
Lecture 30 18.01 Fall 2006

By the fundamental theorem of calculus, we can say


� b �b � b
uv � dx = uv� − u� v dx

a a a

Another notation in the indefinite case is


� �
u dv = uv − v du

This is the same because

dv = v � dx =⇒ uv � dx = u dv and du = u� dx =⇒ u� v dx = vu� dx = v du

Example 2. (ln x)dx
1
u = ln x; du = dx and dv = dx; v = x
x
� � � � �
1
(ln x)dx = x ln x − x dx = x ln x − dx = x ln x − x + c
x

We can also use “advanced guessing” to solve this problem. We know that the derivative of
something equals ln x:
d
(??) = ln x
dx
Let’s try
d 1
(x ln x) = ln x + x · = ln x + 1
dx x
That’s almost it, but not quite. Let’s repair this guess to get:
d
(x ln x − x) = ln x + 1 − 1 = ln x
dx

Reduction Formulas (Recurrence Formulas)



n
Example 3. (ln x) dx
Let’s try: � �
1
u = (ln x)n =⇒ u� = n(ln x)n−1
x
v � = dx; v = x
Plugging these into the formula for integration by parts gives us:

� � � � 1
n n n−1 1�

(ln x) dx = x(ln x) − n(ln x) x � dx
� x
Keep repeating integration by parts to get the full formula: n → (n − 1) → (n − 2) → (n − 3) → etc

Example 4. xn ex dx Let’s try:

u = xn =⇒ u� = nxn−1 ; v � = ex =⇒ v = ex

2
Lecture 30 18.01 Fall 2006

Putting these into the integration by parts formula gives us:


� �
xn ex dx = xn ex − nxn−1 ex dx

Repeat, going from n → (n − 1) → (n − 2) → etc.

Bad news: If you change the integrals just a little bit, they become impossible to evaluate:

� −1 �2
tan x dx = impossible

ex

dx = also impossible
x

Good news: When you can’t evaluate an integral, then


� 2 x
e
dx
1 x

is an answer, not a question. This is the solution– you don’t have to integrate it!
The most important thing is setting up the integral! (Once you’ve done that, you can always
evaluate it numerically on a computer.) So, why bother to evaluate integrals by hand, then? Because
you often get families of related integrals, such as
� ∞ x
e
F (a) = a
dx
1 x

where you want to find how the answer depends on, say, a.

3
Lecture 30 18.01 Fall 2006

Arc Length
This is very useful to know for 18.02 (multi-variable calculus).

ds
y=f(x) dy
dx

Figure 1: Infinitesimal Arc Length ds

ds
dy

dx

Figure 2: Zoom in on Figure 1 to see an approximate right triangle.

In Figures 1 and 2, s denotes arc length and ds = the infinitesmal of arc length.

2

ds = (dx)2 + (dy)2 = 1 + (dy/dx) dx

Integrating with respect to ds finds the length of a curve between two points (see Figure 3).
To find the length of the curve between P0 and P1 , evaluate:
� P1
ds
P0

4
Lecture 30 18.01 Fall 2006

P₁

P₀

a b

Figure 3: Find length of curve between P0 and P1 .

We want to integrate with respect to x, not s, so we do the same algebra as above to find ds in
terms of dx. � �2
(ds)2 (dx)2 (dy)2 dy
= + =1+
(dx)2 (dx)2 (dx)2 dx
Therefore, �
� P1 � b � �2
dy
ds = 1+ dx
P0 a dx

Example 5: The Circle. x2 + y 2 = 1 (see Figure 4).

Figure 4: The circle in Example 1.

5
Lecture 30 18.01 Fall 2006

We want to find the length of the arc in Figure 5:

Figure 5: Arc length to be evaluated.


y= 1 − x2
� �
dy −2x 1 −x
=√ =√
dx 1−x 2 2 1 − x2
� � �2
−x
ds = 1 + √ dx
1 − x2
�2
x2 1 − x2 + x2

−x 1
1+ √ =1+ 2
= 2
=
1−x 2 1−x 1−x 1 − x2

1
ds = dx
1 − x2
� a ⏐a
dx
s= √ = sin−1 x⏐ = sin−1 a − sin−1 0 = sin−1 a

1−x 2 0
0
sin s = a
This is illustrated in Figure 6.

6
Lecture 30 18.01 Fall 2006

s
a

a
1

Figure 6: s = angle in radians.

Parametric Equations
Example 6.
x = a cos t
y = a sin t
Ask yourself: what’s constant? What’s varying? Here, t is variable and a is constant.
Is there a relationship between x and y? Yes:

x2 + y 2 = a2 cos2 t + a2 sin2 t = a2

Extra information (besides the circle):


At t = 0,
x = a cos 0 = a and y = a sin 0 = 0
π
At t = ,
2
π π
x = a cos = 0 and y = a sin = a
2 2
Thus, for 0 ≤ t ≤ π/2, a quarter circle is traced counter-clockwise (Figure 7).

7
Lecture 30 18.01 Fall 2006

t=π/2
(0,a)

(a,0)
t=0

Figure 7: Example 6. x = a cos t, y = a sin t; the particle is moving counterclockwise.

Example 7: The Ellipse See Figure 8.


x = 2 sin t; y = cos t
2
x
+ y 2 = 1( =⇒ (2 sin t)2 /4 + (cos t)2 = sin2 t + cos2 t = 1)
4

t=0
(0,1)

(2,0)
t=π/2

Figure 8: Ellipse: x = 2 sin t, y = cos t (traced clockwise).

Arclength ds for Example 6.


dx = −a sin t dt, dy = a cos t dt
� � �
ds = (dx)2 + (dy)2 = (−a sin t dt)2 + (a cos t dt)2 = (a sin t)2 + (a cos t)2 dt = a dt

8
Lecture 31 18.01 Fall 2006

Lecture 31: Parametric Equations, Arclength,


Surface Area

Arclength, continued
Example 1. Consider this parametric equation:

x = t2 y = t3 for 0 ≤ t ≤ 1

x3 = (t2 )3 = t6 ; y 2 = (t3 )2 = t6 =⇒ x3 = y 2 =⇒ y = x2/3 0≤x≤1

ds
dy
ds
dy
dx
dx

Figure 1: Infinitesimal Arclength.

(ds)2 = (dx)2 + (dy)2


(ds)2 = (2t dt)2 + (3t2 dt)2 = (4t2 + 9t4 )(dt)2
� �� � � �� �
(dx)2 (dy)2
� t=1 � 1� � 1 �
Length = ds = 2 4
4t + 9t dt = t 4 + 9t2 dt
t=0 0 0
2 3/2 �1
(4 + 9t ) � 1
= � = (133/2 − 43/2 )
27 0 27
Even if you can’t evaluate the integral analytically, you can always use numerical methods.

1
Lecture 31 18.01 Fall 2006

Surface Area (surfaces of revolution)

ds

x
a b

Figure 2: Calculating surface area

ds (the infinitesimal curve length in Figure 2) is revolved a distance 2πy. The surface area of the
thin strip of width ds is 2πy ds.

Example 2. Revolve Example 1 (x = t2 , y = t3 , 0 ≤ t ≤ 1) around the x-axis. Refer to Figure 3.

Figure 3: Curved surface of a trumpet.

2
Lecture 31 18.01 Fall 2006

� 1 � � 1 �
t3

2π t 4 + 9t2 dt
Area = 2πy ds = 0
���� � �� � = 2π t4 4 + 9t2 dt
y ds 0

Now, we discuss the method used to evaluate



t4 (4 + 9t2 )1/2 dt

We’re going to ignore the factor of 2π. You can reinsert it once you’re done evaluating the integral.
We use the trigonometric substitution
2 2
t= tan u; dt = sec2 u du; tan2 u + 1 = sec2 u
3 3
Putting all of this together gives us:
� � � �4 � � ��1/2 � �
2 4 2
t4 (4 + 9t2 )1/2 dt = tan u 4+9 tan2 u sec2 u du
3 9 3
� �5 �
2
= tan4 u(2 sec u)(sec2 u du)
3
This is a tan − sec integral. It’s doable, but it will take a long time for you to work the whole thing
out. We’re going to stop evaluating it here.

Example 3 Let’s use what we’ve learned to find the surface area of the unit sphere (see Figure 4).

y
rotate the curve
by 2π radians

a . . b x

Figure 4: Slice of spherical surface (orange peel, only, not the insides).

3
Lecture 31 18.01 Fall 2006

For the top half of the sphere, �


y= 1 − x2
We want to find the area of the spherical slice between x = a and x = b. A spherical slice has area
� x=b
A= 2πy ds
x=a

From last time,


dx
ds = √
1 − x2
Plugging that in yields a remarkably simple formula for A:
� b � b
� dx
A= 2π 1 − x2 √ = 2π dx
a 1 − x2 a

= 2π(b − a)

Special Cases

For a whole sphere, a = −1, and b = 1.

2π(1 − (−1)) = 4π

is the surface area of a unit sphere.


For a half sphere, a = 0 and b = 1.

2π(1 − 0) = 2π

4
Lecture 32 18.01 Fall 2006

Lecture 32: Polar Co-ordinates, Area in Polar


Co-ordinates

Polar Coordinates

r
θ

Figure 1: Polar Co-ordinates.

In polar coordinates, we specify an object’s position in terms of its distance r from the origin
and the angle θ that the ray from the origin to the point makes with respect to the x-axis.
Example 1. What are the polar coordinates for the point specified by (1, −1) in rectangular
coordinates?

r
(1,-1)

Figure 2: Rectangular Co-ordinates to Polar Co-ordinates.

� √
r = 12 + (−1)2 = 2
π
θ = −
4

In most cases, we use the convention that r ≥ 0 and 0 ≤ θ ≤ 2π. But another common convention
is to say r ≥ 0 and −π ≤ θ ≤ π. All values of θ and even negative values of r can be used.

1
Lecture 32 18.01 Fall 2006

r
y
θ
x

Figure 3: Rectangular Co-ordinates to Polar Co-ordinates.

Regardless of whether we allow positive or negative values of r or θ, what is always true is:

x = r cos θ and y = r sin θ

√ 3π
For instance, x = 1, y = −1 can be represented by r = − 2, θ = :
4
√ 3π √ 3π
1 = x = − 2 cos and − 1 = y = − 2 sin
4 4

Example 2. Consider a circle of radius a with its center at x = a, y = 0. We want to find an


equation that relates r to θ.

(a,0)

Figure 4: Circle of radius a with center at x = a, y = 0.

2
Lecture 32 18.01 Fall 2006

We know the equation for the circle in rectangular coordinates is

(x − a)2 + y 2 = a2

Start by plugging in:


x = r cos θ and y = r sin θ
This gives us
(r cos θ − a)2 + (r sin θ)2 = a2
r2 cos2 θ − 2arcosθ + a2 + r2 sin2 θ = a2
r2 − 2ar cos θ = 0
r = 2a cos θ
π π
The range of 0 ≤ θ ≤ traces out the top half of the circle, while − ≤ θ ≤ 0 traces out the bottom
2 2
half. Let’s graph this.

y
θ = π/4

r
θ
x
(a,0) θ=0

Figure 5: r = 2a cos θ, −π/2 ≤ θ ≤ π/2.

At θ = 0, r = 2a =⇒ x = 2a, y = 0
π π √
At θ = , r = 2a cos = a 2
4 4

−π π
The main issue is finding the range of θ tracing the circle once. In this case, <θ< .
2 2
π
θ = − (down)
2
π
θ = (up)
2

π 3π
Weird range (avoid this one): <θ< . When θ = π, r = 2a cos π = 2a(−1) = −2a. The
2 2
π 3π
radius points “backwards”. In the range < θ < , the same circle is traced out a second time.
2 2

3
Lecture 32 18.01 Fall 2006

r=f(θ)

Figure 6: Using polar co-ordinates to find area of a generic function.

Area in Polar Coordinates


Since radius is a function of angle (r = f (θ)), we will integrate with respect to θ. The question
is: what, exactly, should we integrate?
� θ2
?? dθ
θ1
Let’s look at a very small slice of this region:

rdθ


r

Figure 7: Approximate slice of area in polar coordinates.

This infinitesimal slice is approximately a right triangle. To find its area, we take:
1 1
Area of slice ≈ (base) (height) = r(r dθ)
2 2
So,
� θ2
1 2
Total Area = r dθ
θ1 2

4
Lecture 32 18.01 Fall 2006

π π
Example 3. r = 2a cos θ, and − < θ < (the circle in Figure 5).
2 2
� π/2 � π/2
1
A = area = (2a cos θ)2 dθ = 2a2 cos2 θ dθ
−π/2 2 −π/2

1 1
Because cos2 θ = + cos 2θ, we can rewrite this as
2 2
� π/2 � π/2 � π/2
A = area = (1 + cos 2θ) dθ = a2 dθ + a2 cos 2θ dθ
−π/2 −π/2 −π/2

�π/2 0
1 1 ���
= πa2 + sin 2θ� = πa2 + [sin π − sin(−π)]
� � �
2 2��

−π/2

A = area = πa2

Example 4: Circle centered at the Origin.

r=a

Figure 8: Example 4: Circle centered at the origin

x = r cos θ; y = r sin θ
x + y 2 = r2 cos2 θ + r2 sin2 θ = r2
2

The circle is x2 + y 2 = a2 , so r = a and

x = a cos θ; y = a sin θ
� 2π
1 2 1
A= a dθ = a2 · 2π = πa2 .
0 2 2

5
Lecture 32 18.01 Fall 2006

Example 5: A Ray. In this case, θ = b.

θ=b

Figure 9: Example 5: The ray θ = b, 0 ≤ r < ∞.

The range of r is 0 ≤ r < ∞; x = r cos b; y = r sin b.

Example 6: Finding the Polar Formula, based on the Cartesian Formula

1
1/sin θ

θ
x

Figure 10: Example 6: Cartesian Form to Polar Form

Consider, in cartesian coordinates, the line y = 1. To find the polar coordinate equation, plug
in y = r sin θ and x = r cos θ and solve for r.
1
r sin θ = 1 =⇒ r = with 0<θ<π
sin θ

6
Lecture 32 18.01 Fall 2006

Example 7: Going back to (x, y) coordinates from r = f (θ).


Start with
1
r= 1 .
1 + 2 sin θ
Hence,
r
r+ sin θ = 1
2

Plug in r = x2 + y 2 :
� y
x2 + y 2 + =1
2
� y � y �2 y2
x2 + y 2 = 1 − =⇒ x2 + y 2 = 1 − =1−y+
2 2 4
Finally,
3y 2
x2 +
+y =1
4
This is an equation for an ellipse, with the origin at one focus.
Useful conversion formulas:
� �y�
r= x2 + y 2 and θ = tan−1
x

Example 8: A Rose r = cos(2θ)


The graph looks a bit like a flower:

r<0 π/4

r>0
r>0 1

r<0 -π/4

Figure 11: Example 8: Rose

For the first “petal”


π π
− <θ<
4 4
Note: Next lecture is Lecture 34 as Lecture 33 is Exam 4.

7
Lecture 32: Exam 4 Review 18.01 Fall 2006

Exam 4 Review

1. Trig substitution and trig integrals.

2. Partial fractions.
3. Integration by parts.
4. Arc length and surface area of revolution
5. Polar coordinates

6. Area in polar coordinates.

Questions from the Students


• Q: What do we need to know about parametric equations?
• A: Just keep this formula in mind:
�� �2 � �2
dx dy
ds = +
dt dt

Example: You’re given


x(t) = t4
and
y(t) = 1 + t
Find s (length). �
ds = (4t3 )2 + (1)2 dt
Then, integrate with respect to t.

• Q: Can you quickly review how to do partial fractions?

• A: When finding partial fractions, first check whether the degree of the numerator is greater
than or equal to the degree of the denominator. If so, you first need to do algebraic long-
division. If not, then you can split into partial fractions.
Example.
x2 + x + 1
(x − 1)2 (x + 2)
We already know the form of the solution:

x2 + x + 1 A B C
= + +
(x − 1)2 (x + 2) x − 1 (x − 1)2 x+2

There are two coefficients that are easy to find: B and C. We can find these by the cover-up
method.
12 + 1 + 1 3
B= = (x → 1)
1+2 3

1
Lecture 32: Exam 4 Review 18.01 Fall 2006

To find C,
(−2)2 − 2 + 1 1
C= = (x → −2)
(−2 − 1)2 3
To find A, one method is to plug in the easiest value of x other than the ones we already used
(x = 1, −2). Usually, we use x = 0.

1 A 1 1/3
= + +
(−1)2 (2) −1 (−1)2 2

and then solve to find A.

The Review Sheet handed out during lecture follows on the next page.

2
Lecture 32: Exam 4 Review 18.01 Fall 2006

Exam 4 Review Handout


1. Integrate by trigonometric substitution; evaluate the trigonometric integral and work
backwards to the original variable by evaluating trig(trig−1 ) using a right triangle:
a) a2 − x2 use x = a sin u, dx = a cos u du.
b) a2 + x2 use x = a tan u, dx = a sec2 u du
c) x2 − a2 use x = a sec u, dx = a sec u tan u du
2. Integrate rational functions P/Q (ratio of polynomials) by the method of partial fractions:
If the degree of P is less than the degree of Q, then factor Q completely into linear and quadratic
factors, and write P/Q as a sum of simpler terms. For example,

3x2 + 1 A B1 B2 Cx + D
2 2
= + + 2
+ 2
(x − 1)(x + 2) (x + 9) x − 1 (x + 2) (x + 2) x +9

Terms such as D/(x2 + 9) can be integrated using the trigonometric substitution x = 3 tan u.
This method can be used to evaluate the integral of any rational function. In practice, the
hard part turns out to be factoring the denominator! In recitation you encountered two other steps
required to cover every case systematically, namely, completing the square1 and long division.2
3. Integration by parts:
�b �
� b � b

uv dx = uv � − u� vdx

a � a
a

This is used when u v is simpler than uv � . (This is often the case if u� is simpler than u.)


4. Arclength: ds = dx2 + dy 2 . Depending on whether you want to integrate with respect to
x, t or y this is written
� � �
ds = 1 + (dy/dx)2 dx; ds = (dx/dt)2 + (dy/dt)2 dt; ds = (dx/dy)2 + 1 dy

5. Surface area for a surface of revolution:



a) around the x-axis: 2πyds = 2πy 1 + (dy/dx)2 dx (requires a formula for y = y(x))

b) around the y-axis: 2πxds = 2πx (dx/dy)2 + 1 dy (requires a formula for x = x(y))

6. Polar coordinates: x = r cos θ, y = r sin θ (or, more rarely, r = x2 + y 2 , θ = tan−1 (y/x))
a) Find the polar equation for a curve from its equation in (x, y) variables by substitution.
b) Sketch curves given in polar coordinates and understand the range of the variable θ (often
in preparation for integration).
7. Area in polar coordinates:
� θ2
1 2
r dθ
θ1 2
(Pay attention to the range of θ to be sure that you are not double-counting regions or missing
them.)
1 For example, we rewrite the denominator x2 + 4x + 13 = (x + 2)2 + 9 = u2 + a2 with u = x + 2 and a = 3.
2 Long division is used when the degree of P is greater than or equal to the degree of Q. It expresses P (x)/Q(x) =
P1 (x) + R(x)/Q(x) with P1 a quotient polynomial (easy to integrate) and R a remainder. The key point is that the
remainder R has degree less than Q, so R/Q can be split into partial fractions.

3
Lecture 32: Exam 4 Review 18.01 Fall 2006

The following formulas will be printed with Exam 4

sin2 x + cos2 x = 1; sec2 x = tan2 x + 1


1 1 1 1
sin2 x = − cos 2x; cos2 x = + cos 2x
2 2 2 2
cos 2x = cos2 x − sin2 x; sin 2x = 2 sin x cos x

d d d 1 d 1
tan x = sec2 x; sec x = sec x tan x; tan−1 x = ; sin−1 x = √
dx dx dx 1 + x2 dx 1 − x2
� �
tan x dx = − ln(cos x) + c; sec x dx = ln(sec x + tan x) + c

See the next page for a review on integration of rational functions.

4
Lecture 32: Exam 4 Review 18.01 Fall 2006

Postscript: Systematic integration of rational functions


For a general rational function P/Q, the first step is to express P/Q as the sum of a polynomial
and a ratio in which the numerator has smaller degree than the denominator.
For example,
x3 3x − 2
=x+2+ 2
x2 − 2x + 1 x − 2x + 1
(To carry out this long division, do not factor the denominator Q(x) = x2 − 2x + 1, just leave it
alone.) The quotient x + 2 is a polynomial and is easy to integrate. The remainder term
3x − 2
(x − 1)2
has a numerator 3x − 2 of degree 1 which is less than the degree 2 of the denominator (x − 1)2 .
Therefore there is a partial fraction decomposition. In fact,
3x − 2 (3x − 3) + 1 3 1
= = +
(x − 1)2 (x − 1)2 x − 1 (x − 1)2
In general, if P has degree n and Q has degree m, then long division gives
P (x) R(x)
= P1 (x) +
Q(x) Q(x)
in which P1 , the quotient in the long division, has degree n − m and R, the remainder in the long
division, has degree at most m − 1.
Evaluation of the “simple” pieces
The integral
−1

dx
= (x − a)1−n + c
(x − a)n n−1
� 1 and ln |x − a| + c if n = 1. On the other hand the terms
if n =
� �
xdx dx
and
(Ax2 + Bx + C)n (Ax2 + Bx + C)n
are handled by first completing the square:
B2
� �
2 2
Ax + Bx + C = A(x − B/2A) + C −
4A

Using the variable u = A(x − B/2A) yields combinations of integrals of the form
� �
udu du
2 2 n
and
(u + k ) (u + k 2 )n
2

The first integral is handled by the substitution w = u2 + k 2 , dw = 2udu. The second integral can
be worked out using the trigonometric substitution u = k tan θ du = k sec2 θdθ. This then leads to
sec-tan integrals, and the actual computation for large values of n are long.
There are also other cases that we will not cover systematically. Examples are below:
1. If Q(x) = (x − a)m (x − b)n , then the expression is
A1 A2 Am B1 B2 Bn
+ + ··· + + + + ··· +
x − a (x − a)2 (x − a)m x − b (x − b)2 (x − b)n

5
Lecture 32: Exam 4 Review 18.01 Fall 2006

2. If there are quadratic factors like (Ax2 + Bx + C)p , one gets terms

a1 x + b1 a2 x + b2 x ap x + bp
+ + ··· +
Ax2 + Bx + C 2
(Ax + Bx + C) 2 (Ax + Bx + C)p
2

for each such factor. (To integrate these quadratic pieces complete the square and make a
trigonometric substitution.)

6
Lecture 34 18.01 Fall 2006

Lecture 34: Indeterminate Forms - L’Hôpital’s Rule

L’Hôpital’s Rule
(Two correct spellings: “L’Hôpital” and “L’Hospital”)
Sometimes, we run into indeterminate forms. These are things like
0
0
and


For instance, how do you deal with the following?

x3 − 1 0
lim 2
= ??
x→ 1 x − 1 0

Example 0. One way of dealing with this is to use algebra to simplify things:

x3 − 1 (x − 1)(x2 + x + 1) x2 + x + 1 3
lim 2
= lim = lim =
x→1 x − 1 x→1 (x − 1)(x + 1) x→1 x+1 2

In general, when f (a) = g(a) = 0,

f (x) f (x) − f (a)


f (x) lim f � (a)
= lim x − a = x−a
x→a
lim = �
x→a g(x) x→a g(x) g(x) − g(a) g (a)
lim
x−a x→a x−a
This is the easy version of L’Hôpital’s rule:

f (x) f � (a)
lim = �
x→a g(x) g (a)

Note: this only works when g � (a) =


� 0!
In example 0,
f (x) = x3 = 1; g(x) = x2 − 1
f � (x) = 3x2 ; g � (x) = 2x =⇒ f � (1) = 3; g � (1) = 2
The limit is f � (1)/g � (1) = 3/2. Now, let’s go on to the full L’Hôpital rule.

1
Lecture 34 18.01 Fall 2006

Example 1. Apply L’Hôpital’s rule (a.k.a. “L’Hop”) to

x15 − 1
lim
x→ 1 x3 − 1

to get
x15 − 1 15x14 15
lim3
= lim 2
= =5
x→1 x − 1 x→1 3x 3
Let’s compare this with the answer we’d get if we used linear approximation techniques, instead of
L’Hôpital’s rule:
x15 − 1 ≈ 15(x − 1)
(Here, f (x) = x15 − 1, a = 1, f (a) = b = 0, m = f � (1) = 15, and f (x) ≈ m(x − a) + b.)
Similarly,
x3 − 1 ≈ 3(x − 1)
Therefore,
x15 − 1 15(x − 1)
≈ =5
x3 − 1 3(x − 1)

Example 2. Apply L’Hop to


sin 3x
lim
x→ 0 x
to get
3 cos 3x
lim =3
x→ 0 1
This is the same as
d � �
sin(3x) � = 3 cos(3x) � =3
� �
dx x=0 x=0

Example 3.
sin x − cos x cos x + sin x 1 1 √
limπ π = limπ =√ +√ = 2
x→ 4 x− 4 x→ 4 1 2 2
f (x) = sin x − cos x, f � (x) = cos x + sin x
�π� √
f� = 2
4

Δy 0
Remark: Derivatives lim are always a type of limit.
Δx→0 Δx 0

cos x − 1
Example 4. lim .
x→ 0 x
Use L’Hôpital’s rule to evaluate the limit:
cos x − 1 − sin x
lim = lim =0
x→ 0 x x→0 x

2
Lecture 34 18.01 Fall 2006

cos x − 1
Example 5. lim .
x→ 0 x2
cos x − 1 cos x − 1 − sin x − cos x 1
lim = lim = lim = lim =−
x→0 x2 x→0 x2 x→0 2x x→0 2 2
Just to check, let’s compare that answer to the one we would get if we used quadratic approximation
techniques. Remember that:
1
cos x ≈ 1 − x2 (x ≈ 0)
2
1 2 1
cos x − 1 1− x −1 (− )x2 1
≈ 2 = 2 =−
x2 x2 x2 2

sin x
Example 6. lim .
x→ 0 x2
sin x cos x
lim = lim By L’Hôpital’s rule
x2
x→0 x→0 2x

If we apply L’Hôpital again, we get


sin x
lim − =0
x→0 2
But this doesn’t agree with what we get from taking the linear approximation:
sin x x 1
≈ 2 = → ∞ as x → 0+
x2 x x
We can clear up this seeming paradox by noting that
cos x 1
lim =
x→0 2x 0
0
The limit is not of the form , which means L’Hôpital’s rule cannot be used. The point is: look
0
before you L’Hôp!

More “interesting” cases that work.



It is also okay to use L’Hôpital’s rule on limits of the form , or if x → ∞, or x → −∞. Let’s

apply this to rates of growth. Which function goes to ∞ faster: x, eax , or ln x?

Example 7. For a > 0,


eax aeax
lim = lim = +∞
x→∞ x x→∞ 1

So eax grows faster than x (for a > 0).

Example 8.

eax aeax c2 eax a10 eax


lim 10
= by L’Hôpital = lim 9
= lim 8
= · · · = lim =∞
x→∞ x x→∞ 10x x→∞ 10 · 9x x→∞ 10!

3
Lecture 34 18.01 Fall 2006

You can apply L’Hôpital’s rule ten times. There’s a better way, though:
�1/10
eax eax/10

=
x10 x
�10
eax eax/10

lim = lim = ∞10 = ∞
x→∞ x10 x→∞ x

Example 9.
ln x 1/x
lim = lim = lim 3x−1/3 = 0
x→∞ x1/3 x→∞ 1/3x−2/3 x→∞

Combining the preceding examples, ln x � x1/3 � x � x10 � eax (x → ∞, a > 0)


0 ∞
L’Hôpital’s rule applies to and . But, we sometimes face other indeterminate limits, such
0 ∞
∞ 0
as 1 , 0 , and 0 · ∞. Use algebra, exponentials, and logarithms to put these in L’Hôpital form.

Example 10. lim xx for x > 0.


x→ 0
Because the exponent is a variable, use base e:

lim xx = lim ex ln x
x→ 0 x→ 0

First, we need to evaluate the limit of the exponent

lim x ln x
x→0

0 ∞
This limit has the form 0 · ∞. We want to put it in the form or .
0 ∞
0
Let’s try to put it into the form:
0
x
1/ ln x
1
We don’t know how to find lim , though, so that approach isn’t helpful.
x→0ln x

Instead, let’s try to put it into the form:

ln x
1/x

Using L’Hôpital’s rule, we find

ln x 1/x
lim x ln x = lim = lim = lim (−x) = 0
x→ 0 x→0 1/x x→0 −1/x2 x→0

Therefore,
lim (x ln x)
lim xx = lim ex ln x = e x→0 = e0 = 1
x→ 0 x→ 0

4
Lecture 35 18.01 Fall 2006

Lecture 35: Improper Integrals

Definition.
An improper integral, defined by
� ∞ � M
f (x)dx = lim f (x)dx
a M →∞ a

is said to converge if the limit exists (diverges if the limit does not exist).
� ∞
Example 1. e−kx dx = 1/k (k > 0)
0
�M
� M �
e−kx dx = (−1/k)e−kx � = (1/k)(1 − e−kM )

0 �
0

Taking the limit as M → ∞, we find e−kM → 0 and


� ∞
e−kx dx = 1/k
0

We rewrite this calculation more informally as follows,


� ∞ �∞
e−kx dx = (−1/k)e−kx �� = (1/k)(1 − e−k∞ ) = 1/k

(since k > 0)
0 0
� ∞
Note that the integral over the infinite interval e−kx dx = 1/k has an easier formula than the
� M 0

corresponding finite integral e−kx dx = (1/k)(1 − e−kM ). As a practical matter, for large M , the
0
term e−kM is negligible, so even the simpler formula 1/k serves as a good approximation to the finite
integral. Infinite integrals are often easier than finite ones, just as infinitesimals and derivatives are
easier than difference quotients.
Application: Replace x by t = time in seconds in Example 1.
R = rate of decay = number of atoms that decay per second at time 0.
At later times t > 0 the decay rate is Re−kt (smaller by an exponential factor e−kt )

Eventually (over time 0 ≤ t < ∞) every atom decays. So the total number of atoms N is
calculated using the formula we found in Example 1,
� ∞
N= Re−kt dt = R/k
0

The half life H of a radioactive element is the time H at which the decay rate is half what it was at
the start. Thus

e−kH = 1/2 =⇒ −kH = ln(1/2) =⇒ k = (ln 2)/H

1
Lecture 35 18.01 Fall 2006

Hence
R = N k = N (ln 2)/H

Let us illustrate with Polonium 210, which has been in the news lately. The half life is 138 days
or
H = (138days)(24hr/day)(602 sec/hr) = (138)(24)(60)2 seconds
Using this value of H, we find that one gram of Polonium 210 emits (1 gram)(6 × 1023 /210
atoms/gram)(ln2)/H = 1.661014 decays/sec ≈ 4500 curies
At 5.3 MeV per decay, Polonium gives off 140 watts of radioactive energy per gram (white hot).
Polonium emits alpha rays, which are blocked by skin but when ingested are 20 times more dangerous
than gamma and X-rays. The lethal dose, when ingested, is about 10−7 grams.
� ∞
Example 2. dx/(1 + x2 ) = π/2.
0
We calculate,
�M
� M
dx �
−1 �
= tan x� = tan−1 M → π/2
0 1 + x2 �
0
−1
as M → ∞. (If θ = tan M then θ → π/2 as M → ∞. See Figures 1 and 2.)

y = tan(x)
x = -π/2

M .
x
θ

x = π/2

Figure 1: Graph of the tangent function, M = tan θ.

2
Lecture 35 18.01 Fall 2006

y = arctan(x)

y= π/2
θ

.
x = tan(y)
M

y = -π/2

Figure 2: Graph of the arctangent function, θ = tan−1 M .

� ∞ √
2
Example 3. e−x dx = π/2
0
Recall that we already computed this improper integral (by computing a volume in two ways, slices
and the method of shells). This shows vividly that a finite integral can be harder to understand
than its infinite counterpart:
� M
2
e−x dx
0
can only evaluated numerically. It has no elementary formula. By contrast, we found an explicit
formula when M = ∞.
� ∞
Example 4. dx/x
1
�M
� M �
dx/x = ln x� = ln M − ln 1 = ln M → ∞

1 �
1

as M → ∞. This improper integral is infinite (called divergent or not convergent).


� ∞
Example 5. dx/xp (p > 1)
1
�M
� M �
dx/xp = (1/(1 − p))x1−p � = (1/(1 − p))(M 1−p − 1) → 1/(p − 1)

1 �
1
as M → ∞ because 1 − p < 0. Thus, this integral is convergent.
� ∞
Example 6. dx/xp (0 < p < 1)
1
This is very similar to the previous example, but diverges
� M �M

dx/x = (1/(1 − p))x � = (1/(1 − p))(M 1−p − 1) → ∞
p 1−p �
1 �
1

as M → ∞ because 1 − p > 0.

3
Lecture 35 18.01 Fall 2006

Determining Divergence and Convergence


To decide whether an integral converges or diverges, don’t need to evaluate. Instead one can compare
it to a simpler integral that can be evaluated.
� ∞
dx
The General Story for powers:
1 xp
From Examples 4, 5 and 6 we know that this diverges (is infinite) for 0 < p ≤ 1 and converges (is
finite) for p > 1.
The comparison of integrals says that a larger function has a larger integral. If we restrict
ourselves to nonnegative functions, then even when the region is unbounded, as in the case of an
improper integral, the area under the graph of the larger function is more than the area under the
graph of the smaller one. Consider 0 ≤ f (x) ≤ g(x) (as in Figure 3)

f(x) g(x)

x =a

Figure 3: The area under f (x) is less than the area under g(x) for a ≤ x < ∞.

� ∞ � ∞
If g(x) dx converges, then so does f (x) dx. (In other words, if the area under g is finite,
a a
then the area under f , being smaller, must also be finite.)
� ∞ � ∞
If f (x) dx diverges, then so does g(x) dx. (In other words, if the area under f is infinite,
a a
then the area under g, being larger, must also be infinite.)
The way comparison is used is by replacing functions by simpler ones whose integrals we can
calculate. You will have to decide whether you want to trap the function from above or below. This
will depend on whether you are demonstrating that the integral is finite or infinite.

4
Lecture 35 18.01 Fall 2006

� ∞
dx
Example 7. √ It is natural to try the comparison
0 x3 + 1
1 1
√ ≤ 3/2
3
x +1 x

But the area under x−3/2 on the interval 0 < x < ∞,


� ∞
dx
x 3/2
0

turns out to be infinite because of the infinite behavior as x → 0. We can rescue this comparison by
excluding an interval near 0.
� ∞ � 1 � ∞
dx dx dx
√ = √ + √
3
x +1 3
x +1 x3 + 1
0 0 1

The integral on 0 < x < 1 is a finite integral and the second integral now works well with comparison,
� ∞ � ∞
dx dx
√ ≤ <∞
1
3
x +1 1 x3/2

because 3/2 > 1.


� ∞
3
Example 8. e−x dx
0
For x ≥ 1, x3 ≥ x, so � ∞ � ∞
−x3
e dx ≤ e−x dx = 1 < ∞
1 1
3
Thus the full integral from 0 ≤ x < ∞ of e−x converges as well. We can ignore the interval
3
0 ≤ x ≤ 1 because it has finite length and e−x does not tend to infinity there.

Limit comparison:

Suppose that 0 ≤ f (x) and lim f (x)/g(x) ≤ 1. Then f (x) ≤ 2g(x) for x ≥ a (some large a).
� ∞ � ∞ x→∞
Hence f (x) dx ≤ 2 g(x) dx.
a a

� ∞
(x + 10) dx
Example 9.
0 x2 + 1
The limiting behavior as x → ∞ is

(x + 10)dx x 1
� 2 =
x2 + 1 x x
� ∞ � ∞
dx (x + 10) dx
Since = ∞, the integral also diverges.
1 x 0 x2 + 1

5
Lecture 35 18.01 Fall 2006

� ∞
Example 10 (from PS8). xn e−x dx
0
This converges. To carry out a convenient comparison requires some experience with growth rates
of functions.
xn << ex not enough. Instead use xn /ex/2 → 0 (true by L’Hop). It follows that

xn << ex/2 =⇒ xn e−x << ex/2 e−x = e−x/2


� ∞
Now by limit comparison, since e−x/2 dx converges, so does our integral. You will deal with this
0
integral on the problem set.

Improper Integrals of the Second Type


� 1
dx

0 x
1
We know that √ → ∞ as x → 0.
x
� 1 � 1
dx
√ = lim x−1/2 dx
0 x a→0+ a
� 1 �1
x−1/2 dx = 2x1/2 � = 2 − 2a1/2

a a

As a → 0, 2a1/2 → 0. So, � 1
x−1/2 dx = 2
0
Similarly, � 1
1
x−p dx =
0 −p + 1
for all p < 1.
1
For p = ,
2
1
� � =2
1
− +1
2
However, for p ≥ 1, the integral diverges.

6
Lecture 36 18.01 Fall 2006

Lecture 36: Infinite Series and Convergence Tests

Infinite Series

Geometric Series

A geometric series looks like


1 + a + a2 + a3 + ... = S
There’s a trick to evaluate this: multiply both sides by a:

a + a2 + a3 + ... = aS

Subtracting,
(1 + a + a2 + a3 + · · · ) − (a + a2 + a3 + · · · ) = S − aS
In other words,
1
1 = S − aS =⇒ 1 = (1 − a)S =⇒ S =
1−a
This only works when |a| < 1, i.e. −1 < a < 1.
a = 1 can’t work:
1 + 1 + 1 + ... = ∞

a = −1 can’t work, either:


1 1
1 − 1 + 1 − 1 + ... =
� =
1 − (−1) 2

Notation

Here is some notation that’s useful for dealing with series or sums. An infinite sum is written:


ak = a0 + a1 + a2 + ...
k=0

The finite sum


n

Sn = ak = a0 + ... + an
k=0

is called the “nth partial sum” of the infinite series.

1
Lecture 36 18.01 Fall 2006

Definition


ak = s
k=0

means the same thing as


n

lim Sn = s, where Sn = ak
n→∞
k=0

We say the series converges to s, if the limit exists and is finite. The importance of convergence is
illustrated here by the example of the geometric series. If a = 1, S = 1 + 1 + 1 + ... = ∞. But

S − aS = 1 or ∞−∞=1

does not make sense and is not usable!

Another type of series:



� 1
n p
n=1

We can use integrals to decide if this type of series converges. First, turn the sum into an integral:
∞ � ∞
� 1 dx
p

n=1
n 1 xp

If that improper integral evaluates to a finite number, the series converges.


Note: This approach only tells us whether or not a series converges. It does not tell us what
number the series converges to. That is a much harder problem. For example, it takes a lot of work
to determine

� 1 π2
=
n=1
n2 6
Mathematicians have only recently been able to determine that

� 1
n3
n=1

converges to an irrational number!

Harmonic Series
∞ � ∞
� 1 dx

n=1
n 1 x
We can evaluate the improper integral via Riemann sums.
We’ll use the upper Riemann sum (see Figure 1) to get an upper bound on the value of the
integral.

2
Lecture 36 18.01 Fall 2006

y=⁄x

½ 1
½ ⅓
1 2 3

Figure 1: Upper Riemann Sum.

� N
dx 1 1
≤ 1 + + ... + = sN −1 ≤ sN
1 x 2 N −1
We know that � N
dx
= ln N
1 x
As N → ∞, ln N → ∞, so sN → ∞ as well. In other words,

� 1
n=1
n

diverges.
Actually, sN approaches ∞ rather slowly. Let’s take the lower Riemann sum (see Figure 2).

y=⁄x

¼
½

1 2 3 4

Figure 2: Lower Riemann Sum.


N � N
1 1 � 1 dx
sN = 1 + + ... + =1+ ≤1+ = 1 + ln N
2 N n=2
n 1 x
Therefore,
ln N < sN < 1 + ln N

3
Lecture 36 18.01 Fall 2006

Integral Comparison
1
Consider a positive, decreasing function f (x) > 0. (For example, f (x) = )
xp
�∞ � ∞ �
�� �
f (n) − f (x)dx� < f (1)
� �


n=1 1 �

So, either both of the terms converge, or they both diverge. This is what we mean when we say
∞ � ∞
� 1 dx
p

n=1
n 1 xp


� 1
Therefore, p
diverges for p ≤ 1 and converges for p > 1.
n=1
n
Lots of fudge room: in comparison.

� 1

2
n + 10
n=1

diverges, because
1 1 1
√ ∼ 2 1/2 =
2
n + 10 (n ) n

Limit comparison: � �
If f (x) ∼ g(x) as x → ∞, then f (n) and g(n) either both converge or both diverge.
What, exactly, does f (x) ∼ g(x) mean? It means that

f (x)
lim =c
x→∞ g(x)

where 0 < c < ∞.


Let’s check: does the following series converge?

� n

5
n − 10
n=1

n n 1
√ ∼ 5/2 = n−3/2 = 3/2
5
n − 10 n n
3
Since > 1, this series does converge.
2

4
Lecture 36 18.01 Fall 2006

Playing with blocks

At this point in the lecture, the professor brings out several long, identical building blocks.
Do you think it’s possible to stack the blocks like this?

Top block is farther out


than the bottom block.

Figure 3: Collective center of mass of upper blocks is always over the base block.

In order for this to work, you want the collective center of mass of the upper blocks always to be
over the base block.
The professor successfully builds the stack.
Is it possible to extend this stack clear across the room?
The best strategy is to build from the top block down.
Let C0 be the left end of the first (top) block.
Let C1 = the center of mass of the first block (top block).
Put the second block as far to the right as possible, namely, so that it’s left end is at C1 (Figure 4).
Let C2 = the center of mass of the top two blocks.
Strategy: put the left end of the next block underneath the center of mass of all the previous ones
combined. (See Figure 5).

5
Lecture 36 18.01 Fall 2006

1/2
1

C0 C1 C2

Figure 4: Stack of 2 Blocks.

3
1/2
1

1/3

C0 C1 C2 C3

Figure 5: Stack of 3 Blocks. Left end of block 3 is C2 = center of mass of blocks 1 and 2.

C0 = 0
C1 = 1
1
C2 = 1 +
2

nCn + 1(Cn + 1) (n + 1)Cn + 1 1


Cn+1 = = = Cn +
n+1 n+1 n+1
1 1
C3 = 1 + +
2 3
1 1 1
C4 = 1 + + +
2 3 4
1 1 1 1
C5 = 1 + + + + > 2
2 3 4 5

6
Lecture 36 18.01 Fall 2006

} n
n+1 block

center of mass of
the first n blocks

Figure 6: Stack of n + 1 Blocks.

So yes, you can extend this stack as far (horizontally) as you want — provided that you have enough
blocks. Another way of looking at this problem is to say
N
� 1
= SN
n=1
n

Recall the Riemann Sum estimation from the beginning of this lecture:
ln N < SN < (ln N ) + 1
as N → ∞, SN → ∞.
How high would this stack of blocks be if we extended it across the two lab tables here at the
front of the lecture hall? The blocks are 30 cm by 3 cm (see Figure 7). One lab table is 6.5 blocks,
or 13 units, long. Two tables are 26 units long. There will be 26 − 2 = 24 units of overhang in the
stack.

3 cm

30 cm

Figure 7: Side view of one block.

If ln N = 24, then N = e24 .


Height = 3 cm · e24 ≈ 8 × 108 m
That height is roughly twice the distance to the moon.
If you want the stack to span this room (∼ 30 ft.), it would have to be 1026 meters high. That’s
about the diameter of the observable universe.

7
Lecture 37 18.01 Fall 2006

Lecture 37: Taylor Series

General Power Series


What is cos x anyway?
Recall: geometric series
1
1 + a + a2 + · · · = for | a |< 1
1−a

General power series is an infinite sum:

f (x) = a0 + a1 x + a2 x2 + a3 x3 + · · ·

represents f when |x| < R where R = radius of convergence. This means that for |x| < R, |an xn | → 0
as n → ∞ (“geometrically”). On the other hand, if |x| > R, then |an xn | does not tend to 0. For
1 1
example, in the case of the geometric series, if |a| = , then |an | = n . Since the higher-order terms
2 2
get increasingly small if |a| < 1, the “tail” of the series is negligible.

Example 1. If a = −1, |an | = 1 does not tend to 0.

1 − 1 + 1 − 1 + ···
The sum bounces back and forth between 0 and 1. Therefore it does not approach 0. Outside the
interval −1 < a < 1, the series diverges.
Basic Tools

Rules of polynomials apply to series within the radius of convergence.

Substitution/Algebra

1
= 1 + x + x2 + · · ·
1−x

Example 2. x = -u.
1
= 1 − u + u2 − u3 + · · ·
1+u

Example 3. x = −v 2 .
1
= 1 − v2 + v4 − v6 + · · ·
1 + v2

1
Lecture 37 18.01 Fall 2006

Example 4.
� �� �
1 1
= (1 + x + x2 + · · · )(1 + x + x2 + · · · )
1−x 1−x
Term-by-term multiplication gives:
1 + 2x + 3x2 + · · ·
1
Remember, here x is some number like . As you take higher and higher powers of x, the result
2
gets smaller and smaller.

Differentiation (term by term)


� �
d 1 d �
1 + x + x2 + x3 + · · ·

=
dx 1 − x dx
1
= 0 + 1 + 2x + 3x2 + · · · where 1 is a0 , 2 is a1 and 3 is a2
(1 − x)2
Same answer as Example 4, but using a new method.

Integration (term by term)


� � a1 a2 �
f (x) dx = c + a0 + x2 + x3 + · · ·
2 3
where
f (x) = a0 + a1 x + a2 x2 + · · ·


du
Example 5.
1+u
� �
1
= 1 − u + u2 − u3 + · · ·
1+u
u2 u3 u4

du
=c+u− + − + ···
1+u 2 3 4
� x
du x2 x3 x4
ln(1 + x) = =x− + +
0 1+u 2 3 4
So now we know the series expansion of ln(1 + x).

Example 6. Integrate Example 3.


1
= 1 − v2 + v4 − v6 + · · ·
1 + v2
v3 v5 v7
� � �
dv
=c+ v− + − + ···
1 + v2 3 5 7
� x
dv x3 x5 x7
tan−1 x = 2
=x− + − + ···
0 1+v 3 5 7

2
Lecture 37 18.01 Fall 2006

Taylor’s Series and Taylor’s Formula


If f (x) = a0 + a1 x + a2 x2 + · · · , we want to figure out what all these coefficients are.
Differentiating,
f � (x) = a1 + 2a2 x + 3a3 x2 + · · ·
f �� (x) = (2)(1)a2 + (3)(2)a3 x + (4)(3)a4 x2 + · · ·
f ��� (x) = (3)(2)(1)a3 + (4)(3)(2)a4 x + · · ·
Let’s plug in x = 0 to all of these equations.

f (0) = a0 ; f � (0) = a1 ; f �� (0) = 2a2 ; f ��� (0) = (3!)a3

Taylor’s Formula tells us what the coefficients are:

f (n) (0) = (n!)an

Remember, n! = n(n − 1)(n − 2) · · · (2)(1) and 0! = 1. Coefficients an are given by:


� �
1
an = f (n) (0)
n!

Example 7. f (x) = ex .

f � (x) = ex
f �� (x) = ex
f (n) (x) = ex
f (n) (0) = e0 = 1
1
Therefore, by Taylor’s Formula an = and
n!
1 1 1 1
ex = + x + x2 + x3 + · · ·
0! 1! 2! 3!
Or in compact form,

� xn
ex =
n=0
n!

Now, we can calculate e to any accuracy:


1 1 1 1
e=1+1+ + + + + ···
2 3! 4! 5!

Example 7. f (x) = cos x.

f � (x) = − sin x
f �� (x) = − cos x

3
Lecture 37 18.01 Fall 2006

f ��� (x) = sin x


f (4) (x) = cos x
f (0) = cos(0) = 1
f � (0) = − sin(0) = 0
f �� (0) = − cos(0) = −1
f ��� (0) = sin(0) = 0
Only even coefficients are non-zero, and their signs alternate. Therefore,

1 1 1 1
cos x = 1 − x2 + x4 − x6 + x8 + · · ·
2 4! 6! 8!

Note: cos(x) is an even function. So is this power series — as it contains only even powers of x.
There are two ways of finding the Taylor Series for sin x. Take derivative of cos x, or use Taylor’s
formula. We will take the derivative:
� �
d 1 4 6 8
− sin x = cos x = 0 − 2 x + x3 − x5 + x7 + · · ·
dx 2 4! 6! 8!

x3 x5 x7
= −x + − + + ···
3! 5! 7!
x3 x5 x7
sin(x) = x − + − + ···
3! 5! 7!

Compare with quadratic approximation from earlier in the term:

1
cos x ≈ 1 − x2 sin x ≈ x
2

We can also write:



� x2k x0 x2 1
cos x = (−1)k = (−1)0 + (−1)2 + · · · = 1 − x2 + · · ·
(2k)! 0! 2! 2
k=0


� x2k+1
sin x = (−1)k ← n = 2k + 1
(2k + 1)!
k=0

Example 8: Binomial Expansion. f (x) = (1 + x)a

a a(a − 1) 2 a(a − 1)(a − 2) 3


(1 + x)a = 1 + x + x + x + ···
1 2! 3!

4
Lecture 37 18.01 Fall 2006

Taylor Series with Another Base Point

A Taylor series with its base point at a (instead of at 0) looks like:

f �� (b) f (3) (b)


f (x) = f (b) + f � (b)(x − b) + (x − b)2 + (x − b)3 + ...
2 3!
√ √
Taylor series for x. It’s a bad idea to expand using b = 0 because x is not differentiable at x = 0.
Instead use b = 1. � �� �
1 1
−1
1 2 2
x1/2 = 1 + (x − 1) + (x − 1)2 + · · ·
2 2!

5
Lecture 38 18.01 Fall 2006

Lecture 38: Final Review

Review: Differentiating and Integrating Series.




If f (x) = an xn , then
n=0

∞ ∞
an xn+1
� � �
� n−1
f (x) = nan x and f (x)dx = C +
n=1 n=0
n+1

Example 1: Normal (or Gaussian) Distribution.


� x � x�
(−t2 )2 (−t2 )3

2
e−t dt = 1 − t2 + + + · · · dt
0 0 2! 3!
� x�
t4 t6 t8

2
= 1 − t + − + − ... dt
0 2! 3! 4!
x3 1 x5 1 x7
=x− + − + ...
3 2! 5 3! 7
� x
2
Even though e−t dt isn’t an elementary function, we can still compute it. Elementary functions
0
are still a little bit better, though. For example:

x3 x5 π π (π/2)3 (π/2)5
sin x = x − + − · · · =⇒ sin = − + − ···
3! 5! 2 2 3! 5!
But to compute sin(π/2) numerically is a waste of time. We know that the sum if something very
simple, namely,
π
sin = 1
2
It’s not obvious from the series expansion that sin x deals with angles. Series are sometimes com­
plicated and unintuitive.
π π
Nevertheless, we can read this formula backwards to find a formula for . Start with sin = 1.
2 2
Then, � 1
dx �1 π π
√ = sin−1 x� = sin−1 1 − sin−1 0 = − 0 =

0 1−x 2 0 2 2
We want to find the series expansion for (1 − x2 )−1/2 , but let’s tackle a simpler case first:
� �� � � �� �� �
1 1 1 1 1
� � − − −1 − − −1 − −2
1 2 2 2 2 2
(1 + u)−1/2 = 1 + − u+ u2 + u3 + · · ·
2 1·2 1·2·3

1 1·3 2 1·3·5 3
=1− u+ u − u + ···
2 2·4 2·4·6
Notice the pattern: odd numbers go on the top, even numbers go on the bottom, and the signs
alternate.

1
Lecture 38 18.01 Fall 2006

Now, let u = −x2 .


1 1·3 4 1·3·5 6
(1 − x2 )−1/2 = 1 + x2 + x + x + ···
2 2·4 2·4·6
1 x3 1 · 3 x5 1 · 3 · 5 x7
� � �
2 −1/2
(1 − x ) dx = C + x + + + + ···
2 3 2·4 5 2·4·6 7
� 1 � � � �� � � �� �
π 1 1 1·3 1 1·3·5 1
= (1 − x2 )−1/2 dx = 1 + + + + ···
2 0 2 3 2·4 5 2·4·6 7

Here’s a hard (optional) extra credit problem: why does this series converge? Hint: use
L’Hôpital’s rule to find out how quickly the terms decrease.

The Final Exam


Here’s another attempt to clarify the concept of weighted averages.
Weighted Average

A weighted average of some function, f , is defined as:


�b
a
w(x)f (x) dx
Average(f ) = �b
a
w(x) dx
� b
Here, w(x) dx is the total, and w(x) is the weighting function.
a

Example: taken from a past problem set.


You get $t if a certain particle decays in t seconds. How much should you pay to play? You were
given that the likelihood that the particle has not decayed (the weighting function) is:

w(x) = e−kt

Remember, � ∞
1
e−kt dt =
0 k
The payoff is
f (t) = t
The expected (or average) payoff is
�∞ � ∞ −kt
0�
f (t)w(t) dt te dt
∞ = �0∞ −kt
0
w(t) dt 0
e dt
� ∞ � ∞
=k te−kt dt = (kt)e−kt dt
0 0
Do the change of variable:
u = kt and du = k dt

2
Lecture 38 18.01 Fall 2006

� ∞
du
Average = ue−u
0 k
� ∞
On a previous problem set, you evaluated this using integration by parts: ue−u du = 1.
0
� ∞
du 1
Average = ue−u =
0 k k

On the problem set, we calculated the half-life (H) for Polonium120 was (131)(24)(60)2 seconds. We
also found that
ln 2
k=
H
Therefore, the expected payoff is
1 H
=
k ln 2
where H is the half-life of the particle in seconds.
Now, you’re all probably wondering: who on earth bets on particle decays?
In truth, no one does. There is, however, a very similar problem that is useful in the real world.
There is something called an annuity, which is basically a retirement pension. You can buy an
annuity, and then get paid a certain amount every month once you retire. Once you die, the annuity
payments stop.
You (and the people paying you) naturally care about how much money you can expect to get
over the course of your retirement. In this case, f (t) = t represents how much money you end up
with, and w(t) = e−kt represents how likely your are to be alive after t years.
What if you want a 2-life annuity? Then, you need multiple integrals, which you will learn about
in multivariable calculus (18.02).
Our first goal in this class was to be able to differentiate anything. In multivariable calculus, you
will learn about another chain rule. That chain rule will unify the (single-variable) chain rule, the
product rule, the quotient rule, and implicit differentiation.
You might say the multivariable chain rule is

One thing to rule them all


One thing to find them
One thing to bring them all
And in a matrix bind them.

(with apologies to JRR Tolkien).

You might also like