Calculus for Scientists and Engineers II: Math 20B at UCSD

William Stein^{1}

March 15, 2006

1I am attending John Eggers lectures, which have a very strong influence on these notes.

2

Contents

1 Preface 5 1.1 Computers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Definite and Indefinite Integrals 7

2.1 The Definite Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.1 The definition of area under curve . . . . . . . . . . . . . . . . . 7 2.1.2 Relation between velocity and area . . . . . . . . . . . . . . . . . 7 2.1.3 Definition of Integral . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.4 The Fundamental Theorem of Calculus . . . . . . . . . . . . . . 8

2.2 Indefinite Integrals and Change . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.1 Indefinite Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2.3 Physical Intuition . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.3 Substitution and Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.1 The Substitution Rule . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.2 The Substitution Rule for Definite Integrals . . . . . . . . . . . . 14 2.3.3 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3 Applications to Areas, Volume, and Averages 17

3.1 Using Integration to Determine Areas Between Curves . . . . . . . . . . 17

3.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2 Computing Volumes of Surfaces of Revolution . . . . . . . . . . . . . . . 20 3.3 Average Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4 Polar Coordinates and Complex Numbers 25 4.1 Polar Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.2 Areas in Polar Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.2.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.3 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.3.1 Polar Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.4 Complex Exponentials and Trig Identities . . . . . . . . . . . . . . . . . 32

4.4.1 Trigonometry and Complex Exponentials . . . . . . . . . . . . . 34

5 Integration Techniques 37 5.1 Integration By Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.2 Trigonometric Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.2.1 Some Remarks on Using Complex-Valued Functions . . . . . . . 43 5.3 Trigonometric Substitutions . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.4 Factoring Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 5.5 Integration of Rational Functions Using Partial Fractions . . . . . . . . 49 5.6 Approximating Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.7 Improper Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.7.1 Convergence, Divergence, and Comparison . . . . . . . . . . . . . 59

6 Sequences and Series 63 6.1 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.2 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.3 The Integral and Comparison Tests . . . . . . . . . . . . . . . . . . . . . 66

6.3.1 Estimating the Sum of a Series . . . . . . . . . . . . . . . . . . . 70 6.4 Tests for Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6.4.1 The Comparison Test . . . . . . . . . . . . . . . . . . . . . . . . 71 6.4.2 Absolute and Conditional Convergence . . . . . . . . . . . . . . . 72 6.4.3 The Ratio Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.4.4 The Root Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

6.5 Power Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.5.1 Shift the Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6.5.2 Convergence of Power Series . . . . . . . . . . . . . . . . . . . . 77

6.6 Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.7 Applications of Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . 82

6.7.1 Estimation of Taylor Series . . . . . . . . . . . . . . . . . . . . . 83

7 Some Differential Equations 85 7.1 Separable Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 7.2 Logistic Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Chapter 1

Preface

In order to learn Calculus it’s crucial for you to do all the assigned problems and then some. When I was a student and started doing well in math (instead of poorly!), the key difference was that I started doing an insane number of problems (e.g., every single problem in the book). Push yourself to the limit!

1.1 Computers

I think the best way to use a computer in learning Calculus is as a sort of solutions manual, but better. Do a problem first by hand. Then verify correctness of your solution. This is way better than what you get by using a solutions manual!

• You can try similar problems (not in the homework) and also verify your answers. This is like playing solitaire, but is much more creative.

• You can verify key steps of what you did by hand using the computer. E.g., if you’re confused about one of part of your approach to computing an integral, you can compare what you get with the computer. Solution manuals either give you only the solution or a particular sequence of steps to get there, which might have little to do with the brilliantly original strategy you invented.

For this course its most useful to have a program that does symbolic integration. I recommend maxima, which is a fairly simple completely free and open source program written (initially) in the 1960s at MIT. Download it for free from

                      http://maxima.sourceforge.net

It’s not insanely powerful, but it’ll instantly do (something with) pretty much any integral in this class, and a lot more. Plus if you know lisp you can read the source code. (You could also buy Maple or Mathematica, or use a TI-89 calculator.)

Here are some maxima examples:

(%i2) integrate(x^2 + 1 + 1/(x^2+1), x);
                                          3
                                         x
(%o2)                          atan(x) + -- + x
                                         3

(%i3) integrate(sqrt(5/x), x);
(%o3)                          2 sqrt(5) sqrt(x)
(%i4) integrate(sin(2*x)/sin(x), x);
(%o4)                              2 sin(x)
(%i5) integrate(sin(2*x)/sin(x), x, 0, %pi);
(%o5)                                  0
(%i6) integrate(sin(2*x)/sin(x), x, 0, %pi/2);
(%o6)                                  2

Definite and Indefinite Integrals

2.1 The Definite Integral

2.1.1 The definition of area under curve

Let f be a continuous function on interval [a, b]. Divide [a, b] into n subintervals of length Δx = (b − a)/n. Choose (sample) points x_{i}^{∗} in ith interval, for each i. The (signed) area between the graph of f and the x axis is approximately

A_{n} ∼ f(x_{1}^{∗})Δx + ⋯ + f(x_{n}^{∗})Δx

= ∑_{i=1}^{n} f(x_{i}^{∗})Δx.

(The ∑ is notation to make it easier to write down and think about the sum.)

Definition 2.1.1 (Signed Area). The (signed) area between the graph of f and the x axis between a and b is

lim_{n→∞} (∑_{i=1}^{n} f(x_{i}^{∗})Δx)

(Note that Δx = (b − a)/n depends on n.)

It is a theorem that the area exists and doesn’t depend on the choice of x_{i}^{∗}.

2.1.2 Relation between velocity and area

Suppose you’re reading a car magazine and there is an article about a new sports car that has this table in it:

Time (seconds) 0 1 2 3 4 5 6
Speed (mph)  0 5 15 25 40 50 60

They claim the car drove 1/8th of a mile after 6 seconds, but this just “feels” wrong... Hmmm... Let’s estimate the distance driven using the formula

distance = rate × time.

We overestimate by assuming the velocity is a constant equal to the max on each interval:

estimate = 5 · 1 + 15 · 1 + 25 · 1 + 40 · 1 + 50 · 1 + 60 · 1 = \frac{195}{3600} miles = 0.054...

(Note: there are 3600 seconds in an hour.) But 1/8 ∼ 0.125, so the article is inconsistent. (Doesn’t this sort of thing just bug you? By learning calculus you’ll be able to doublecheck things like this much more easily.)

Insight! The formula for the estimate of distance traveled above looks exactly like an approximation for the area under the graph of the speed of the car! In fact, if an object has velocity v(t) at time t, then the net change in position from time a to b is

∫_{a}^{b} v(t)dt.

We’ll come back to this observation frequently.

2.1.3 Definition of Integral

Let f be a continuous function on the interval [a, b]. The definite integral is just the signed area between the graph of f and the x axis:

Definition 2.1.2 (Definite Integral). The definite integral of f(x) from a to b is

∫_{a}^{b} f(x)dx = lim_{n→∞} (∑_{i=1}^{n} f(x_{i}^{∗})Δx) .

Properties of Integration:

• ∫_{a}^{b} f(x)dx = − ∫_{b}^{a} f(x)dx

• ∫_{a}^{b} c_{1}f_{1}(x) + c_{2}f_{2}(x)dx = c_{1} ∫_{a}^{b} f_{1}(x) + c_{2} ∫_{a}^{b} f_{2}(x)dx. (linearity)

• If f(x) ≥ g(x) on for all x ∈ [a, b], then ∫_{a}^{b} f(x)dx ≥ ∫_{a}^{b} g(x)dx.

There are many other properties.

2.1.4 The Fundamental Theorem of Calculus

Let f be a continuous function on the interval [a, b]. The following theorem is incredibly useful in mathematics, physics, biology, etc.

Theorem 2.1.3. If F (x) is any differentiable function on [a, b] such that F′(x) = f(x), then

∫_{a}^{b} f(x)dx = F (b) − F (a).

One reason this is amazing, is because it says that the area under the entire curve is completely determined by the values of a (“magic”) auxiliary function at only 2 points. It’s hard to believe. It reduces computing (2.1.2) to finding a single function F, which one can often do algebraically, in practice.Whether or not one should use this theorem to evaluate an integral depends a lot on the application at hand, of course. One can also use a partial limit via a computer for certain applications (numerical integration).

Example 2.1.4. I’ve always wondered exactly what the area is under a “hump” of the graph of sin. Let’s figure it out, using F (x) = − cos(x).

∫_{0}^{π} sin(x)dx = − cos(π) − (− cos(0)) = −(−1) − (−1) = 2.

But does such an F always exist? The surprising answer is “yes”.

Theorem 2.1.5. Let F (x) = ∫_{a}^{t} f(t)dt. Then F′(x) = f(x) for all x ∈ [a, b].

Note that a “nice formula” for F can be hard to find or even provably non-existent. The proof of Theorem 2.1.5 is somewhat complicated but is given in complete detail

in Stewart’s book, and you should definitely read and understand it.

Sketch of Proof. We use the definition of derivative.

F′(x) = lim_{h→0} \frac{F (x + h) − F (x)}{h}

= lim_{h→0} (∫_{a}^{x+h} f(t)dt − ∫_{a}^{x} f(t)dt) /h

= lim_{h→0} (∫_{x}^{x+h} f(t)dt) /h

Intuitively, for h sufficiently small f is essentially constant, so ∫_{x}^{x+h} f(t)dt ∼ hf(x) (this can be made precise using the extreme value theorem). Thus

lim_{h→0} (∫_{x}^{x+h} f(t)dt) /h = f(x),

which proves the theorem.

2.2 Indefinite Integrals and Change

(William Stein, Math 20b, Winter 2006)

Homework: Do the following by Tuesday, January 17.

* Section 5.3: 13, 37, 55, 67

* Section 5.4: 2, 9, 13, 27, 33, 39, 45, 47, 51, 53

* Section 5.5: 11, 23, 31, 37, 41, 55, 57, 63, 65, 75, 79 The first quiz will be on Friday, Jan 20 and will consist of two problems from this homework. Ace the first quiz!

2.2.1 Indefinite Integrals

The notation ∫ f(x)dx = F (x) means that F′(x) = f(x) on some (usually specified) domain of definition of f(x).

Definition 2.2.1 (Anti-derivative). We call F (x) an anti-derivative of f(x).

Proposition 2.2.2. Suppose f is a continuous function on an interval (a, b). Then any two antiderivatives differ by a constant.

Proof. If F_{1}(x) and F_{2}(x) are both antiderivatives of a function f(x), then

(F_{1}(x) − F_{2}(x))′ = F′_{1}(x) − F′_{2}(x) = f(x) − f(x) = 0.

Thus F_{1}(x)−F_{2}(x) = c from some constant c (since only constant functions have slope 0 everywhere). Thus F_{1}(x) = F_{2}(x) + c as claimed.

We thus often write

∫ f(x)dx = F (x) + c,

where c is an (unspecified fixed) constant.

Note that the proposition need not be true if f is not defined on a whole interval. For example, f(x) = 1/x is not defined at 0. For any pair of constants c_{1}, c_{2}, the function

F (x) = \begin{cases}ln(|x|) + c_{1} & x < 0, \\ ln(x) + c_{2} & x > 0, \end{cases}

satisfies F′(x) = f(x) for all x ≠ 0. We often still just write ∫ 1/x = ln(|x|)+c anyways, meaning that this formula is supposed to hold only on one of the intervals on which 1/x is defined (e.g., on (−∞, 0) or (0, ∞)).

We pause to emphasize the notation difference between definite and indefinite integration.

∫_{a}^{b} f(x)dx = a specific number
∫ f(x)dx = a (family of) functions

One of the main goals of this course is to help you to get really good at computing ∫ f(x)dx for various functions f(x). It is useful to memorize a table of examples (see, e.g., page 406 of Stewart), since often the trick to integration is to relate a given integral to a known one. Integration is like solving a puzzle or playing a game, and often you win by moving into a position where you know how to defeat your opponent, e.g., relating your integral to integrals that you already know how to do. If you know how to do a basic collection of integrals, it will be easier for you to see how to get to a known integral from an unknown one.

Whenever you successfully compute F (x) = ∫ f(x)dx, then you’ve constructed a mathematical gadget that allows you to very quickly compute ∫_{a}^{b} f(x)dx for any a, b (in the interval of definition of f(x)). The gadget is F (b) − F (a). This is really powerful.

2.2.2 Examples

Example 2.2.3.

∫ x^{2} + 1 + \frac{1}{x^{2} + 1}dx = ∫ x^{2}dx + ∫ 1dx + ∫ \frac{1}{x^{2} + 1}dx

= \frac{1}{3}x^{2} + x + tan^{−1}(x) + c.

Example 2.2.4.

∫ \sqrt{\frac{5}{x}}dx = ∫ \sqrt{5}x^{−1/2}dx = 2\sqrt{5}x^{1/2} + c.

Example 2.2.5.

∫ \frac{sin(2x)}{sin(x)}dx = ∫ \frac{2 sin(x) cos(x)}{sin(x)} = ∫ 2 cos(x) = 2 sin(x) + c

2.2.3 Physical Intuition

In the previous lecture we mentioned a relation between velocity, distance, and the meaning of integration, which gave you a physical way of thinking about integration. In this section we generalize our previous observation.

The following is a restatement of the fundamental theorem of calculus:

Theorem 2.2.6 (Net Change Theorem). The definite integral of the rate of change F′(x) of some quantity F (x) is the net change in that quantity:

∫_{a}^{b} F′(x)dx = F (b) − F (a).

For example, if p(t) is the population of students at UCSD at time t, then p′(t) is the rate of change. Lately p′(t) has been positive since p(t) is growing (rapidly!). The net change interpretation of integration is that

∫_{t_{1}}^{t_{2}} p′(t)dt = p(t_{2}) − p(t_{1}) = change in number of students from time t_{1} to t_{2}.

Another very common example you’ll seen in problems involves water flow into or out of something. If the volume of water in your bathtub is V (t) gallons at time t (in seconds), then the rate at which your tub is draining is V′(t) gallons per second. If you have the geekiest drain imaginable, it prints out the drainage rate V′(t). You can use that printout to determine how much water drained out from time t_{1} to t_{2}:

∫_{t_{1}}^{t_{2}} V′(t)dt = water that drained out from time t_{1} to t_{2}

Some problems will try to confuse you with different notions of change. A standard example is that if a car has velocity v(t), and you drive forward, then slam it in reverse and drive backward to where you start (say 10 seconds total elapse), then v(t) is positive some of the time and negative some of the time. The integral ∫_{0}^{10} v(t)dt is not the total distance registered on your odometer, since v(t) is partly positive and partly negative. If you want to express how far you actually drove going back and forth, compute ∫_{0}^{10} |v(t)|dt. The following example emphasizes this distinction:

Example 2.2.7. An ancient dragon is pacing on the cliffs in Del Mar, and has velocity v(t) = t^{2} − 2t − 8. Find (1) the displacement of the dragon from time t = 1 until time t = 6 (i.e., how far the dragon is at time 6 from where it was at time 1), and (2) the total distance the dragon paced from time t = 1 to t = 6.

For (1), we compute

∫_{1}^{6}(t^{2} − 2t − 8)dt = [\frac{1}{3}t^{3} − t^{2} − 8t]_{1}^{6} = −\frac{10}{3}.

For (2), we compute the integral of |v(t)|:

∫_{1}^{6} |t^{2} − 2t − 8|dt = [− (\frac{1}{3}t^{3} − t^{2} − 8t)]_{1}^{4} + [\frac{1}{3}t^{3} − t^{2} − 8t]_{4}^{6} = 18 + \frac{44}{3} = \frac{98}{3}.

2.3 Substitution and Symmetry

Homework reminder. Quiz reminder: Friday, Jan 20 (Ace the first quiz!). Office Hours: Tue 11-1. Monday is a holiday! Wednesday – areas between curves and volumes First midterm: Wed Feb 1 at 7pm (review lecture during day!) Quick 5 minute discussion of computers and Maxima. Quiz format: one question on front; one on back.

Remarks:

1. The total distance traveled is ∫_{t_{1}}^{t_{2}} |v(t)|dt since |v(t)| is the rate of change of F (t) = distance traveled (your speedometer displays the rate of change of your odometer).

2. How to compute ∫_{a}^{b} |f(x)|dx.

(a) Find the zeros of f(x) on [a, b], and use these to break the interval up into subintervals on which f(x) is always ≥ 0 or always ≤ 0.

(b) On the intervals where f(x) ≥ 0, compute the integral of f, and on the intervals where f(x) ≤ 0, compute the integral of −f.

(c) The sum of the above integrals on intervals is ∫ |f(x)|dx.

This section is primarly about a powerful technique for computing definite and indefinite integrals.

2.3.1 The Substitution Rule

In first quarter calculus you learned numerous methods for computing derivatives of functions. For example, the power rule asserts that

(x^{a})′ = a · x^{a−1}.

We can turn this into a way to compute certain integrals:

∫ x^{a}dx = \frac{1}{a + 1}x^{a+1} if a ≠ −1.

Just as with the power rule, many other rules and results that you already know yield techniques for integration. In general integration is potentially much trickier than differentiation, because it is often not obvious which technique to use, or even how to use it. Integration is a more exciting than differentiation!

Recall the chain rule, which asserts that

\frac{d}{dx}f(g(x)) = f′(g(x))g′(x).

We turn this into a technique for integration as follows:

Proposition 2.3.1 (Substitution Rule). Let u = g(x), we have

∫ f(g(x))g′(x)dx = ∫ f(u)du,

assuming that g(x) is a function that is differentiable and whose range is an interval on which f is continuous.

Proof. Since f is continuous on the range of g, Theorem 2.1.5 (the fundamental theorem of Calculus) implies that there is a function F such that F′ = f. Then

∫ f(g(x))g′(x)dx = ∫ F′(g(x))g′(x)dx

= ∫ (\frac{d}{dx}F (g(x))) dx

= F (g(x)) + C

= F (u) + C = ∫ F′(u)du = ∫ f(u)du.

If u = g(x) then du = g′(x)dx, and the substitution rule simply says if you let u = g(x) formally in the integral everywhere, what you naturally would hope to be true based on the notation actually is true. The substitution rule illustrates how the notation Leibniz invented for Calculus is incredibly brilliant. It is said that Leibniz would often spend days just trying to find the right notation for a concept. He succeeded.

As with all of Calculus, the best way to start to get your head around a new concept is to see severally clearly worked out examples. (And the best way to actually be able to use the new idea is to do lots of problems yourself!) In this section we present examples that illustrate how to apply the substituion rule to compute indefinite integrals.

Example 2.3.2.

∫ x^{2}(x^{3} + 5)^{9}dx

Let u = x^{3} + 5. Then du = 3x^{2}dx, hence dx = du/(3x^{2}). Now substitute it all in:

∫ x^{2}(x^{3} + 5)^{9}dx = ∫ \frac{1}{3}u^{9} = \frac{1}{30}u^{10} = \frac{1}{30}(x^{3} + 5)^{10}.

There’s no point in expanding this out: “only simplify for a purpose!”

Example 2.3.3.

∫ \frac{e^{x}}{1 + e^{x}} dx

Substitute u = 1 + e^{x}. Then du = e^{x}dx, and the integral above becomes

∫ \frac{du}{u} = ln |u| = ln |1 + e^{x}| = ln(1 + e^{x}).

Note that the absolute values are not needed, since 1 + e^{x} > 0 for all x.

Example 2.3.4.

∫ \frac{x^{2}}{\sqrt{1 − x}}dx

Keeping in mind the power rule, we make the substitution u = 1 − x. Then du = −dx. Noting that x = 1 − u by solving for x in u = 1 − x, we see that the above integral becomes

∫ −\frac{(1 − u)^{2}}{\sqrt{u}} du = − ∫ \frac{1 − 2u + u^{2}}{u^{1/2}} du

= − ∫ u^{−1/2} − 2u^{1/2} + u^{3/2}du

= − (2u^{1/2} − \frac{4}{3}u^{3/2} + \frac{2}{5}u^{5/2})

= −2(1 − x)^{1/2} + \frac{4}{3}(1 − x)^{3/2} − \frac{2}{5}(1 − x)^{5/2}.

2.3.2 The Substitution Rule for Definite Integrals

Proposition 2.3.5 (Substitution Rule for Definite Integrals). We have

∫_{a}^{b} f(g(x))g′(x)dx = ∫_{g(a)}^{g(b)} f(u)du,

assuming that u = g(x) is a function that is differentiable and whose range is an interval on which f is continuous.

Proof. If F′ = f, then by the chain rule, F (g(x)) is an antiderivative of f(g(x))g′(x). Thus

∫_{a}^{b} f(g(x))g′(x)dx = [F (g(x))]_{a}^{b} = F (g(b)) − F (g(a)) = ∫_{g(a)}^{g(b)} f(u)du.

Example 2.3.6.

∫_{0}^{√\overline{π}} x cos(x^{2})dx

We let u = x^{2}, so du = 2xdx and xdx = \frac{1}{2}du and the integral becomes

\frac{1}{2} · ∫_{(0)^{2}}^{(\sqrt{π})^{2}} cos(u)du = \frac{1}{2} · [sin(u)]_{0}^{π} = \frac{1}{2} · (0 − 0) = 0.

2.3.3 Symmetry

An odd function is a function f(x) such that f(−x) = −f(x), and an even function one for which f(−x) = f(x). If f is an odd function, then for any a,

∫_{−a}^{a} f(x)dx = 0.

2.3. SUBSTITUTION AND SYMMETRY 15 If f is an even function, then for any a,

∫_{−a}^{a} f(x)dx = 2 ∫_{0}^{a} f(x)dx.

Both statements are clear if we view integrals as computing the signed area between the graph of f(x) and the x-axis. Example 2.3.7.

∫_{−1}^{1} x^{2}dx = 2 ∫_{0}^{1} x^{2}dx = 2 [\frac{1}{3}x^{3}]_{0}^{1} = \frac{2}{3}.

16 CHAPTER 2. DEFINITE AND INDEFINITE INTEGRALS

Applications to Areas, Volume, and Averages

3.1 Using Integration to Determine Areas Between Curves

Today is 2006-01-18. Quiz reminder: Friday, Jan 20 (describe format) How was your weekend? Mine was great—I wrote open source math software nonstop for days on end!

This section is about how to compute the area of fairly general regions in the plane. Regions are often described as the area enclosed by the graphs of several curves. (“My land is the plot enclosed by that river, that fence, and the highway.”)

Recall that the integral ∫_{a}^{b} f(x)dx has a geometric interpretation as the signed area between the graph of f(x) and the x-axis. We defined area by subdividing, adding up approximate areas (use points in the intervals) as Riemann sum, and taking the limit. Thus we defined area as a limit of Riemann sums. The fundamental theorem of calculus asserts that we can compute areas exactly when we can finding antiderivatives.

Instead of considering the area between the graph of f(x) and the x-axis, we consider more generally two graphs, y = f(x), y = g(x), and assume for simplicity that f(x) ≥ g(x) on an interval [a, b]. Again, we approximate the area between these two curves as before using Riemann sums. Each approximating rectangle has width (b − a)/n and height f(x) − g(x), so

Area bounded by graphs ∼ ∑[f(x_{i}) − g(x_{i})]Δx.

Note that f(x) − g(x) ≥ 0, so the area is nonnegative. From the definition of integral we see that the exact area is

Area bounded by graphs = ∫_{a}^{b}(f(x) − g(x))dx.  (3.1.1)

Why did we make a big deal about approximations instead of just writing down (3.1.1)? Because having a sense of how this area comes directly from a Riemann sum is very important. But, what is the point of the Riemann sum if all we’re going to do is write down the integral? The sum embodies the geometric manifestation of the integral. If you have this picture in your mind, then the Riemann sum has done its job. If you understand this, you’re more likely to know what integral to write down; if you don’t, then you might not.

Remark 3.1.1. By the linearity property of integration, our sought for area is the difference

∫_{a}^{b} f(x)dx − ∫_{a}^{b} g(x)dx,

of two signed areas.

3.1.1 Examples

Example 3.1.2. Find the area enclosed by y = x + 1, y = 9 − x^{2}, x = −1, x = 2.

Figure 3.1.1: What is the enclosed area?

Area = ∫_{−1}^{2}[(9 − x^{2}) − (x + 1)]dx

We have reduced the problem to a computation:

∫_{−1}^{2}[(9 − x^{2}) − (x + 1)]dx = ∫_{−1}^{2}(8 − x − x^{2})dx = [8x − \frac{1}{2}x^{2} − \frac{1}{3}x^{3}]_{−1}^{2} = \frac{39}{2}.

The above example illustrates the simplest case. In practice more interesting situations often arise. The next example illustrates finding the boundary points a, b when they are not explicitly given.

Example 3.1.3. Find area enclosed by the two parabolas y = 12 − x^{2} and y = x^{2} − 6.

Problem: We didn’t tell you what the boundary points a, b are. We have to figure that out. How? We must find exactly where the two curves intersect, by setting the two curves equal and finding the solution. We have

x^{2} − 6 = 12 − x^{2},

3.1. USING INTEGRATION TO DETERMINE AREAS BETWEEN CURVES 19

Figure 3.1.2: What is the enclosed area?

so 0 = 2x^{2} − 18 = 2(x^{2} − 9) = 2(x − 3)(x + 3), hence the intersect points are at a = −3 and b = 3. We thus find the area by computing

∫_{−3}^{3} [12 − x^{2} − (x^{2} − 6)] dx = ∫_{−3}^{3}(18 − 2x^{2})dx = 4 ∫_{0}^{3}(9 − x^{2})dx = 4 · 18 = 72.

Example 3.1.4. A common way in which you might be tested to see if you really understand what is going on, is to be asked to find the area between two graphs x = f(y) and x = g(y). If the two graphs are vertical, subtract off the right-most curve. Or, just “switch x and y” everywhere (i.e., reflect about y = x). The area is unchanged.

Example 3.1.5. Find the area (not signed area!) enclosed by y = sin(πx), y = x^{2} − x, and x = 2.

Figure 3.1.3: Find the area

Write x^{2} − x = (x − 1/2)^{2} − 1/4, so that we can obtain the graph of the parabola by shifting the standard graph. The area comes in two pieces, and the upper and lower curve switch in the middle. Technically, what we’re doing is integrating the absolute value of the difference. The area is

∫_{0}^{1} sin(πx) − (x^{2} − x)dx − ∫_{1}^{2}(x^{2} − x) − sin(πx)dx = \frac{4}{π} + 1

Something to take away from this is that in order to solve this sort of problem, you need some facility with graphing functions. If you aren’t comfortable with this, review.

3.2 Computing Volumes of Surfaces of Revolution

Everybody knows that the voluem of a solid box is

volume = length × width × height.

More generally, the volume of cylinder is V = πr^{2}h (cross sectional area times height). Even more generally, if the base of a prism has area A, the volume of the prism is V = Ah.

But what if our solid object looks like a complicated blob? How would we compute the volume? We’ll do something that by now should seem familiar, which is to chop the object into small pieces and take the limit of approximations.

[[Picture of solid sliced vertically into a bunch of vertical thin solid discs.]] Assume that we have a function

A(x) = cross sectional area at x.

The volume of our potentially complicated blob is approximately ∑ A(x_{i})Δx. Thus

volume of blob = lim_{n→∞} ∑_{i=1}^{n} A(x_{i})Δx

= ∫_{a}^{b} A(x)dx

Example 3.2.1. Find the volume of the pyramid with height H and square base with sides of length L.

For convenience look at pyramid on its side, with the tip of the pyramid at the origin. We need to figure out the cross sectional area as a function of x, for 0 ≤ x ≤ H. The function that gives the distance s(x) from the x axis to the edge is a line, with s(0) = 0 and s(H) = L/2. The equation of this line is thus s(x) = \frac{L}{2H} x. Thus the cross sectional area is

A(x) = (2s(x))^{2} = \frac{x^{2}L^{2}}{H^{2}} .

The volume is then

∫_{0}^{H} A(x)dx = ∫_{0}^{H} \frac{x^{2}L^{2}}{H^{2}} dx = [\frac{x^{3}L^{2}}{3H^{2}} ]_{0}^{H} = \frac{H^{3}L^{2}}{3H^{2}} = \frac{1}{3}HL^{2}.

Today: Quiz! Next: Polar coordinates, etc. Questions:? Recall: Find volume by integrating cross section of area. (draw picture)

Figure 3.2.1: How Big is Pharaoh’s Place?

Example 3.2.2. Find the volume of the solid obtained by rotating the following region about the x axis: the region enclosed by y = x^{2} and y = x^{3} between x = 0 and x = 1.

Figure 3.2.2: Find the volume of the flower pot

The cross section is a “washer”, and the area as a function of x is

A(x) = π(r_{o}(x)^{2} − r_{i}(x)^{2}) = π(x^{4} − x^{6}).

The volume is thus

∫_{0}^{1} A(x)dx = ∫_{0}^{1} (\frac{1}{5}x^{5} − \frac{1}{7}x^{7}) dx = π [\frac{1}{5}x^{5} − \frac{1}{7}x^{7}]_{0}^{1} = \frac{2}{35}π.

Example 3.2.3. One of the most important examples of a volume is the volume V of a sphere of radius r. Let’s find it! We’ll just compute the volume of a half and multiply by 2. The cross sectional area is Figure 3.2.3: Cross section of a half of sphere with radius 1

A(x) = πr(x)^{2} = π(\sqrt{r^{2} − x^{2}})^{2} = π(r^{2} − x^{2}).

Then

\frac{1}{2}V = ∫_{0}^{r} π(r^{2} − x^{2})dx = π [r^{2}x − \frac{1}{3}x^{3}]_{0}^{r} = πr^{3} − \frac{1}{3}πr^{3} = \frac{2}{3}πr^{3}.

Thus V = (4/3)πr^{3}.

Example 3.2.4. Find volume of intersection of two spheres of radius r, where the center of each sphere lies on the edge of the other sphere.

From the picture we see that the answer is

2 ∫_{r/2}^{r} A(x),

where A(x) is exactly as in Example 3.2.3. We have

2 ∫_{r/2}^{r} π(r^{2} − x^{2})dx = \frac{5}{12}πr^{3}.

3.3 Average Values

Quiz Answers: (1) 29, (2) \frac{1}{2} ln |x^{2} + 1| + tan^{−1}(x) Exam 1: Wednesday, Feb 1, 7:00pm–7:50pm, here. Today: §6.5 – Average Values Today: §10.3 – Polar coords NEXT: §10.4 –Areas in Polar coords

Why did we skip from §6.5 to §10.3? Later we’ll go back and look at trig functions and complex exponentials; these ideas will fit together more than you might expect. We’ll go back to §7.1 on Feb 3.

In this section we use Riemann sums to extend the familiar notion of an average, which provides yet another physical interpretation of integration.

Recall: Suppose y_{1}, …, y_{n} are the amount of rain each day in La Jolla, since you moved here. The average rainful per day is

y_{avg} = \frac{y_{1} + ⋯ + y_{n}}{n} = \frac{1}{n} ∑_{i=1}^{n} y_{i}.

Definition 3.3.1 (Average Value of Function). Suppose f is a continuous function on an interval [a, b]. The average value of f on [a, b] is

f_{avg} = \frac{1}{b − a} ∫_{a}^{b} f(x)dx.

Motivation: If we sample f at n points x_{i}, then

f_{avg} ∼ \frac{1}{n} ∑_{i=1}^{n} f(x_{i}) = \frac{(b − a)}{n(b − a)} ∑_{i=1}^{n} f(x_{i}) = \frac{1}{(b − a)} ∑_{i=1}^{n} f(x_{i})Δx,

since Δx = \frac{b − a}{n}. This is a Riemann sum!

\frac{1}{(b − a)} lim_{n→∞} ∑_{i=1}^{n} f(x_{i})Δx = \frac{1}{(b − a)} ∫_{a}^{b} f(x)dx.

This explains why we defined f_{avg} as above.

Example 3.3.2. What is the average value of sin(x) on the interval [0, π]?

Figure 3.3.1: What is the average value of sin(x)?

\frac{1}{π − 0} ∫_{0}^{π} sin(x)dx = \frac{1}{π − 0}[− cos(x)]_{0}^{π}

= \frac{1}{π} [−(−1) − (−1)]_{0}^{π} = \frac{2}{π}

Observation: If you multiply both sides by (b − a) in Definition 3.3.1, you see that the average value times the length of the interval is the area, i.e., the average value gives you a rectangle with the same area as the area under your function. In particular, in Figure 3.3.1 the area between the x-axis and sin(x) is exactly the same as the area between the horizontal line of height 2/π and the x-axis.

Example 3.3.3. What is the average value of sin(2x)e^{1−cos(2x)} on the interval [−π, π]?

Figure 3.3.2: What is the average value?

\frac{1}{π − (−π)} ∫_{−π}^{π} sin(2x)e^{1−cos(2x)}dx = 0 (since the function is odd!)

Theorem 3.3.4 (Mean Value Theorem). Suppose f is a continuous function on [a, b]. Then there is a number c in [a, b] such that f(c) = f_{avg}.

This says that f assumes its average value. It is a used very often in understanding why certain statements are true. Notice that in Examples 3.3.2 and 3.3.3 it is just the assertion that the graphs of the function and the horizontal line interesect.

Proof. Let F (x) = ∫_{a}^{x} f(t)dt. Then F′(x) = f(x). By the mean value theorem for derivatives, there is c ∈ [a, b] such that f(c) = F′(c) = (F (b) − F (a))/(b − a). But by the fundamental theorem of calculus,

f(c) = \frac{F (b) − F (a)}{b − a} = \frac{1}{b − a} ∫_{a}^{b} f(x)dx = f_{avg}.

Polar Coordinates and Complex Numbers

4.1 Polar Coordinates

Rectangular coordinates allow us to describe a point (x, y) in the plane in a different way, namely

(x, y) ↔ (r, θ),

where r is any real number and θ is an angle.

Polar coordinates are extremely useful, especially when thinking about complex numbers. Note, however, that the (r, θ) representation of a point is very non-unique.

First, θ is not determined by the point. You could add 2π to it and get the same point:

(2, \frac{π}{4} ) = (2, \frac{9π}{4} ) = (2, \frac{π}{4} + 389 · 2π) . = (2, \frac{−7π}{4} )

Also that r can be negative introduces further non-uniqueness:

(1, \frac{π}{2} ) = (−1, \frac{3π}{2} ) .

Think about this as follows: facing in the direction 3π/2 and backing up 1 meter gets you to the same point as looking in the direction π/2 and walking forward 1 meter.

We can convert back and forth between cartesian and polar coordinates using that

x = r cos(θ)  (4.1.1)
y = r sin(θ),  (4.1.2)

and in the other direction

r^{2} = x^{2} + y^{2}  (4.1.3)
tan(θ) = \frac{y}{x}  (4.1.4)

(Thus r = ±\sqrt{x^{2} + y^{2}} and θ = tan^{−1}(y/x).)

Example 4.1.1. Sketch r = sin(θ), which is a circle sitting on top the x axis. We plug in points for one period of the function we are graphing—in this case [0, 2π]:

Figure 4.1.1: Graph of r = sin(θ).

0  sin(0) = 0
π/6  sin(π/6) = 1/2
π/4  sin(π/4) = \frac{\sqrt{2}}{2}
π/2  sin(π/2) = 1
3π/4  sin(3π/4) = \frac{\sqrt{2}}{2}
π  sin(π) = 0
π + π/6 sin(π + π/6) = −1/2

Notice it is nice to allow r to be negative, so we don’t have to restrict the input. BUT it is really painful to draw this graph by hand.

To more accurately draw the graph, let’s try converting the equation to one involving polar coordinates. This is easier if we multiply both sides by r:

r^{2} = r sin(θ).

Note that the new equation has the extra solution (r = 0, θ = anything), so we have to be careful not to include this point. Now convert to cartesian coordinates using (4.1.1) to obtain (4.1.3):

x^{2} + y^{2} = y.  (4.1.5)

The graph of (4.1.5) is the same as that of r = sin(θ). To confirm this we complete the square:

x^{2} + y^{2} = y
x^{2} + y^{2} − y = 0
x^{2} + (y − 1/2)^{2} = 1/4

Thus the graph of (4.1.5) is a circle of radius 1/2 centered at (0, 1/2).

Actually any polar graph of the form r = a sin(θ) + b cos(θ) is a circle, as you will see in homework problem 67 by generalizing what we just did.

4.2 Areas in Polar Coordinates

Exam 1 Wed Feb 1 7:00pm in Pepper Canyon 109 (not 106!! different class there!) Office hours: 2:45pm–4:15pm Next: Complex numbers (appendix G); complex exponentials (supplement, which is freely available online). We will not do arc length.

People were most confused last time by plotting curves in polar coordinates. (1) it is tedious, but easier if you do a few and know what they look like (just plot some points and see); there’s not much to it, except plug in values and see what you get, and (2) can sometimes convert to a curve in (x, y) coordinates, which might be easier. GOAL for today: Integration in the context of polar coordinates. Get much better at working with polar coordinates!

Example 4.2.1. (From Stewart.) Find the area enclosed by one leaf of the four-leaved rose r = cos(2θ). To find the area using the methods we know so far, we would need

Figure 4.2.1: Graph of y = cos(2x) and r = cos(2θ)

to find a function y = f(x) that gives the height of the leaf.

Multiplying both sides of the equation r = cos(2θ) by r yields

r^{2} = r cos(2θ) = r(cos^{2} θ − sin^{2} θ) = \frac{1}{r}((r cos θ)^{2} − (r sin θ)^{2}).

Because r^{2} = x^{2} + y^{2} and x = r cos(θ) and y = r sin(θ), we have

x^{2} + y^{2} = \frac{1}{\sqrt{x^{2} + y^{2}}} (x^{2} − y^{2}).

Solving for y is a crazy mess, and then integrating? It seems impossible!

But it isn’t... if we remember the basic idea of calculus: subdivide and take a limit. [[Draw a section of a curve r = f(θ) for θ in some interval [a, b], and shade in the

area of the arc.]]

Remark 4.2.2. We will almost never talk about angles in degrees—we’ll almost always use radians.

We know how to compute the area of a sector, i.e., piece of a circle with angle θ. [[draw picture]]. This is the basic polar region. The area is

A = (fraction of the circle) · (area of circle) = (\frac{θ}{2π} ) · πr^{2} = \frac{1}{2}r^{2}θ.

We now imitate what we did before with Riemann sums. We chop up, approximate, and take a limit. Break the interval of angles from a to b into n subintervals. Choose θ_{i}^{∗} in each interval. The area of each slice is approximately (1/2)f(θ_{i}^{∗})^{2}θ_{i}^{2}. Thus

A = Area of the shaded region ∼ ∑_{i=1}^{n} \frac{1}{2}f(θ_{i}^{∗})^{2}Δ(θ).

Taking the limit, we see that

A = lim_{n→∞} ∑_{i=1}^{n} \frac{1}{2}f(θ_{i}^{∗})^{2}Δ(θ) = \frac{1}{2} · ∫_{a}^{b} f(θ)^{2}dθ.

Amazing! By understanding the definition of Riemann sum, we’ve derived a formula for areas swept out by a polar graph. But does it work in practice? Let’s revisit our clover leaf.

4.2.1 Examples

Example 4.2.3. Find the area enclosed by one leaf of the four-leaved rose r = cos(2θ). Solution: We need the boundaries of integration. Start at θ = −π/4 and go to θ = π/4. As a check, note that cos((−π/4) · 2) = 0 = cos((π/4) · 2). We evaluate

\frac{1}{2} · ∫_{−π/4}^{π/4} cos(2θ)^{2}dθ = ∫_{0}^{π/4} cos(2θ)^{2}dθ  (even function)

= \frac{1}{2} ∫_{0}^{π/4}(1 + cos(4θ))dθ

= \frac{1}{2} [θ + \frac{1}{4} · sin(4θ)]_{0}^{π/4}

= \frac{π}{8} .

We used that

cos^{2}(x) = (1 + cos(2x))/2  and  sin^{2}(x) = (1 − sin(2x))/2,  (4.2.1)

which follow from

cos(2x) = cos^{2}(x) − sin^{2}(x) = 2 cos^{2}(x) − 1 = 1 − 2 sin^{2}(x).

Example 4.2.4. Find area of region inside the curve r = 3 cos(θ) and outside the cardiod curve r = 1 + cos(θ). Solution: This is the same as before. It’s the difference of two areas. Figure out the limits, which are where the curves intersect, i.e., the θ such that

3 cos(θ) = 1 + cos(θ).

4.3. COMPLEX NUMBERS 29

Figure 4.2.2: Graph of r = 3 cos(θ) and r = 1 + cos(θ)

Solving, 2 cos(θ) = 1, so cos(θ) = 1/2, hence θ = π/3 and θ = −π/3. Thus the area is

A = \frac{1}{2} ∫_{−π/3}^{π/3}(3 cos(θ))^{2} − (1 + cos(θ))^{2}dθ

= ∫_{0}^{π/3}(3 cos(θ))^{2} − (1 + cos(θ))^{2}dθ (even function) = ∫_{0}^{π/3}(8 cos^{2}(θ) − 2 cos(θ) − 1)dθ

= ∫_{0}^{π/3} (8 · \frac{1}{2} (1 + cos(2θ)) − 2 cos(θ) − 1) dθ

= ∫_{0}^{π/3} 3 + 4 cos(2θ) − 2 cos(θ)dθ = [3θ + 2 sin(2θ) − 2 sin(θ)]_{0}^{π/3}

= π + 2 · \sqrt{\frac{3}{2}} − 2\sqrt{\frac{3}{2}} − 0 − 2 · 0 − 2 · 0

= π

4.3 Complex Numbers

A complex number is an expression of the form a + bi, where a and b are real numbers, and i^{2} = −1. We add and multiply complex numbers as follows:

(a + bi) + (c + di) = (a + c) + (b + d)i
(a + bi) · (c + di) = (ac − bd) + (ad + bc)i

The complex conjugate of a complex number is \overline{a + bi} = a − bi.

Note that

(a + bi)(\overline{a + bi}) = a^{2} + b^{2}

is a real number (has no complex part).

If c + di ≠ 0, then

\frac{a + bi}{c + di} = \frac{(a + bi)(c − di)}{c^{2} + d^{2}} = \frac{1}{c^{2} + d^{2}} ((ac + bd) + (bc − ad)i).

Example 4.3.1. (1 − 2i)(8 − 3i) = 2 − 19i and 1/(1 + i) = (1 − i)/2 = 1/2 − (1/2)i.

Complex numbers are incredibly useful in providing better ways to understand ideas in calculus, and more generally in many applications (e.g., electrical engineering, quantum mechanics, fractals, etc.). For example,

• Every polynomial f(x) factors as a product of linear factors (x − α), if we allow the α’s in the factorization to be complex numbers. For example,

f(x) = x^{2} + 1 = (x − i)(x + i).

This will provide an easier to use variant of the “partial fractions” integration technique, which we will see later.

• Complex numbers are in correspondence with points in the plane via (x, y) ↔ x + iy. Via this correspondence we obtain a way to add and multiply points in the plane.

• Similarly, points in polar coordinates correspond to complex numbers:

(r, θ) ↔ r(cos(θ) + i sin(θ)).

• Complex numbers provide a very nice way to remember and understand trig identities.

4.3.1 Polar Form

The polar form of a complex number x + iy is r(cos(θ) + i sin(θ)) where (r, θ) are any choice of polar coordinates that represent the point (x, y) in rectangular coordinates. Recall that you can find the polar form of a point using that

r = \sqrt{x^{2} + y^{2}} and θ = tan^{−1}(y/x).

NOTE: The “existence” of complex numbers wasn’t generally accepted until people got used to a geometric interpretation of them.

Example 4.3.2. Find the polar form of 1 + i. Solution. We have r = \sqrt{2}, so

1 + i = \sqrt{2} (\frac{1}{\sqrt{2}} + \frac{i}{\sqrt{2}}) = \sqrt{2} (cos(π/4) + i sin(π/4)) .

Example 4.3.3. Find the polar form of \sqrt{3} − i. Solution. We have r = \sqrt{3 + 1} = 2, so

\sqrt{3} − i = 2 (\frac{\sqrt{3}}{2} + i\frac{−1}{2}) = 2 (cos(−π/6) + i sin(−π/6))

[[A picture is useful here.]]

Finding the polar form of a complex number is exactly the same problem as finding polar coordinates of a point in rectangular coordinates. The only hard part is figuring out what θ is.

If we write complex numbers in rectangular form, their sum is easy to compute:

(a + bi) + (c + di) = (a + c) + (b + d)i

The beauty of polar coordinates is that if we write two complex numbers in polar form, then their product is very easy to compute:

r_{1}(cos(θ_{1}) + i sin(θ_{1})) · r_{2}(cos(θ_{2}) + i sin(θ_{2})) = (r_{1}r_{2})(cos(θ_{1} + θ_{2}) + i sin(θ_{1} + θ_{2})).

The magnitudes multiply and the angles add. The above formula is true because of the double angle identities for sin and cos (and it is how I remember those formulas!).

(cos(θ_{1}) + i sin(θ_{1})) · (cos(θ_{2}) + i sin(θ_{2}))

= (cos(θ_{1}) cos(θ_{2}) − sin(θ_{1}) sin(θ_{2})) + i(sin(θ_{1}) cos(θ_{2}) + cos(θ_{1}) sin(θ_{2})).

For example, the power of a singular complex number in polar form is easy to compute; just power the r and multiply the angle.

Theorem 4.3.4 (De Moivre’s). For any integer n we have

(r(cos(θ) + i sin(θ)))^{n} = r^{n}(cos(nθ) + i sin(nθ)).

Example 4.3.5. Compute (1 + i)^{2006}. Solution. We have

(1 + i)^{2006} = (\sqrt{2} (cos(π/4) + i sin(π/4)))^{2006}
= \sqrt{2}^{2006} (cos(2006π/4) + i sin(2006π/4)))
= 2^{1003} (cos(3π/2) + i sin(3π/2)))
= −2^{1003}i

To get cos(2006π/4) = cos(3π/2) we use that 2006/4 = 501.5, so by periodicity of cosine, we have

cos(2006π/4) = cos((501.5)π − 250(2π)) = cos(1.5π) = cos(3π/2).

EXAM 1: Wednesday 7:00-7:50pm in Pepper Canyon 109 (!) Today: Supplement 1 (get online; also homework online) Wednesday: Review Bulletin board, online chat, directory, etc. – see main course website. Review day – I will prepare no LECTURE; instead I will answer questions. Your job is to have your most urgent questions ready to go! Office hours moved: NOT Tue 11-1 (since nobody ever comes then and I’ll be at a conference); instead I’ll be in my office to answer questions WED 1:30-4pm, and after class on WED too. Office: AP&M 5111 Quick review: Given a point (x, y) in the plane, we can also view it as x + iy or in polar form as r(cos(θ) + i sin(θ)). Polar form is great since it’s good for multiplication, powering, and for extracting roots:

r_{1}(cos(θ_{1}) + i sin(θ_{1}))r_{2}(cos(θ_{2}) + i sin(θ_{2})) = (r_{1}r_{2})(cos(θ_{1} + θ_{2}) + i sin(θ_{1} + θ_{2})).

(If you divide, you subtract the angle.) The point is that the polar form works better with multiplication than the rectangular form.

Theorem 4.3.6 (De Moivre’s). For any integer n we have

(r(cos(θ) + i sin(θ)))^{n} = r^{n}(cos(nθ) + i sin(nθ)).

Since we know how to raise a complex number in polar form to the nth power, we can find all numbers with a given power, hence find the nth roots of a complex number.

Proposition 4.3.7 (nth roots). A complex number z = r(cos(θ) + i sin(θ)) has n distinct nth roots:

r^{1/n} (cos (\frac{θ + 2πk}{n} ) + i sin (\frac{θ + 2πk}{n} )) ,

for k = 0, 1, …, n − 1. Here r^{1/n} is the real positive n-th root of r.

As a double-check, note that by De Moivre, each number listed in the proposition has nth power equal to z.

An application of De Moivre is to computing sin(nθ) and cos(nθ) in terms of sin(θ) and cos(θ). For example,

cos(3θ) + i sin(3θ) = (cos(θ) + i sin(θ))^{3}
= (cos(θ)^{3} − 3 cos (θ) sin(θ)^{2}) + i(3 cos(θ)^{2} sin(θ) − sin(θ)^{3})

Equate real and imaginary parts to get formulas for cos(3θ) and sin(3θ). In the next section we will discuss going in the other direction, i.e., writing powers of sin and cos in terms of sin and cosine.

Example 4.3.8. Find the cube roots of 2. Solution. Write 2 in polar form as

2 = 2(cos(0) + i sin(0)).

Then the three cube roots of 2 are

2^{1/3}(cos(2πk/3) + i sin(2πk/3)),

for k = 0, 1, 2. I.e.,

2^{1/3}, 2^{1/3}(−1/2 + i\sqrt{3}/2), 2^{1/3}(−1/2 − i\sqrt{3}/2).

4.4 Complex Exponentials and Trig Identities

Recall that

r_{1}(cos(θ_{1}) + i sin(θ_{1}))r_{2}(cos(θ_{2}) + i sin(θ_{2})) = (r_{1}r_{2})(cos(θ_{1} + θ_{2}) + i sin(θ_{1} + θ_{2})).

The angles add. You’ve seen something similar before:

e^{a}e^{b} = a^{a+b}.

This connection between exponentiation and (4.4) gives us an idea!

If z = x + iy is a complex number, define

e^{z} = e^{x}(cos(y) + i sin(y)).

We have just written polar coordinates in another form. It’s a shorthand for the polar form of a complex number:

r(cos(θ) + i sin(θ)) = re^{iθ}.

Theorem 4.4.1. If z_{1}, z_{2} are two complex numbers, then

e^{z_{1}}e^{z_{2}} = e^{z_{1}+z_{2}}

Proof.

e^{z_{1}}e^{z_{2}} = e^{a_{1}}(cos(b_{1}) + i sin(b_{1})) · e^{a_{2}}(cos(b_{2}) + i sin(b_{2}))
= e^{a_{1}+a_{2}}(cos(b_{1} + b_{2}) + i sin(b_{1} + b_{2}))
= e^{z_{1}+z_{2}}.

Here we have just used (4.4).

The following theorem is amazing, since it involves calculus.

Theorem 4.4.2. If w is a complex number, then

\frac{d}{dx}e^{wx} = we^{wx},

for x real. In fact, this is even true for x a complex variable (but we haven’t defined differentiation for complex variables yet).

Proof. Write w = a + bi.

\frac{d}{dx}e^{wx} = \frac{d}{dx}e^{ax+bix}

= \frac{d}{dx}(e^{ax}(cos(bx) + i sin(bx)))

= \frac{d}{dx}(e^{ax} cos(bx) + ie^{ax} sin(bx))

= \frac{d}{dx}(e^{ax} cos(bx)) + i\frac{d}{dx}(e^{ax} sin(bx))

Now we use the product rule to get

\frac{d}{dx}(e^{ax} cos(bx)) + i\frac{d}{dx}(e^{ax} sin(bx))
= ae^{ax} cos(bx) − be^{ax} sin(bx) + i(ae^{ax} sin(bx) + be^{ax} cos(bx))
= e^{ax}(a cos(bx) − b sin(bx) + i(a sin(bx) + b cos(bx))

On the other hand,

we^{wx} = (a + bi)e^{ax+bxi}
= (a + bi)e^{ax}(cos(bx) + i sin(bx))
= e^{ax}(a + bi)(cos(bx) + i sin(bx))
= e^{ax}((a cos(bx) − b sin(bx)) + i(a sin(bx)) + b cos(bx))

Wow!! We did it!

That Theorem 4.4.2 is true is pretty amazing. It’s what really gets complex analysis going.

Example 4.4.3. Here’s another fun fact: e^{iπ} + 1 = 0. Solution. By definition, have e^{iπ} = cos(π) + i sin(π) = −1 + i0 = −1.

4.4.1 Trigonometry and Complex Exponentials

Amazingly, trig functions can also be expressed back in terms of the complex exponential. Then everything involving trig functions can be transformed into something involving the exponential function. This is very surprising.

In order to easily obtain trig identities like cos(x)^{2} + sin(x)^{2} = 1, let’s write cos(x) and sin(x) as complex exponentials. From the definitions we have

e^{ix} = cos(x) + i sin(x),

so

e^{−ix} = cos(−x) + i sin(−x) = cos(x) − i sin(x).

Adding these two equations and dividing by 2 yields a formula for cos(x), and subtracting and dividing by 2i gives a formula for sin(x):

cos(x) = \frac{e^{ix} + e^{−ix}}{2} sin(x) = \frac{e^{ix} − e^{−ix}}{2i} .

We can now derive trig identities. For example,

sin(2x) = \frac{e^{i2x} − e^{−i2x}}{2i}

= \frac{(e^{ix} − e^{−ix})(e^{ix} + e^{−ix})}{2i}

= 2\frac{e^{ix} − e^{−ix}}{2i} \frac{e^{ix} + e^{−ix}}{2} = 2 sin(x) cos(x).

I’m unimpressed, given that you can get this much more directly using

(cos(2x) + i sin(2x)) = (cos(x) + i sin(x))^{2} = cos^{2}(x) − sin^{2}(x) + i2 cos(x) sin(x),

and equating imaginary parts. But there are more interesting examples.

Next we verify that (4.4.1) implies that cos(x)^{2} + sin(x)^{2} = 1. We have

4(cos(x)^{2} + sin(x)^{2}) = (e^{ix} + e^{−ix})^{2} + (\frac{e^{ix} − e^{−ix}}{i} )^{2}
= e^{2ix} + 2 + e^{−2ix} − (e^{2ix} − 2 + e^{−2ix}) = 4.

The equality just appears as a follow-your-nose algebraic calculation.

4.4. COMPLEX EXPONENTIALS AND TRIG IDENTITIES 35

Figure 4.4.1: What is sin(x)^{3}?

Example 4.4.4. Compute sin(x)^{3} as a sum of sines and cosines with no powers. Solution. We use (4.4.1):

sin(x)^{3} = (\frac{e^{ix} − e^{−ix}}{2i} )^{3}

= (\frac{1}{2i})^{3} (e^{ix} − e^{−ix})^{3}

= (\frac{1}{2i})^{3} (e^{ix} − e^{−ix})(e^{ix} − e^{−ix})(e^{ix} − e^{−ix})

= (\frac{1}{2i})^{3} (e^{ix} − e^{−ix})(e^{2ix} − 2 + e^{−2ix})

= (\frac{1}{2i})^{3} (e^{3ix} − 2e^{ix} + e^{−ix} − e^{ix} + 2e^{−ix} − e^{−3ix})

= (\frac{1}{2i})^{3} ((e^{3ix} − e^{−3ix}) − 3(e^{ix} − e^{−ix}))

= − (\frac{1}{4}) [\frac{e^{3ix} − e^{−3ix}}{2i} − 3 · \frac{e^{ix} − e^{−ix}}{2i} ]

= \frac{3 sin(x) − sin(3x)}{4}.

36 CHAPTER 4. POLAR COORDINATES AND COMPLEX NUMBERS

Integration Techniques

5.1 Integration By Parts

Quiz next Friday Today: 7.1: integration by parts Next: 7.2: trigonometric integrals and supplement 2–functions with complex values Exams: Average 19.68 (out of 34). Tetrahedron problem:

∫_{0}^{h} \frac{1}{2} (− \frac{b}{h} x + b) (− \frac{a}{h} x + a) dx = ⋯ = \frac{abh}{6} .

(The function that gives the base of the triangle cross section is a linear function that is b at x = 0 and 0 at x = h, which allows you to easily determine it without thinking about geometry.)

Differentiation Integration
Chain Rule  Substitution
Product Rule  Integration by Parts

The product rule is that

\frac{d}{dx} [f(x)g(x)] = f(x)g′(x) + f′(x)g(x).

Integrating both sides leads to a new fundamental technique for integration:

f(x)g(x) = ∫ f(x)g′(x)dx + ∫ g(x)f′(x)dx.  (5.1.1)

Now rewrite (5.1.1) as

∫ f(x)g′(x)dx = f(x)g(x) − ∫ g(x)f′(x)dx.

Shorthand notation:

u = f(x)  du = f′(x)dx
v = g(x)  dv = g′(x)dx

Then have

∫ udv = uv − ∫ vdu.

So what! But what’s the big deal? Integration by parts is a fundamental technique of integration. It is also a key step in the proof of many theorems in calculus.

Example 5.1.1. ∫ x cos(x)dx.

u = x  v = sin(x)
du = dx  dv = cos(x)dx

We get

∫ x cos(x)dx = x sin(x) − ∫ sin(x)dx = x sin(x) + cos(x) + c.

“Did this do anything for us?” Indeed, it did.

Wait a minute—how did we know to pick u = x and v = sin(x)? We could have picked them other way around and still written down true statements. Let’s try that:

u = cos(x)  v = \frac{1}{2}x^{2}
du = − sin(x)dx  dv = xdx

∫ x cos(x)dx = \frac{1}{2}x cos(x) + ∫ \frac{1}{2}x^{2} sin(x)dx.

Did this help!? NO. Integrating x^{2} sin(x) is harder than integrating x cos(x). This formula is completely correct, but is hampered by being useless in this case. So how do you pick them?

Choose the u so that when you differentiate it you get something simpler; when you pick dv, try to choose something whose antiderivative is simpler.

Sometimes you have to try more than once. But with a good eraser nodoby will know that it took you two tries.

Question 5.1.2. If integration by parts once is good, then sometimes twice is even better? Yes, in some examples (see Example 5.1.5). But in the above example, you just undo what you did and basically end up where you started, or you get something even worse.

Example 5.1.3. Compute ∫0^{\frac{1}{2}} sin^{−1}(x)dx. Two points:

1. It’s a definite integral.

2. There is only one function; would you think to do integration by parts? But it is a product; it just doesn’t look like it at first glance.

Your choice is made for you, since we’d be back where we started if we put dv = sin^{−1}(x)dx.

u = sin^{−1}(x)  v = x
du = \frac{1}{\sqrt{1 − x^{2}}}  dv = dx

We get

∫0^{\frac{1}{2}} sin^{−1}(x)dx = [x sin^{−1}(x)]0^{\frac{1}{2}} − ∫0^{\frac{1}{2}} \frac{x}{\sqrt{1 − x^{2}}} dx.

Now we use substitution with w = 1 − x^{2}, dw = −2xdx, hence xdx = −\frac{1}{2}dw.

∫0^{\frac{1}{2}} \frac{x}{\sqrt{1 − x^{2}}} dx = −\frac{1}{2} ∫ w^{− \frac{1}{2}} dw = −w^{\frac{1}{2}} + c = −\sqrt{1 − x^{2}} + c.

Hence

∫0^{\frac{1}{2}} sin^{−1}(x)dx = [x sin^{−1}(x)]0^{\frac{1}{2}} + [\sqrt{1 − x^{2}}]0^{\frac{1}{2}} = \frac{π}{12} + \frac{\sqrt{3}}{2} − 1

But shouldn’t we change the limits because we did a substitution? (No, since we computed the indefinite integral and put it back; this time we did the other option.)

Is there another way to do this? I don’t know. But for any integral, there might be several different techniques. If you can think of any other way to guess an antiderivative, do it; you can always differentiate as a check.

Note: Integration by parts is tailored toward doing indefinite integrals.

Example 5.1.4. This example illustrates how to use integration by parts twice. We compute

∫ x^{2}e^{−2x}dx

u = x^{2}  v = −\frac{1}{2}e^{−2x}
du = 2xdx  dv = e^{−2x}dx

We have

∫ x^{2}e^{−2x}dx = −\frac{1}{2}x^{2}e^{−2x} + ∫ xe^{−2x}dx.

Did this help? It helped, but it did not finish the integral off. However, we can deal with the remaining integral, again using integration by parts. If you do it twice, you what to keep going in the same direction. Do not switch your choice, or you’ll undo what you just did.

u = x  v = −\frac{1}{2}e^{−2x}
du = dx  dv = e^{−2x}dx

∫ xe^{−2x}dx = −\frac{1}{2}xe^{−2x} + \frac{1}{2} ∫ e^{−2x}dx = −\frac{1}{2}xe^{−2x} − \frac{1}{4}e^{−2x} + c.

Now putting this above, we have

∫ x^{2}e^{−2x}dx = −\frac{1}{2}x^{2}e^{−2x} − \frac{1}{2}xe^{−2x} − \frac{1}{4}e^{−2x} + c = −\frac{1}{4}e^{−2x}(2x^{2} + 2x + 1) + c.

Do you think you might have to do integration by parts three times? What if it were ∫ x^{3}e^{−2x}dx? Grrr – you’d have to do it three times.

Example 5.1.5. Compute ∫ e^{x} cos(x)dx. Which should be u and which should be v?

Taking the derivatives of each type of function does not change the type. As a practical matter, it doesn’t matter. Which would you prefer to find the antiderivative of? (Both choices work, as long as you keep going in the same direction when you do the second step.)

u = cos(x)  v = e^{x}
du = − sin(x)dx  dv = e^{x}dx

We get

∫ e^{x} cos(x)dx = e^{x} cos(x) + ∫ e^{x} sin(x)dx.

We have to do it again. This time we choose (going in the same direction):

u = sin(x)  v = e^{x}
du = cos(x)dx  dv = e^{x}dx

We get

∫ e^{x} cos(x)dx = e^{x} cos(x) + e^{x} sin(x) − ∫ e^{x} cos(x)dx.

Did we get anywhere? Yes! No! First impression: all this work, and we’re back where we started from! Yuck. Clearly we don’t want to integrate by parts yet again. BUT. Notice the minus sign in front of ∫ e^{x} cos(x)dx; You can add the integral to both sides and get

2 ∫ e^{x} cos(dx) = e^{x} cos(x) + e^{x} sin(x) + c.

Hence

∫ e^{x} cos(dx) = \frac{1}{2}e^{x}(cos(x) + sin(x)) + c.

5.2 Trigonometric Integrals

Friday: Quiz 2 Next: Trig subst.

cos^{2}(x) = \frac{1 + cos(2x)}{2}  and  sin^{2}(x) = \frac{1 − sin(2x)}{2} .

(5.2.1)

Example 5.2.1. Compute ∫ sin^{3}(x)dx. We use trig. identities and compute the integral directly as follows:

∫ sin^{3}(x)dx = ∫ sin^{2}(x) sin(x)dx
= ∫ [1 − cos^{2}(x)] sin(x)dx
= − cos(x) + \frac{1}{3} cos^{3}(x) + c (substitution u = cos(x))

This always works for odd powers of sin(x).

Example 5.2.2. What about even powers?! Compute ∫ sin^{4}(x)dx. We have

sin^{4}(x) = [sin^{2}(x)]^{2}

= [\frac{1 − cos(2x)}{2}]^{2}

= \frac{1}{4} · [1 − 2 cos(2x) + cos^{2}(2x)]

= \frac{1}{4} [1 − 2 cos(2x) + \frac{1}{2} + \frac{1}{2} cos(4x)]

Thus

∫ sin^{4}(x)dx = ∫ [\frac{3}{8} − \frac{1}{2} cos(2x) + \frac{1}{8} cos(4x)] dx

= \frac{3}{8}x − \frac{1}{4} sin(2x) + \frac{1}{32} sin(4x) + c.

Key Trick: Realize that we should write sin^{4}(x) as (sin^{2}(x))^{2}. The rest is straightforward.

Example 5.2.3. This example illustrates a method for computing integrals of trig functions that doesn’t require knowing any trig identities at all or any tricks. It is very tedious though. We compute ∫ sin^{3}(x)dx using complex exponentials. We have

cos(x) = \frac{e^{ix} + e^{−ix}}{2} sin(x) = \frac{e^{ix} − e^{−ix}}{2i} .

hence

∫ sin^{3}(x)dx = ∫ (\frac{e^{ix} − e^{−ix}}{2i} )^{3} dx

= −\frac{1}{8i} ∫ (e^{ix} − e^{−ix})^{3}dx

= −\frac{1}{8i} ∫ (e^{ix} − e^{−ix})(e^{ix} − e^{−ix})(e^{ix} − e^{−ix})dx

= −\frac{1}{8i} ∫ (e^{2ix} − 2 + e^{−2ix})(e^{ix} − e^{−ix})dx

= −\frac{1}{8i} ∫ e^{3ix} − e^{ix} − 2e^{ix} + 2e^{−ix} + e^{−ix} − e^{−3ix}dx

= −\frac{1}{8i} ∫ e^{3ix} − e^{−3ix} + 3e^{−ix} − 3e^{ix}dx

= −\frac{1}{8i} (\frac{e^{3ix}}{3i} − \frac{e^{−3ix}}{−3i} + \frac{3e^{−ix}}{−i} − \frac{3e^{ix}}{i} ) + c

= \frac{1}{4} (\frac{1}{3} cos(3x) − 3 cos(x)) + c

= \frac{1}{12} cos(3x) − \frac{3}{4} cos(x) + c

The answer looks totally different, but is in fact the same function.

Here are some more identities that we’ll use in illustrating some tricks below.

\frac{d}{dx} tan(x) = sec^{2}(x)

and

\frac{d}{dx} sec(x) = sec(x) tan(x).

Also,

1 + tan^{2}(x) = sec^{2}(x).

Example 5.2.4. Compute ∫ tan^{3}(x)dx. We have

∫ tan^{3}(x)dx = ∫ tan(x) tan^{2}(x)dx
= ∫ tan(x) [sec^{2}(x) − 1] dx
= ∫ tan(x) sec^{2}(x)dx − ∫ tan(x)dx
= \frac{1}{2} tan^{2}(x) − ln | sec(x)| + c

Here we used the substitution u = tan(x), so du = sec^{2}(x)dx, so

∫ tan(x) sec^{2}(x)dx = ∫ udu = \frac{1}{2}u^{2} + c = \frac{1}{2} tan^{2}(x) + c.

Also, with the substitution u = cos(x) and du = − sin(x)dx we get

∫ tan(x)dx = ∫ \frac{sin(x)}{cos(x)}dx = − ∫ \frac{1}{u}du = − ln |u| + c = − ln | sec(x)| + c.

Key trick: Write tan^{3}(x) as tan(x) tan^{2}(x).

Example 5.2.5. Here’s one that combines trig identities with the funnest variant of integration by parts. Compute ∫ sec^{3}(x)dx. We have

∫ sec^{3}(x)dx = ∫ sec(x) sec^{2}(x)dx.

Let’s use integration by parts.

u = sec(x)  v = tan(x)
du = sec(x) tan(x)dx  dv = sec^{2}(x)dx

The above integral becomes

∫ sec(x) sec^{2}(x)dx = sec(x) tan(x) − ∫ sec(x) tan^{2}(x)dx
= sec(x) tan(x) − ∫ sec(x)[sec^{2}(x) − 1]dx
= sec(x) tan(x) − ∫ sec^{3}(x) + ∫ sec(x)dx
= sec(x) tan(x) − ∫ sec^{3}(x) + ln | sec(x) + tan(x)|

This is familiar. Solve for ∫ sec^{3}(x). We get

∫ sec^{3}(x)dx = \frac{1}{2}[sec(x) tan(x) + ln | sec(x) + tan(x)|] + c

5.2.1 Some Remarks on Using Complex-Valued Functions

Consider functions of the form

f(x) + ig(x),  (5.2.2)

where x is a real variable and f, g are real-valued functions. For example,

e^{ix} = cos(x) + i sin(x).

We observed before that

\frac{d}{dx}e^{wx} = we^{wx}

hence

∫ e^{wx}dx = \frac{1}{w} e^{wx} + c.

For example, writing it e^{ix} as in (5.2.2), we have

∫ e^{ix}dx = ∫ cos(x)dx + i ∫ sin(x)dx

= sin(x) − i cos(x) + c = −i(cos(x) + i sin(x)) + c

= \frac{1}{i}e^{ix}.

Example 5.2.6. Let’s compute ∫ \frac{1}{x + i}dx. Wouldn’t it be nice if we could just write

ln(x + i) + c? This is useless for us though, since we haven’t even defined ln(x + i)! However, we can “rationalize the denominator” by writing

∫ \frac{1}{x + i}dx = ∫ \frac{1}{x + i} · \frac{x − i}{x − i}dx

= ∫ \frac{x − i}{x^{2} + 1}dx

= ∫ \frac{x}{x^{2} + 1}dx − i ∫ \frac{1}{x^{2} + 1}dx

= \frac{1}{2} ln |x^{2} + 1| − i tan^{−1}(x) + c

This informs how we would define ln(z) for z complex (which you’ll do if you take a course in complex analysis). Key trick: Get the i in the numerator.

The next example illustrates an alternative to the method of Section 5.2.

Example 5.2.7.

∫ sin(5x) cos(3x)dx = ∫ (\frac{e^{i5x} − e^{−i5x}}{2i} ) (·\frac{e^{i5x} + e^{−i5x}}{2} ) dx

= \frac{1}{4i} ∫ (e^{i8x} − e^{−i8x} + e^{i2x} − e^{−i2x}) dx + c

= \frac{1}{4i} (\frac{e^{i8x}}{8i} + \frac{e^{−i8x}}{8i} + \frac{e^{i2x}}{2i} + \frac{e^{−i2x}}{2i} ) + c

= −\frac{1}{4} [\frac{1}{4} cos(8x) + cos(2x)] + c

This is more tedious than the method in 5.2. But it is completely straightforward. You don’t need any trig formulas or anything else. You just multiply it out, integrate, etc., and remember that i^{2} = −1.

5.3 Trigonometric Substitutions

Return more midterms? Rough meaning of grades:

29–34 is A 23–28 is B 17–22 is C 11–16 is D

Regarding the quiz—if you do every homework problem that was assigned, you’ll have a severe case of deja vu on the quiz! On the exam, we do not restrict ourselves like this, but you get to have a sheet of paper.

The first homework problem is to compute

∫_{√\overline{2}}^{2} \frac{1}{x^{3}\sqrt{x^{2} − 1}}dx.  (5.3.1)

Your first idea might be to do some sort of substitution, e.g., u = x^{2} − 1, but du = 2xdx is nowhere to be seen and this simply doesn’t work. Likewise, integration by parts gets us nowhere. However, a technique called “inverse trig substitutions” and a trig identity easily dispenses with the above integral and several similar ones! Here’s the crucial table:

Expression Inverse Substitution  Relevant Trig Identity
\sqrt{a^{2} − x^{2}} x = a sin(θ), −\frac{π}{2} ≤ θ ≤ \frac{π}{2}  1 − sin^{2}(θ) = cos^{2}(θ)
\sqrt{a^{2} + x^{2}} x = a tan(θ), −\frac{π}{2} < θ < \frac{π}{2}  1 + tan^{2}(θ) = sec^{2}(θ)
\sqrt{x^{2} − a^{2}} x = a sec(θ), 0 ≤ θ < \frac{π}{2} or π ≤ θ < \frac{3π}{2} sec^{2}(θ) − 1 = tan^{2}(θ)

Inverse substitution works as follows. If we write x = g(t), then

∫ f(x)dx = ∫ f(g(t))g′(t)dt.

This is not the same as substitution. You can just apply inverse substitution to any integral directly—usually you get something even worse, but for the integrals in this section using a substitution can vastly improve the situation.

If g is a 1 − 1 function, then you can even use inverse substitution for a definite integral. The limits of integration are obtained as follows.

∫_{a}^{b} f(x)dx = ∫_{g^{−1}(a)}^{g^{−1}(b)} f(g(t))g′(t)dt.  (5.3.2)

To help you understand this, note that as t varies from g^{−1}(a) to g^{−1}(b), the function g(t) varies from a = g(g^{−1}(a) to b = g(g^{−1}(b)), so f is being integrated over exactly the same values. Note also that (5.3.2) once again illustrates Leibniz’s brilliance in designing the notation for calculus.

Let’s give it a shot with (5.3.1). From the table we use the inverse substition

x = sec(θ).

We get

∫_{√\overline{2}}^{2} \frac{1}{x^{3}\sqrt{x^{2} − 1}}dx = ∫ \frac{π}{3} ; \frac{π}{4} \frac{1}{sec(θ)}\sqrt{sec^{2}(θ) − 1} sec(θ) tan(θ)dθ

= ∫ \frac{π}{3} ; \frac{π}{4} \frac{1}{sec(θ)}tan(θ) sec(θ) tan(θ)dθ

= ∫ \frac{π}{3} ; \frac{π}{4} cos^{(} θ)dθ

= \frac{1}{2} ∫ \frac{π}{3} ; \frac{π}{4} 1 + cos(2θ)dθ

= \frac{1}{2} [θ + \frac{1}{2} sin(2θ)]\frac{π}{3} ; \frac{π}{4}

= \frac{π}{24} + \frac{\sqrt{3}}{8} − \frac{1}{4}

Wow! That was like magic. This is really an amazing technique. Let’s use it again to find the area of an ellipse.

Example 5.3.1. Consider an ellipse with radii a and b, so it goes through (0, ±b) and (±a, 0). An equation for the part of an ellipse in the first quadrant is

y = b\sqrt{1 − \frac{x^{2}}{a^{2}}} = \frac{b}{a}\sqrt{a^{2} − x^{2}}.

Thus the area of the entire ellipse is

A = 4 ∫_{0}^{a} \frac{b}{a}\sqrt{a^{2} − x^{2}} dx.

The 4 is because the integral computes 1/4th of the area of the whole ellipse. So we need to compute

∫_{0}^{a} \sqrt{a^{2} − x^{2}} dx

Obvious substitution with u = a^{2} − x^{2}...? nope. Integration by parts...? nope.

Let’s try inverse substitution. The table above suggests using x = a sin(θ), so dx = a cos(θ)dθ. We get

∫0^{\frac{π}{2}} \sqrt{a^{2} − a^{2} sin^{2}(θ)}dθ = a^{2} ∫0^{\frac{π}{2}} cos^{2}(θ)dθ  (5.3.3)
= \frac{a^{2}}{2} ∫0^{\frac{π}{2}} 1 + cos(2θ)dθ  (5.3.4)
= \frac{a^{2}}{2} [θ + \frac{1}{2} sin(2θ)]0^{\frac{π}{2}}  (5.3.5)
= \frac{a^{2}}{2} · \frac{π}{2} = \frac{πa^{2}}{4} .  (5.3.6)

Thus the area is

4\frac{b}{a} \frac{πa^{2}}{4} = πab.

Consistency Check: If the ellipse is a circle, i.e., a = b = r, this is πr^{2}, which is a well-known formula for the area of a circle.

Remark 5.3.2. Trigonometric substitution is useful for functions that involve \sqrt{a^{2} − x^{2}}, \sqrt{x^{2} + a^{2}}, \sqrt{x^{2} − a}, but not all at once!. See the above table for how to do each.

One other important technique is to use completing the square.

Example 5.3.3. Compute ∫ \sqrt{5 + 4x − x^{2}} dx. We complete the square:

5 + 4x − x^{2} = 5 − (x − 2)^{2} + 4 = 9 − (x − 2)^{2}.

Thus

∫ \sqrt{5 + 4x − x^{2}} dx = ∫ \sqrt{9 − (x − 2)^{2}} dx.

We do a usual substitution to get rid of the x − 2. Let u = x − 2, so du = dx. Then

∫ \sqrt{9 − (x − 2)^{2}} dx = ∫ \sqrt{9 − y^{2}} dy.

Now we have an integral that we can do; it’s almost identical to the previous example, but with a = 9 (and this is an indefinite integral). Let y = 3 sin(θ), so dy = 3 cos(θ)dθ. Then

∫ \sqrt{9 − (x − 2)^{2}} dx = ∫ \sqrt{9 − y^{2}} dy

= ∫ \sqrt{3^{2} − 3^{2} sin^{2}(θ)}3 cos(θ)dθ

= 9 ∫ cos^{2}(θ) dθ

= \frac{9}{2} ∫ 1 + cos(2θ)dθ

= \frac{9}{2} (θ + \frac{1}{2} sin(2θ)) + c

5.3. TRIGONOMETRIC SUBSTITUTIONS 47 Of course, we must transform back into a function in x, and that’s a little tricky. Use that

x − 2 = y = 3 sin(θ),

so that

θ = sin^{−1} (\frac{x − 2}{3}) .

∫ \sqrt{9 − (x − 2)^{2}} dx = ⋯

= \frac{9}{2} (θ + \frac{1}{2} sin(2θ)) + c

= \frac{9}{2} [sin^{−1} (\frac{x − 2}{3}) + sin(θ) cos(θ)] + c

= \frac{9}{2} [sin^{−1} (\frac{x − 2}{3}) + (\frac{x − 2}{3}) · (\frac{\sqrt{9 − (x − 2)^{2}}}{3} )] + c.

Here we use that sin(2θ) = 2 sin(θ) cos(θ). Also, to compute cos(sin^{−1} (\frac{x−2}{3})), we draw a right triangle with side lengths x − 2 and \sqrt{9 − (x − 2)^{2}}, and hypotenuse 3. Example 5.3.4. Compute

∫ \frac{1}{\sqrt{t^{2} − 6t + 13}}dt

To compute this, we complete the square, etc.

∫ \frac{1}{\sqrt{t^{2} − 6t + 13}}dt = ∫ \frac{1}{\sqrt{(t − 3)^{2} + 4}}dt

[[Draw triangle with sides 2 and t − 3 and hypotenuse \sqrt{(t − 3)^{2} + 4}. Then

t − 3 = 2 tan(θ)
\sqrt{(t − 3)^{2} + 4} = 2 sec(θ) = \frac{2}{cos(θ)}
dt = 2 sec^{2}(θ)dθ

Back to the integral, we have

∫ \frac{1}{\sqrt{(t − 3)^{2} + 4}}dt = ∫ \frac{2 sec^{2}(θ)}{2 sec(θ)}dθ

= ∫ sec(θ)dθ

= ln | sec(θ) + tan(θ)| + c

= ln |\sqrt{(t − 3)^{2} + 4}2 + \frac{t − 3}{2}| + c.

5.4 Factoring Polynomials

Quizes today!

How do you compute something like

∫ \frac{x^{2} + 2}{(x − 1)(x + 2)(x + 3)}dx?

So far you have no method for doing this. The trick (which is called partial fraction decomposition), is to write

∫ \frac{x^{2} + 2}{x^{3} + 4x^{2} + x − 6}dx = ∫ \frac{1}{4(x − 1)} − \frac{2}{x + 2} + \frac{11}{4(x + 3)}dx  (5.4.1)

The integral on the right is then easy to do (the answer involves ln’s).

But how on earth do you right the rational function on the left hand side as a sum of the nice terms of the right hand side? Doing this is called “partial fraction decomposition”, and it is a fundamental idea in mathematics. It relies on our ability to factor polynomials and saolve linear equations. As a first hint, notice that

x^{3} + 4x^{2} + x − 6 = (x − 1) · (x + 2) · (x + 3),

so the denominators in the decomposition correspond to the factors of the denominator.

Before describing the secret behind (5.4.1), we’ll discuss some background about how polynomials and rational functions work.

Theorem 5.4.1 (Fundamental Theorem of Algebra). If f(x) = a_{n}x^{n}+⋯ a_{1}x+a_{0} is a polynomial, then there are complex numbers c, α_{1}, … α_{n} such that

f(x) = c(x − α_{1})(x − α_{2}) ⋯ (x − α_{n}).

Example 5.4.2. For example,

3x^{2} + 2x − 1 = 3 · (x − \frac{1}{3}) · (x + 1).

And

(x^{2} + 1) = (x + i)^{2} · (x − i)^{2}.

If f(x) is a polynomial, the roots α of f correspond to the factors of f. Thus if

f(x) = c(x − α_{1})(x − α_{2}) ⋯ (x − α_{n}),

then f(α_{i}) = 0 for each i (and nowhere else).

Definition 5.4.3 (Multiplicity of Zero). The multiplicity of a zero α of f(x) is the number of times that (x − α) appears as a factor of f.

For example, if f(x) = 7(x−2)^{99}·(x+17)^{5}·(x−π)^{2}, then 2 is a zero with multiplicity 99, π is a zero with multiplicity 2, and −1 is a “zero multiplicity 0”.

5.5. INTEGRATION OF RATIONAL FUNCTIONS USING PARTIAL FRACTIONS49

Definition 5.4.4 (Rational Function). A rational function is a quotient

f(x) = \frac{g(x)}{h(x)},

where g(x) and h(x) are polynomials.

For example,

f(x) = \frac{x^{10}}{(x − i)^{2}(x + π)(x − 3)^{3}}  (5.4.2)

is a rational function. Definition 5.4.5 (Pole). A pole of a rational function f(x) is a complex number α such that |f(x)| is unbounded as x → α.

For example, for (5.4.2) the poles are at i, π, and 3. They have multiplicity 2, 1, and 3, respectively.

5.5 Integration of Rational Functions Using Partial Fractions

Today: 7.4: Integration of rational functions and Supp. 4: Partial fraction expansion Next: 7.7: Approximate integration

Our goal today is to compute integrals of the form

∫ \frac{P (x)}{Q(x)}dx

by decomposing f = \frac{P (x)}{Q(x)}. This is called partial fraction expansion. Theorem 5.5.1 (Fundamental Theorem of Algebra over the Real Numbers). A real polynomial of degree n ≥ 1 can be factored as a constant times a product of linear factors x − a and irreducible quadratic factors x^{2} + bx + c.

Note that x^{2} + bx + c = (x − α)(x − ᾱ), where α = z + iw, ᾱ = z − iw are complex conjugates.

Types of rational functions f(x) = \frac{P (x)}{Q(x)}. To do a partial fraction expansion, first make sure deg(P (x)) < deg(Q(x)) using long division. Then there are four possible situation, each of increasing generality (and difficulty):

1. Q(x) is a product of distinct linear factors;

2. Q(x) is a product of linear factors, some of which are repeated;

3. Q(x) is a product of distinct irreducible quadratic factors, along with linear factors some of which may be repeated; and,

4. Q(x) is has repeated irreducible quadratic factors, along with possibly some linear factors which may be repeated.

The general partial fraction expansion theorem is beyond the scope of this course. However, you might find the following special case and its proof interesting.

Theorem 5.5.2. Suppose p, q_{1} and q_{2} are polynomials that are relatively prime (have no factor in common). Then there exists polynomials α_{1} and α_{2} such that

\frac{p}{q_{1}q_{2}} = \frac{α_{1}}{q_{1}} + \frac{α_{2}}{q_{2}} .

Proof. Since q_{1} and q_{2} are relatively prime, using the Euclidean algorithm (long division), we can find polynomials s_{1} and s_{2} such that

1 = s_{1}q_{1} + s_{2}q_{2}.

Dividing both sides by q_{1}q_{2} and multiplying by p yields

\frac{p}{q_{1}q_{2}} = \frac{α_{1}}{q_{1}} + \frac{α_{2}}{q_{2}} ,

which completes the proof.

Example 5.5.3. Compute

∫ \frac{x^{3} − 4x − 10}{x^{2} − x − 6}dx.

First do long division. Get quotient of x + 1 and remainder of 3x − 4. This means that

\frac{x^{3} − 4x − 10}{x^{2} − x − 6} = x + 1 + \frac{3x − 4}{x^{2} − x − 6}.

Since we have distinct linear factors, we know that we can write

f(x) = \frac{3x − 4}{x^{2} − x − 6} = \frac{A}{x − 3} + \frac{B}{x + 2},

for real numbers A, B. A clever way to find A, B is to substitute appropriate values in, as follows. We have

f(x)(x − 3) = \frac{3x − 4}{x + 2} = A + B · \frac{x − 3}{x + 2}.

Setting x = 3 on both sides we have (taking a limit):

A = f(3) = \frac{3 · 3 − 4}{3 + 2} = \frac{5}{5} = 1.

Likewise, we have

B = f(−2) = \frac{3 · (−2) − 4}{−2 − 3} = 2.

Thus

∫ \frac{x^{3} − 4x − 10}{x^{2} − x − 6}dx = ∫ x + 1 + \frac{1}{x − 3} + \frac{2}{x + 2}

= \frac{x^{2} + 2x}{2} + 2 log |x + 2| + log |x − 3| + c.

5.5. INTEGRATION OF RATIONAL FUNCTIONS USING PARTIAL FRACTIONS51

Example 5.5.4. Compute the partial fraction expansion of \frac{x^{2}}{(x−3)(x+2)^{2}} . By the partial fraction theorem, there are constants A, B, C such that

\frac{x^{2}}{(x − 3)(x + 2)^{2}} = \frac{A}{x − 3} + \frac{B}{x + 2} + \frac{C}{(x + 2)^{2}} .

Note that there’s no possible way this could work without the (x + 2)^{2} term, since otherwise the common denominator would be (x − 3)(x + 2). We have

A = [f(x)(x − 3)]_{x=3} = \frac{x^{2}}{(x + 2)^{2}} |_{x=3} = \frac{9}{25},
C = [f(x)(x + 2)^{2}]_{x=−2} = −\frac{4}{5}.

This method will not get us B! For example,

f(x)(x + 2) = \frac{x^{2}}{(x − 3)(x + 2)} = A · \frac{x + 2}{x − 3} + B + \frac{C}{x + 2}.

While true this is useless.

Instead, we use that we know A and C, and evaluate at another value of x, say 0.

f(0) = 0 = \frac{\frac{9}{25}}{−3} + \frac{B}{2} + \frac{−\frac{4}{5}}{(2)^{2}} ,

so B = \frac{16}{25}. Thus finally,

∫ \frac{x^{2}}{(x − 3)(x + 2)^{2}} = ∫ \frac{\frac{9}{25}}{x − 3} + \frac{\frac{16}{25}}{x + 2} + \frac{−\frac{4}{5}}{(x + 2)^{2}} .

= \frac{9}{25} ln |x − 3| + \frac{16}{25} ln |x + 2| + \frac{\frac{4}{5}}{x + 2} + constant.

Example 5.5.5. Let’s compute ∫ \frac{1}{x^{3}+1}dx. Notice that x + 1 is a factor, since −1 is a root. We have

x^{3} + 1 = (x + 1) (x^{2} − x + 1) .

There exist constants A, B, C such that

\frac{1}{x^{3} + 1} = \frac{A}{x + 1} + \frac{Bx + C}{x^{2} − x + 1}.

Then

A = f(x)(x + 1)|_{x=−1} = \frac{1}{3}.

You could find B, C by factoring the quadratic over the complex numbers and getting complex number answers. Instead, we evaluate x at a couple of values. For example, at x = 0 we get

f(0) = 1 = \frac{1}{3} + \frac{C}{1} ,

so C = \frac{2}{3}. Next, use x = 1 to get B.

f(1) = \frac{1}{1^{3} + 1} = \frac{\frac{1}{3}}{(1) + 1} + \frac{B(1) + \frac{2}{3}}{(1)^{2} − (1) + 1}
\frac{1}{2} = \frac{1}{6} + B + \frac{2}{3},

52 CHAPTER 5. INTEGRATION TECHNIQUES so

B = \frac{3}{6} − \frac{1}{6} − \frac{4}{6} = −\frac{1}{3}.

Finally,

∫ \frac{1}{x^{3} + 1}dx = ∫ \frac{\frac{1}{3}}{x + 1} − \frac{\frac{1}{3}x}{x^{2} − x − 1} + \frac{\frac{2}{3}}{x^{2} − x − 1}dx

= \frac{1}{3} ln |x + 1| − \frac{1}{3} ∫ \frac{x − 2}{x^{2} − x + 1}dx

It remains to compute

∫ \frac{x − 2}{x^{2} − x + 1}dx.

First, complete the square to get

x^{2} − x + 1 = (x − \frac{1}{2})^{2} + \frac{3}{4}.

Let u = (x − \frac{1}{2}), so du = dx and x = u + \frac{1}{2}. Then

∫ \frac{u − \frac{3}{2}}{u^{2} + \frac{3}{4}} du = ∫ \frac{udu}{u^{2} + \frac{3}{4}} − \frac{3}{2} ∫ \frac{1}{u^{2} + (\frac{\sqrt{3}}{2})^{2}} du

= \frac{1}{2} ln |u^{2} + \frac{3}{4}| − \frac{3}{2} · \frac{2}{\sqrt{3}} tan^{−1} (\frac{2u}{\sqrt{3}}) + c

= \frac{1}{2} ln |x^{2} − x + 1| − \sqrt{3} tan^{−1} (\frac{2x − 1}{\sqrt{3}}) + c

Finally, we put it all together and get

∫ \frac{1}{x^{3} + 1}dx = \frac{1}{3} ln |x + 1| − \frac{1}{3} ∫ \frac{x − 2}{x^{2} − x + 1}dx

= \frac{1}{3} ln |x + 1| − \frac{1}{6} ln |x^{2} − x + 1| + \frac{\sqrt{3}}{3} tan^{−1} (\frac{2x − 1}{\sqrt{3}}) + c

Discuss second quiz problem. Problem: Compute ∫ cos^{2}(x)e^{−3x}dx using complex exponentials. The answer is

− \frac{1}{6} e^{−3x} + \frac{1}{13} e^{−3x} sin(2x) − \frac{3}{26} e^{−3x} cos(2x) + c.

Here’s how to get it.

∫ cos^{2}(x)e^{−3x}dx = ∫ \frac{e^{2ix} + 2 + e^{−2ix}}{4} e^{−3x}dx

= \frac{1}{4} [ \frac{e^{(2i−3)x}}{2i − 3} − \frac{2}{3} e^{−3x} + \frac{e^{(−2i−3)x}}{−2i − 3} ] + c

= − \frac{1}{6} e^{−3x} + \frac{e^{−3x}}{4} [ \frac{e^{2ix}}{2i − 3} − \frac{e^{−2ix}}{2i + 3} ] + c

Simplify the inside part requires some imagination:

\frac{e^{2ix}}{2i − 3} − \frac{e^{−2ix}}{2i + 3} = \frac{1}{13} (−2ie^{2ix} − 3e^{2ix} + 2ie^{−2ix} − 3e^{−2ix})

= \frac{1}{13} (4 sin(2x) − 6 cos(2x))

5.6 Approximating Integrals

Today: 7.7 – approximating integrals Friday: Third QUIZ and 7.8 – improper integrals

Problem: Compute

∫_{0}^{1} e^{−\sqrt{x}}dx.

Hmmm... Any ideas?

Today we will revisit Riemann sums in the context of finding numerical approximations to integrals, which we might not be able to compute exactly. Recall that if y = f(x) then

∫_{a}^{b} f(x)dx = lim_{n→∞} ∑_{i=1}^{n} f(x_{i}^{∗})Δx.

The fundamental theorem of calculus says that if we can find an antiderivative of f(x), then we can compute ∫_{a}^{b} f(x)dx exactly. But antiderivatives can be either (1) hard to find, and sometimes worse (2) impossible to find. However, we can always approximate ∫_{a}^{b} f(x)dx (possibly very badly).

For example, we could use Riemann sums to approximate ∫_{a}^{b} f(x)dx, say using left endpoints. This gives the approximation:

L_{n} = ∑_{i=0}^{n−1} f(x_{i})Δx; x_{0}, …, x_{n−1} left endpoints

Using rightpoints gives

R_{n} = ∑_{i=1}^{n} f(x_{i})Δx; x_{1}, …, x_{n} right endpoints

Using midpoints gives

M_{n} = ∑_{i=1}^{n} f(\overline{x}_{i})Δx; \overline{x}_{1}, …, \overline{x}_{n} midpoints,

where \overline{x}_{i} = (x_{i−1} + x_{i})/2. The midpoint is typically (but not always) much better than the left or right endpoint approximations.

Yet another possibility is the trapezoid approximation, which is

T_{n} = \frac{1}{2}(L_{n} + R_{n});

this is just the average of the left and right approximations.

Question 5.6.1. But wouldn’t the trapezoid and midpoint approximations be the same?–certainly not (see example below); interestingly, very often the midpoint approximation is better.

Simpson’s approximation

S_{2n} = \frac{1}{3}T_{n} + \frac{2}{3}M_{n}

gives the area under best-fit parabolas that approximate our function on each interval. The proof of this would be interesting but takes too much time for this course.

Many functions have no elementary antiderivatives:

\sqrt{1 + x^{3}}, e^{−x^{2}}, \frac{1}{log(x)}, \frac{sin(x)}{x}, ….

NOTE – they do have antiderivatives; the problem is just that there is no simple formula for them. Why are there no elementary antiderivatives?

Some of these functions are extremly important. For example, the integrals ∫_{−∞}^{x} e^{−u^{2}/2}du are extremely important in probability, even though there is no simple formula for the antiderivative.

If you are doing scientific research you might spend months tediously computing values of some function f(x), for which no formula is known.

Example 5.6.2. Compute ∫_{0}^{1} e^{−\sqrt{x}}dx.

1. Trapezoid with n = 4

2. Midpoint with n = 4

3. Simpson’s with with 2n = 8

The following is a table of the values of f(x) at k/8 for k = 0, …, 8.

Figure 5.6.1: Graph of e^{−\sqrt{x}}

\begin{matrix}k/8 & f(k/8) \\ 0 & V_{0} = 1.000000 \\ \frac{1}{8} & V_{1} = 0.702189 \\ \frac{1}{4} & V_{2} = 0.606531 \\ \frac{3}{8} & V_{3} = 0.542063 \\ \frac{1}{2} & V_{4} = 0.493069 \\ \frac{5}{8} & V_{5} = 0.453586 \\ \frac{3}{4} & V_{6} = 0.420620 \\ \frac{7}{8} & V_{7} = 0.392423 \\ 1 & V_{8} = 0.367879 \end{matrix}

L_{4} = (V_{0} + V_{2} + V_{4} + V_{6}) · \frac{1}{4} = 0.630055

R_{4} = (V_{2} + V_{4} + V_{6} + V_{8}) · \frac{1}{4} = 0.472025

M_{4} = (V_{1} + V_{3} + V_{5} + V_{7}) · \frac{1}{4} = 0.522565

T_{4} = \frac{1}{2}(L_{4} + R_{4}) = 0.551040.

S_{8} = \frac{1}{3}T_{4} + \frac{2}{3}M_{4} = 0.532057

Maxima gives 0.5284822353142306 and Mathematica gives 0.528482. Note that Simpsons’s is the best; it better be, since we worked the hardest to get it!

Method Error
|L_{4} − I| 0.101573
|R_{4} − I| 0.056458
|M_{4} − I| 0.005917
|T_{4} − I| 0.022558
|S_{8} − I| 0.003575

5.7 Improper Integrals

Exam 2 Wed Mar 1: 7pm-7:50pm in ?? Today: 7.8 Improper Integrals Monday – president’s day holiday (and almost my bday) Next — 11.1 sequences

Example 5.7.1. Make sense of ∫_{0}^{∞} e^{−x}dx. The integrals

∫_{0}^{t} e^{−x}dx

make sense for each real number t. So consider

lim_{t→∞} ∫_{0}^{t} e^{−x}dx = lim_{t→∞}[−e^{−x}]_{0}^{t} = 1.

Geometrically the area under the whole curve is the limit of the areas for finite values of t.

Figure 5.7.1: Graph of e^{−x}

Example 5.7.2. Consider ∫_{0}^{1} \frac{1}{\sqrt{1−x^{2}}} dx (see Figure 5.7.2). Problem: The denominator of the integrand tends to 0 as x approaches the upper endpoint. Define

∫_{0}^{1} \frac{1}{\sqrt{1 − x^{2}}} dx = lim_{t→1^{−}} ∫_{0}^{t} \frac{1}{\sqrt{1 − x^{2}}} dx
= lim_{t→1^{−}}(sin^{−1}(t) − sin^{−1}(0)) = sin^{−1}(1) = \frac{π}{2}

Here t → 1^{−} means the limit as t tends to 1 from the left.

Figure 5.7.2: Graph of \frac{1}{\sqrt{1−x^{2}}}

Example 5.7.3. There can be multiple points at which the integral is improper. For example, consider

∫_{−∞}^{∞} \frac{1}{1 + x^{2}} dx.

A crucial point is that we take the limit for the left and right endpoints independently. We use the point 0 (for convenience only!) to break the integral in half.

∫_{−∞}^{∞} \frac{1}{1 + x^{2}} dx = ∫_{−∞}^{0} \frac{1}{1 + x^{2}} dx + ∫_{0}^{∞} \frac{1}{1 + x^{2}} dx

= lim_{s→−∞} ∫_{s}^{0} \frac{1}{1 + x^{2}} dx + lim_{t→∞} ∫_{0}^{t} \frac{1}{1 + x^{2}} dx

= lim_{s→−∞}(tan^{−1}(0) − tan^{−1}(s)) + lim_{t→∞}(tan^{−1}(t) − tan^{−1}(0))

= lim_{s→−∞}(− tan^{−1}(s)) + lim_{t→∞}(tan^{−1}(t))

= −\frac{−π}{2} + \frac{π}{2} = π.

The graph of tan^{−1}(x) is in Figure 5.7.3.

Example 5.7.4. Brian Conrad’s paper on impossibility theorems for elementary integration begins: “The Central Limit Theorem in probability theory assigns a special significance to the cumulative area function

Φ(x) = \frac{1}{\sqrt{2π}} ∫_{−∞}^{x} e^{−u^{2}}udu

under the Gaussian bell curve

y = \frac{1}{\sqrt{2π}} · e^{−u^{2}/2}.

It is known that Φ(∞) = 1.”

Figure 5.7.3: Graph of tan^{−1}(x)

What does this last statement mean? It means that

lim_{t→∞} \frac{1}{\sqrt{2π}} ∫_{−t}^{0} e^{−u^{2}}udu + lim_{x→∞} \frac{1}{\sqrt{2π}} ∫_{0}^{x} e^{−u^{2}}udu = 1.

Example 5.7.5. Consider ∫_{−∞}^{∞} xdx. Notice that

∫_{−∞}^{∞} xdx = lim_{s→−∞} ∫_{s}^{0} xdx + lim_{t→∞} ∫_{0}^{t} xdx.

This diverges since each factor diverges independtly. But notice that

lim_{t→∞} ∫_{−t}^{t} xdx = 0.

This is not what ∫_{−∞}^{∞} xdx means (in this course – in a later course it could be interpreted this way)! This illustrates the importance of treating each bad point separately (since Example 5.7.3) doesn’t.

Example 5.7.6. Consider ∫_{−1}^{1} \frac{1}{\sqrt[3]{x}}dx. We have

∫_{−1}^{1} \frac{1}{\sqrt[3]{x}}dx = lim_{s→0^{−}} ∫_{−1}^{s} x^{− \frac{1}{3}} dx + lim_{t→0^{+}} ∫_{t}^{1} x^{− \frac{1}{3}} dx

= lim_{s→0^{−}} (\frac{3}{2}s^{\frac{2}{3}} − \frac{3}{2}) + lim_{t→0^{+}} (\frac{3}{2} − \frac{3}{2}t^{\frac{2}{3}} ) = 0.

This illustrates how to be careful and break the function up into two pieces when there is a discontinuity.

NOTES for 2006-02-22

Midterm 2: Wednesday, March 1, 2006, at 7pm in Pepper Canyon 109 Today: 7.8: Comparison of Improper integrals 11.1: Sequences Next 11.2 Series

Example 5.7.7. Compute ∫_{−1}^{3} \frac{1}{x−2}dx. A few weeks ago you might have done this:

∫_{−1}^{3} \frac{1}{x − 2}dx = [ln |x − 2|]_{−1}^{3} = ln(3) − ln(1) (totally wrong!)

This is not valid because the function we are integrating has a pole at x = 2 (see Figure 5.7.4). The integral is improper, and is only defined if both the following limits exists:

lim_{t→2^{−}} ∫_{−1}^{t} \frac{1}{x − 2}dx  and  lim_{t→2^{+}} ∫_{t}^{3} \frac{1}{x − 2}dx.

However, the limits diverge, e.g.,

lim_{t→2^{+}} ∫_{t}^{3} \frac{1}{x − 2}dx = lim_{t→2^{+}}(ln |1| − ln |t − 2|) = − lim_{t→2^{+}} ln |t − 2| = −∞.

Thus ∫_{−1}^{3} \frac{1}{x−2}dx is divergent.

Figure 5.7.4: Graph of \frac{1}{x−2}

5.7.1 Convergence, Divergence, and Comparison

In this section we discuss using comparison to determine if an improper integrals converges or diverges. Recall that if f and g are continuous functions on an interval [a, b] and g(x) ≤ f(x), then

∫_{a}^{b} g(x)dx ≤ ∫_{a}^{b} f(x)dx.

This observation can be incredibly useful in determining whether or not an improper integral converges.

Not only does this technique help in determing whether integrals converge, but it also gives you some information about their values, which is often much easier to obtain than computing the exact integral.

Theorem 5.7.8 (Comparison Theorem (special case)). Let f and g be continuous functions with 0 ≤ g(x) ≤ f(x) for x ≥ a.

1. If ∫_{a}^{∞} f(x)dx converges, then ∫_{a}^{∞} g(x)dx converges.

2. If ∫_{a}^{∞} g(x)dx diverges then ∫_{a}^{∞} f(x)dx diverges.

Proof. Since g(x) ≥ 0 for all x, the function

G(t) = ∫_{a}^{t} g(x)dx

is a non-decreasing function. If ∫_{a}^{∞} f(x)dx converges to some value B, then for any t ≥ a we have

G(t) = ∫_{a}^{t} g(x)dx ≤ ∫_{a}^{t} f(x)dx ≤ B.

Thus in this case G(t) is a non-decreasing function bounded above, hence the limit lim_{t→∞} G(t) exists. This proves the first statement.

Likewise, the function

F (t) = ∫_{a}^{t} f(x)dx

is also a non-decreasing function. If ∫_{a}^{∞} g(x)dx diverges then the function G(t) defined above is still non-decreasing and lim_{t→∞} G(t) does not exist, so G(t) is not bounded. Since g(x) ≤ f(x) we have G(t) ≤ F (t) for all ≥ a, hence F (t) is also unbounded, which proves the second statement.

The theorem is very intuitive if you think about areas under a graph. “If the bigger integral converges then so does the smaller one, and if the smaller one diverges so does the bigger ones.”

Example 5.7.9. Does ∫_{0}^{∞} \frac{cos^{2}(x)}{1+x^{2}}dx converge? Answer: YES.

Figure 5.7.5: Graph of \frac{cos(x)^{2}}{1+x^{2}} and \frac{1}{1+x^{2}}

Since 0 ≤ cos^{2}(x) ≤ 1, we really do have

0 ≤ \frac{cos^{2}(x)}{1 + x^{2}} ≤ \frac{1}{1 + x^{2}} ,

as illustrated in Figure 5.7.5. Thus

∫_{0}^{∞} \frac{1}{1 + x^{2}} dx = lim_{t→∞} tan^{−1}(t) = \frac{π}{2} ,

so ∫_{0}^{∞} \frac{cos^{2}(x)}{1+x^{2}}dx converges.

But why did we use \frac{1}{1+x^{2}} ? It’s a guess that turned out to work. You could have used something else, e.g., \frac{c}{x^{2}} for some constant c. This is an illustration of how in mathematics sometimes you have to use your imagination or guess and see what happens. Don’t get anxious—instead, relax, take a deep breath and explore.

For example, alternatively we could have done the following:

∫_{1}^{∞} \frac{cos^{2}(x)}{1 + x^{2}}dx ≤ ∫_{1}^{∞} \frac{1}{x^{2}} dx = 1,

and this works just as well, since ∫_{0}^{1} \frac{cos^{2}(x)}{1+x^{2}}dx converges (as \frac{cos^{2}(x)}{1+x^{2}} is continuous).

Example 5.7.10. Consider ∫_{0}^{∞} \frac{1}{x+e^{−2x}} dx. Does it converge or diverge? For large values of x, the term e^{−2x} very quickly goes to 0, so we expect this to diverge, since ∫_{1}^{∞} \frac{1}{x}dx diverges. For x ≥ 0, we have e^{−2x} ≤ 1, so for all x we have

\frac{1}{x + e^{−2x}} ≥ \frac{1}{x + 1} (verify by cross multiplying).

But

∫_{1}^{∞} \frac{1}{x + 1}dx = lim_{t→∞}[ln(x + 1)]_{1}^{t} = ∞

Thus ∫_{0}^{∞} \frac{1}{x+e^{−2x}} dx must also diverge.

Note that there is a natural analogue of Theorem 5.7.8 for integrals of functions that “blow up” at a point, but we will not state it formally.

Example 5.7.11. Consider

∫_{0}^{1} \frac{e^{−x}}{\sqrt{x}} dx = lim_{t→0^{+}} ∫_{t}^{1} \frac{e^{−x}}{\sqrt{x}} dx.

We have

\frac{e^{−x}}{\sqrt{x}} ≤ \frac{1}{\sqrt{x}}.

(Coming up with this comparison might take some work, imagination, and trial and error.) We have

∫_{0}^{1} \frac{e^{−x}}{\sqrt{x}} dx ≤ ∫_{0}^{1} \frac{1}{\sqrt{x}}dx = lim_{t→0^{+}} 2\sqrt{1} − 2\sqrt{t} = 2.

thus ∫_{0}^{1} \frac{e^{−x}}{\sqrt{x}} dx converges, even though we haven’t figured out its value. We just know that it is ≤ 2. (In fact, it is 1.493648265 . . ..)

What if we found a function that is bigger than \frac{e^{−x}}{\sqrt{x}} and its integral diverges?? So what! This does nothing for you. Bzzzt. Try again.

Example 5.7.12. Consider the integral

∫_{0}^{1} \frac{e^{−x}}{x} dx.

This is an improper integral since f(x) = \frac{e^{−x}}{x} has a pole at x = 0. Does it converge? NO. On the interal [0, 1] we have e^{−x} ≥ e^{−1}. Thus

lim_{t→0^{+}} ∫_{t}^{1} \frac{e^{−x}}{x} dx ≥ lim_{t→0^{+}} ∫_{t}^{1} \frac{e^{−1}}{x} dx

= e^{−1} · lim_{t→0^{+}} ∫_{t}^{1} \frac{1}{x}dx

= e^{−1} · lim_{t→0^{+}} ln(1) − ln(t) = +∞

Thus ∫_{0}^{1} \frac{e^{−x}}{x} dx diverges.

Sequences and Series

Exam 2: Wednesday at 7pm in PCYN 109 Today: Sequence and Series (§11.1-§11.2) Next: §11.3 Integral Test, §11.4 Comparison Test

Our main goal in this chapter is to gain a working knowledge of power series and Taylor series of function with just enough discussion of the details of convergence to get by.

6.1 Sequences

What is

lim_{n→∞} \frac{1}{2^{n}}?

You may have encountered sequences long ago in earlier courses and they seemed very difficult. You know much more mathematics now, so they will probably seem easier. On the other hand, we’re going to go very quickly.

We will completely skip several topics from Chapter 11. I will try to make what we skip clear. Note that the homework has been modified to reflect the omitted topics.

A sequence is an ordered list of numbers. These numbers may be real, complex, etc., etc., but in this book we will focus entirely on sequences of real numbers. For example,

\frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \frac{1}{16}, \frac{1}{32}, \frac{1}{64}, \frac{1}{128}, …, \frac{1}{2^{n}} , …

Since the sequence is ordered, we can view it as a function with domain the natural numbers = 1, 2, 3, . . ..

Definition 6.1.1 (Sequence). A sequence {a_{n}} is a function a : ℕ → ℝ that takes a natural number n to a_{n} = a(n). The number a_{n} is the nth term.

For example,

a(n) = a_{n} = \frac{1}{2^{n}} ,

which we write as \{\frac{1}{2^{n}} \}. Here’s another example:

(b_{n})_{n=1}^{∞} = (\frac{n}{n + 1})_{n=1}^{∞} = \frac{1}{2}, \frac{2}{3}, \frac{3}{4}, …

Example 6.1.2. The Fibonacci sequence (F_{n})_{n=1}^{∞} is defined recursively as follows:

F_{1} = 1, F_{2} = 1, F_{n} = F_{n−2} + F_{n−1} for n ≥ 3.

Let’s return to the sequence (\frac{1}{2^{n}} )_{n=1}^{∞}. We write lim_{n→∞} \frac{1}{2^{n}} = 0, since the terms get arbitrarily small.

Definition 6.1.3 (Limit of sequence). If (a_{n})_{n=1}^{∞} is a sequence then that sequence converges to L, written lim_{n→∞} a_{n} = L, if a_{n} gets arbitrarily close to L as n get sufficiently large. Secret rigorous definition: For every ε > 0 there exists B such that for n ≥ B we have |a_{n} − L| < ε.

This is exactly like what we did in the previous course when we considered limits of functions. If f(x) is a function, the meaning of lim_{x→∞} f(x) = L is essentially the same. In fact, we have the following fact.

Proposition 6.1.4. If f is a function with lim_{x→∞} f(x) = L and (a_{n})_{n=1}^{∞} is the sequence given by a_{n} = f(n), then lim_{n→∞} a_{n} = L.

As a corollary, note that this implies that all the facts about limits that you know from functions also apply to sequences!

Example 6.1.5.

lim_{n→∞} \frac{n}{n + 1} = lim_{x→∞} \frac{x}{x + 1} = 1

Example 6.1.6. The converse of Proposition 6.1.4 is false in general, i.e., knowing the limit of the sequence converges doesn’t imply that the limit of the function converges. We have lim_{n→∞} cos(2πn) = 1, but lim_{x→∞} cos(2πx) diverges. The converse is OK if the limit involving the function converges.

Example 6.1.7. Compute lim_{n→∞} \frac{n^{3} + n + 5}{17n^{3} − 2006n + 15}. Answer: \frac{1}{17}.

6.2 Series

What is

\frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \frac{1}{32} + …?

What is

\frac{1}{3} + \frac{1}{9} + \frac{1}{27} + \frac{1}{81} + \frac{1}{243} + …?

What is

\frac{1}{1} + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \frac{1}{25} + …?

Consider the following sequence of partial sums:

a_{N} = ∑_{n=1}^{N} \frac{1}{2^{n}} = \frac{1}{2} + \frac{1}{4} + ⋯ + \frac{1}{2^{N}} .

Can we compute

∑_{n=1}^{∞} \frac{1}{2^{n}}?

These partial sums look as follows:

a_{1} = \frac{1}{2},  a_{2} = \frac{3}{4},  a_{10} = \frac{1023}{1024},  a_{20} = \frac{1048575}{1048576}

It looks very likely that ∑_{n=1}^{∞} \frac{1}{2^{n}} = 1, if it makes any sense. But does it?

In a moment we will define

∑_{n=1}^{∞} \frac{1}{2^{n}} = lim_{N→∞} ∑_{n=1}^{N} \frac{1}{2^{n}} = lim_{N→∞} a_{N}.

A little later we will show that a_{N} = \frac{2^{N} −1}{2^{N}}, hence indeed ∑_{n=1}^{∞} \frac{1}{2^{n}} = 1.

Definition 6.2.1 (Sum of series). If (a_{n})_{n=1}^{∞} is a sequence, then the sum of the series is

∑_{n=1}^{∞} a_{n} = lim_{N→∞} ∑_{n=1}^{N} a_{n} = lim_{N→∞} s_{N}

provided the limit exists. Otherwise we say that ∑_{n=1}^{∞} a_{n} diverges.

Example 6.2.2 (Geometric series). Consider the geometric series ∑_{n=1}^{∞} ar^{n−1} for a ≠ 0. Then

s_{N} = ∑_{n=1}^{N} ar^{n−1} = \frac{a(1 − r^{N})}{1 − r}.

To see this, multiply both sides by 1 − r and notice that all the terms in the middle cancel out. For what values of r does lim_{N→∞} \frac{a(1−r^{N})}{1−r} converge? If |r| < 1, then lim_{N→∞} r^{N} = 0 and

lim_{N→∞} \frac{a(1 − r^{N})}{1 − r} = \frac{a}{1 − r} .

If |r| > 1, then lim_{N→∞} r^{N} diverges, so ∑_{n=1}^{∞} ar^{n−1} diverges. If r = ±1, it’s clear since a ≠ 0 that the series also diverges (since the partial sums are s_{N} = ±Na).

For example, if a = 1 and r = \frac{1}{2}, we get

∑_{n=1}^{∞} ar^{n−1} = \frac{1}{1 − \frac{1}{2}} ,

as claimed earlier.

6.3 The Integral and Comparison Tests

Midterm Exam 2: Wednesday March 1 at 7pm in PCYNH 109 (up to last lecture) Today: §7.3–7.4: Integral and comparison tests Next: §7.6: Absolute convergence; ratio and root tests Quiz 4 (last quiz): Friday March 10. Final exam: Wednesday, March 22, 7-10pm in PCYNH 109.

What is ∑_{n=1}^{∞} \frac{1}{n^{2}} ? What is ∑_{n=1}^{∞} \frac{1}{n}?

Recall that Section 6.2 began by asking for the sum of several series. We found the first two sums (which were geometric series) by finding an exact formula for the sum s_{N} of the first N terms. The third series was

A = ∑_{n=1}^{∞} \frac{1}{n^{2}} = \frac{1}{1} + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \frac{1}{25} + ….  (6.3.1)

It is difficult to find a nice formula for the sum of the first n terms of this series (i.e., I don’t know how to do it).

Remark 6.3.1. Since I’m a number theorist, I can’t help but make some further remarks about sums of the form (6.3.1). In general, for any s > 1 one can consider the sum

ζ(s) = ∑_{n=1}^{∞} \frac{1}{n^{s}} .

The number A that we are interested in above is thus ζ(2). The function ζ(s) is called the Riemann zeta function. There is a natural (but complicated) way of extending ζ(s) to a (differentiable) function on all complex numbers with a pole at s = 1. The Riemann Hypothesis asserts that if s is a complex number and ζ(s) = 0 then either s is an even negative integer or s = \frac{1}{2} + bi for some real number b. This is probably the most famous unsolved problems in mathematics (e.g., it’s one of the Clay Math Institute million dollar prize problems). Another famous open problem is to show that ζ(3) is not a root of any polynomial with integer coefficients (it is a theorem of Apeéry that zeta(3) is not a fraction).

The function ζ(s) is incredibly important in mathematics because it governs the properties of prime numbers. The Euler product representation of ζ(s) gives a hint as to why this is the case:

ζ(s) = ∑_{n=1}^{∞} \frac{1}{n^{s}} = ∏_{primes p} (\frac{1}{1 − p^{−s}} ) .

To see that this product equality holds when s is real with Re(s) > 1, use Example 6.2.2 with r = p^{−s} and a = 1 from the previous lecture. We have

\frac{1}{1 − p^{−s}} = 1 + p^{−s} + p^{−2s} + · · · .

Thus

∏_{primes p} (\frac{1}{1 − p^{−s}} ) = ∏_{primes p} (1 + \frac{1}{p^{s}} + \frac{1}{p^{2s}} + ⋯)

= (1 + \frac{1}{2^{s}} + \frac{1}{2^{2s}} + ⋯) · (1 + \frac{1}{3^{s}} + \frac{1}{3^{2s}} + ⋯) ⋯

= (1 + \frac{1}{2^{s}} + \frac{1}{3^{s}} + \frac{1}{4^{s}} + ⋯)

= ∑_{n=1}^{∞} \frac{1}{n^{s}} ,

where the last line uses the distributive law and that integers factor uniquely as a product of primes.

Finally, Figure 6.3.1 is a graph ζ(x) as a function of a real variable x, and Figure 6.3.2 is a graph of |ζ(s)| for complex s.

Figure 6.3.1: Riemann Zeta Function: f(x) = ∑_{n=1}^{∞} \frac{1}{n^{x}}

This section is how to leverage what you’ve learned so far in this book to say something about sums that are hard (or even “impossibly difficult”) to evaluate exactly. For example, notice (by considering a graph of a step function) that if f(x) = 1/x^{2}, then for positive integer t we have

∑_{n=1}^{t} \frac{1}{n^{2}} ≤ \frac{1}{1^{2}} + ∫_{1}^{t} \frac{1}{x^{2}} dx.

Figure 6.3.2: Absolute Value of Riemann Zeta Function

Thus

∑_{n=1}^{∞} \frac{1}{n^{2}} ≤ \frac{1}{1^{2}} + ∫_{1}^{∞} \frac{1}{x^{2}} dx

= 1 + lim_{t→∞} ∫_{1}^{t} \frac{1}{x^{2}} dx

= 1 + lim_{t→∞} [−\frac{1}{x}]_{1}^{t}

= 1 + lim_{t→∞} [−\frac{1}{t} + \frac{1}{1}] = 2

We conclude that ∑_{n=1}^{∞} converges, since the sequence of partial sums is getting bigger and bigger and is always ≤ 2. And of course we also know something about ∑_{n=1}^{∞} \frac{1}{n^{2}} even though we do not know the exact value: ∑_{n=1}^{∞} \frac{1}{n^{2}} ≤ 2. Using a computer we find that

\begin{matrix}t & ∑{t \atop n=1} \frac{1}{n^{2}} \\ 1 & 1 \\ 2 & \frac{5}{4} = 1.25 \\ 5 & \frac{5269}{3600} = 1.4636\overline{1} \\ 10 & \frac{1968329}{1270080} = 1.54976773117 \\ 100 & 1.63498390018 \\ 1000 & 1.64393456668 \\ 10000 & 1.64483407185 \\ 100000 & 1.6449240669 \end{matrix}

The table is consistent with the fact that ∑_{n=1}^{∞} \frac{1}{n^{2}} converges to a number ≤ 2. In fact Euler was the first to compute ∑_{n=1}^{∞} exactly; he found that the exact value is

\frac{π^{2}}{6} = 1.644934066848226436472415166646025189218949901206798437735557 …

There are many proofs of this fact, but they don’t belong in this book; you can find them on the internet, and are likely to see one if you take more math classes.

We next consider the harmonic series

∑_{n=1}^{∞} \frac{1}{n}.  (6.3.2)

Does it converge? Again by inspecting a graph and viewing an infinite sum as the area under a step function, we have

∑_{n=1}^{∞} \frac{1}{n} ≥ ∫_{1}^{∞} \frac{1}{x}dx

= lim_{t→∞} [ln(x)]_{1}^{t}

= lim_{t→∞} ln(t) − 0 = +∞.

Thus the infinite sum (6.3.2) must also diverge.

We formalize the above two examples as a general test for convergence or divergence of an infinite sum.

Theorem 6.3.2 (Integral Test and Bound). Suppose f(x) is a continuous, positive, decreasing function on [1, ∞) and let a_{n} = f(n) for integers n ≥ 1. Then the series ∑_{n=1}^{∞} a_{n} converges if and only if the integral ∫_{1}^{∞} f(x)dx converges. More generally, for any positive integer k,

∫_{k}^{∞} f(x)dx ≤ ∑_{n=k}^{∞} a_{n} ≤ a_{k} + ∫_{k}^{∞} f(x)dx.  (6.3.3)

The proposition means that you can determine convergence of an infinite series by determining convergence of a corresponding integral. Thus you can apply the powerful tools you know already for integrals to understanding infinite sums. Also, you can use integration along with computation of the first few terms of a series to approximate a series very precisely.

Remark 6.3.3. Sometimes the first few terms of a series are “funny” or the series doesn’t even start at n = 1, e.g.,

∑_{n=4}^{∞} \frac{1}{(n − 3)^{3}} .

In this case use (6.3.3) with any specific k > 1.

Proposition 6.3.4 (Comparison Test). Suppose ∑ a_{n} and ∑ b_{n} are two series with positive terms. If ∑ b_{n} converges and a_{n} ≤ b_{n} for all n. then ∑ a_{n} converges. Likewise, if ∑ b_{n} diverges and a_{n} ≥ b_{n} for all n. then ∑ a_{n} must also diverge.

Example 6.3.5. Does ∑_{n=1}^{∞} \frac{1}{\sqrt{n}} converge? No. We have

∑_{n=1}^{∞} \frac{1}{\sqrt{n}} ≥ ∫_{1}^{∞} \frac{1}{\sqrt{x}}dx = lim_{t→∞}(2\sqrt{t} − 2\sqrt{1}) = +∞

Example 6.3.6. Does ∑_{n=1}^{∞} \frac{1}{n^{2}+1} converge? Let’s apply the comparison test: we have \frac{1}{n^{2}+1} < \frac{1}{n^{2}} for every n, so

∑_{n=1}^{∞} \frac{1}{n^{2} + 1} < ∑_{n=1}^{∞} \frac{1}{n^{2}} .

Alternatively, we can use the integral test, which also gives as a bonus an upper and lower bound on the sum. Let f(x) = 1/(1 + x^{2}). We have

∫_{1}^{∞} \frac{1}{1 + x^{2}} dx = lim_{t→∞} ∫_{1}^{t} \frac{1}{1 + x^{2}} dx

= lim_{t→∞} tan^{−1}(t) − \frac{π}{4} = \frac{π}{2} − \frac{π}{4} = \frac{π}{4}

Thus the sum converges. Moreover, taking k = 1 in Theorem 6.3.2 we have

\frac{π}{4} ≤ ∑_{n=1}^{∞} \frac{1}{n^{2} + 1} ≤ \frac{1}{2} + \frac{π}{4} .

the actual sum is 1.07 …, which is much different than ∑ \frac{1}{n^{2}} = 1.64 . . ..

We could prove the following proposition using methods similar to those illustrated in the examples above. Note that this is nicely illustrated in Figure 6.3.1.

Proposition 6.3.7. The series ∑_{n=1}^{∞} \frac{1}{n^{p}} is convergent if p > 1 and divergent if p ≤ 1.

6.3.1 Estimating the Sum of a Series

Suppose ∑ a_{n} is a convergent sequence of positive integers. Let

R_{m} = ∑_{n=1}^{∞} a_{n} − ∑_{n=1}^{m} a_{n} = ∑_{n=m+1}^{∞} a_{m}

which is the error if you approximate ∑ a_{n} using the first n terms. From Theorem 6.3.2 we get the following.

Proposition 6.3.8 (Remainder Bound). Suppose f is a continuous, positive, decreasing function on [m, ∞) and ∑ a_{n} is convergent. Then

∫_{m+1}^{∞} f(x)dx ≤ R_{m} ≤ ∫_{m}^{∞} f(x)dx.

Proof. In Theorem 6.3.2 set k = m + 1. That gives

∫_{m+1}^{∞} f(x)dx ≤ ∑_{n=m+1}^{∞} a_{n} ≤ a_{m+1} + ∫_{m+1}^{∞} f(x)dx.

But

a_{m+1} + ∫_{m+1}^{∞} f(x)dx ≤ ∫_{m}^{∞} f(x)dx

since f is decreasing and f(m + 1) = a_{m+1}.

Example 6.3.9. Estimate ζ(3) = ∑_{n=1}^{∞} \frac{1}{n^{3}} using the first 10 terms of the series. We have

∑_{n=1}^{10} = \frac{19164113947}{16003008000} = 1.197531985674193 …

The proposition above with m = 10 tells us that

0.00413223140495867 … = ∫_{11}^{∞} \frac{1}{x^{3}} dx ≤ ζ(3)−∑_{n=1}^{10} ≤ ∫_{10}^{∞} \frac{1}{x^{3}} dx = \frac{1}{2 · 10^{2}} = \frac{1}{200} = 0.005.

In fact,

ζ(3) = 1.202056903159594285399738161511449990 …

and we hvae

ζ(3) − ∑_{n=1}^{10} = 0.0045249174854010 …,

so the integral error bound was really good in this case.

Example 6.3.10. Determine if ∑_{n=1}^{∞} \frac{2006}{117n^{2}+41n+3} convergers or diverges. Answer: It converges, since

\frac{2006}{117n^{2} + 41n + 3} ≤ \frac{2006}{117n^{2}} = \frac{2006}{117} · \frac{1}{n^{2}} ,

and ∑ \frac{1}{n^{2}} converges.

6.4 Tests for Convergence

Final exam: Wednesday, March 22, 7-10pm in PCYNH 109. Quiz 4: Next Friday Today: 11.6: Ratio and Root tests Next: 11.8 Power Series 11.9 Functions defined by power series

6.4.1 The Comparison Test

Theorem 6.4.1 (The Comparison Test). Suppose ∑ a_{n} and ∑ b_{n} are series with all a_{n} and b_{n} positive and a_{n} ≤ b_{n} for each n.

1. If ∑ b_{n} converges, then so does ∑ a_{n}.

2. If ∑ a_{n} diverges, then so does ∑ b_{n}.

Proof Sketch. The condition of the theorem implies that for any k,

∑_{n=1}^{k} a_{n} ≤ ∑_{n=1}^{k} b_{n},

from which each claim follows.

Example 6.4.2. Consider the series ∑_{n=1}^{∞} \frac{7}{3n^{2}+2n}. For each n we have

\frac{7}{3n^{2} + 2n} ≤ \frac{7}{3} · \frac{1}{n^{2}} .

Since ∑_{n=1}^{∞} \frac{1}{n^{2}} converges, Theorem 6.4.1 implies that ∑_{n=1}^{∞} \frac{7}{3n^{2}+2n} also converges.

Example 6.4.3. Consider the series ∑_{n=1}^{∞} \frac{ln(n)}{n}. It diverges since for each n ≥ 3 we have

\frac{ln(n)}{n} ≥ \frac{1}{n},

and ∑_{n=3}^{∞} \frac{1}{n} diverges.

6.4.2 Absolute and Conditional Convergence

Definition 6.4.4 (Converges Absolutely). We say that ∑_{n=1}^{∞} a_{n} converges absolutely if ∑_{n=1}^{∞} |a_{n}| converges.

For example,

∑_{n=1}^{∞}(−1)^{n} \frac{1}{n}

converges, but does not converge absolutely (it converges “conditionally”, though we will not explain why in this book).

6.4.3 The Ratio Test

Recall that ∑_{n=1}^{∞} a_{n} is a geometric series if and only if a_{n} = ar^{n−1} for some fixed a and r. Here we call r the common ratio. Notice that the ratio of any two successive terms is r:

\frac{a_{n+1}}{a_{n}} = \frac{ar^{n}}{ar^{n−1}} = r.

Moreover, we have ∑_{n=1}^{∞} ar^{n−1} converges (to \frac{a}{1−r}) if and only if |r| < 1 (and, of course it diverges if |r| ≥ 1).

Example 6.4.5. For example, ∑_{n=1}^{∞} 3 (\frac{2}{3})^{n−1} converges to \frac{3}{1− \frac{2}{3}} = 9. However, ∑_{n=1}^{∞} 3 (\frac{3}{2})^{n−1} diverges.

Theorem 6.4.6 (Ratio Test). Consider a sum ∑_{n=1}^{∞} a_{n}. Then

1. If lim_{n→∞} |\frac{a_{n+1}}{a_{n}} | = L < 1 then ∑_{n=1}^{∞} a_{n} is absolutely convergent.

2. If lim_{n→∞} |\frac{a_{n+1}}{a_{n}} | = L > 1 then ∑_{n=1}^{∞} a_{n} diverges.

3. If lim_{n→∞} |\frac{a_{n+1}}{a_{n}} | = L = 1 then we may conclude nothing from this!

Proof. We will only prove 1. Assume that we have lim_{n→∞} |\frac{a_{n+1}}{a_{n}} | = L < 1. Let

r = \frac{L+1}{2}, and notice that L < r < 1 (since 0 ≤ L < 1, so 1 ≤ L + 1 < 2, so 1/2 ≤ r < 1, and also r − L = (L + 1)/2 − L = (1 − L)/2 > 0).

Since lim_{n→∞} |\frac{a_{n+1}}{a_{n}} | = L, there is an N such that for all n > N we have

|\frac{a_{n+1}}{a_{n}} | < r, so |a_{n+1}| < |a_{n}| · r.

Then we have

∑_{n=N+1}^{∞} |a_{n}| < |a_{N+1}| · ∑_{n=0}^{∞} r^{n}.

Here the common ratio for the second one is r < 1, hence thus the right-hand series converges, so the left-hand series converges.

Example 6.4.7. Consider ∑_{n=1}^{∞} \frac{(−10)^{n}}{n!} . The ratio of successive terms is

| \frac{\frac{(−10)^{n+1}}{(n + 1)!}}{\frac{(−10)^{n}}{n!}} | = \frac{10^{n+1}}{(n + 1)n!} · \frac{n!}{10^{n}} = \frac{10}{n + 1} → 0 < 1.

Thus this series converges absolutely. Note, the minus sign is missing above since in the ratio test we take the limit of the absolute values. Example 6.4.8. Consider ∑_{n=1}^{∞} \frac{n^{n}}{3^{1+3n}}. We have

| \frac{\frac{(n + 1)^{n+1}}{3 · (27)^{n+1}}}{\frac{n^{n}}{3^{1+3n}}} | = \frac{(n + 1)(n + 1)^{n}}{27 · 27^{n}} · \frac{27^{n}}{n^{n}} = \frac{n + 1}{27} · (\frac{n + 1}{n})^{n} → +∞

Thus our series diverges. (Note here that we use that (\frac{n+1}{n})^{n} → e.) Example 6.4.9. Let’s apply the ratio test to ∑_{n=1}^{∞} \frac{1}{n}. We have

lim_{n→∞} | \frac{\frac{1}{n + 1}}{\frac{1}{n}} | = \frac{1}{n + 1} · \frac{n}{1} = \frac{n}{n + 1} → 1.

This tells us nothing. If this happens... do something else! E.g., in this case, use the integral test.

6.4.4 The Root Test

Since e and ln are inverses, we have x = e^{ln(x)}. This implies the very useful fact that

x^{a} = e^{ln(x^{a})} = e^{a ln(x)}.

As a sample application, notice that for any nonzero c,

lim_{n→∞} c^{\frac{1}{n}} = lim_{n→∞} e^{\frac{1}{n} log(c)} = e^{0} = 1.

Similarly,

lim_{n→∞} n^{\frac{1}{n}} = lim_{n→∞} e^{\frac{1}{n} log(n)} = e^{0} = 1,

where we’ve used that lim_{n→∞} \frac{log(n)}{n} = 0, which we could prove using L’Hopital’s rule. Theorem 6.4.10 (Root Test). Consider the sum ∑_{n=1}^{∞} a_{n}.

1. If lim_{n→∞} |a_{n}|^{\frac{1}{n}} = L < 1, then ∑_{n=1}^{∞} a_{n} convergest absolutely.

2. If lim_{n→∞} |a_{n}|^{\frac{1}{n}} = L > 1, then ∑_{n=1}^{∞} a_{n} diverges.

3. If L = 1, then we may conclude nothing from this!

Proof. We apply the comparison test (Theorem 6.4.1). First suppose lim_{n→∞} |a_{n}|^{\frac{1}{n}} = L < 1. Then there is a N such that for n ≥ N we have |a_{n}|^{\frac{1}{n}} < k < 1. Thus for such n we have |a_{n}| < k^{n} < 1. The geometric series ∑_{i=N}^{∞} k^{i} converges, so ∑_{i=N}^{∞} |a_{n}| also does, by Theorem 6.4.1. If |a_{n}|^{\frac{1}{n}} > 1 for n ≥ N, then we see that ∑_{i=N}^{∞} |a_{n}| diverges by comparing with ∑_{i=N}^{∞} 1.

Example 6.4.11. Let’s apply the root test to

∑_{n=1}^{∞} ar^{n−1} = \frac{a}{r} ∑_{n=1}^{∞} r^{n}.

We have

lim_{n→∞} |r^{n}|^{\frac{1}{n}} = |r|.

Thus the root test tells us exactly what we already know about convergence of the geometry series (except when |r| = 1).

Example 6.4.12. The sum ∑_{n=1}^{∞} (\frac{n^{2}+1}{2n^{2}+1})^{n} is a candidate for the root test. We have

lim_{n→∞} |(\frac{n^{2} + 1}{2n^{2} + 1})^{n}|^{\frac{1}{n}} = lim_{n→∞} \frac{n^{2} + 1}{2n^{2} + 1} = lim_{n→∞} \frac{1 + \frac{1}{n^{2}}}{2 + \frac{1}{n^{2}}} = \frac{1}{2}.

Thus the series converges.

Example 6.4.13. The sum ∑_{n=1}^{∞} (\frac{2n^{2}+1}{n^{2}+1})^{n} is a candidate for the root test. We have

lim_{n→∞} |(\frac{2n^{2} + 1}{n^{2} + 1})^{n}|^{\frac{1}{n}} = lim_{n→∞} \frac{2n^{2} + 1}{n^{2} + 1} = lim_{n→∞} \frac{2 + \frac{1}{n^{2}}}{1 + \frac{1}{n^{2}}} = 2,

hence the series diverges!

Example 6.4.14. Consider ∑_{n=1}^{∞} \frac{1}{n}. We have

lim_{n→∞} |\frac{1}{n}|^{\frac{1}{n}} = 1,

so we conclude nothing!

Example 6.4.15. Consider ∑_{n=1}^{∞} \frac{n^{n}}{3·(27^{n})}. To apply the root test, we compute

lim_{n→∞} |\frac{n^{n}}{3 · (27^{n})}|^{\frac{1}{n}} = lim_{n→∞} (\frac{1}{3})^{\frac{1}{n}} · \frac{n}{27} = +∞.

Again, the limit diverges, as in Example 6.4.8.

6.5 Power Series

Final exam: Wednesday, March 22, 7-10pm in PCYNH 109. Bring ID! Quiz 4: This Friday Today: 11.8 Power Series, 11.9 Functions defined by power series Next: 11.10 Taylor and Maclaurin series

Recall that a polynomial is a function of the form

f(x) = c_{0} + c_{1}x + c_{2}x^{2} + ⋯ + c_{k}x^{k}.

Polynomials are easy!!!

They are easy to integrate, differentiate, etc.:

\frac{d}{dx} (∑_{n=0}^{k} c_{n}x^{n}) = ∑_{n=1}^{k} nc_{n}x^{n−1}

∫ ∑_{n=0}^{k} c_{n}x^{n}dx = C + ∑_{n=0}^{k} c_{n} \frac{x^{n+1}}{n + 1}.

Definition 6.5.1 (Power Series). A power series is a series of the form

f(x) = ∑_{n=0}^{∞} c_{n}x^{n} = c_{0} + c_{1}x + c_{2}x^{2} + ⋯,

where x is a variable and the c_{n} are coefficients.

A power series is a function of x for those x for which it converges.

Example 6.5.2. Consider

f(x) = ∑_{n=0}^{∞} x^{n} = 1 + x + x^{2} + · · · .

When |x| < 1, i.e., −1 < x < 1, we have

f(x) = \frac{1}{1 − x}.

But what good could this possibly be? Why is writing the simple function \frac{1}{1−x} as the complicated series ∑_{n=0}^{∞} x^{n} of any value?

1. Power series are relatively easy to work with. They are “almost” polynomials. E.g.,

\frac{d}{dx} ∑_{n=0}^{∞} x^{n} = ∑_{n=1}^{∞} nx^{n−1} = 1 + 2x + 3x^{2} + ⋯ = ∑_{m=0}^{∞}(m + 1)x^{m},

where in the last step we “re-indexed” the series. Power series are only “almost” polynomials, since they don’t stop; they can go on forever. More precisely, a power series is a limit of polynomials. But in many cases we can treat them like a polynomial. On the other hand, notice that

\frac{d}{dx} (\frac{1}{1 − x}) = \frac{1}{(1 − x)^{2}} = ∑_{m=0}^{∞}(m + 1)x^{m}.

2. For many functions, a power series is the best explicit representation available.

Example 6.5.3. Consider J_{0}(x), the Bessel function of order 0. It arises as a solution to the differential equation x^{2}y′′ + xy′ + x^{2}y = 0, and has the following power series expansion:

J_{0}(x) = ∑_{n=1}^{∞} \frac{(−1)^{n}x^{2n}}{2^{2n}(n!)^{2}}

= 1 − \frac{1}{4}x^{2} + \frac{1}{64}x^{4} − \frac{1}{2304}x^{6} + \frac{1}{147456}x^{8} − \frac{1}{14745600}x^{10} + · · · .

This series is nice since it converges for all x (one can prove this using the ratio test). It is also one of the most explicit forms of J_{0}(x).

6.5.1 Shift the Origin

It is often useful to shift the origin of a power series, i.e., consider a power series expanded about a different point.

Definition 6.5.4. The series

∑_{n=0}^{∞} c_{n}(x − a)^{n} = c_{0} + c_{1}(x − a) + c_{2}(x − a)^{2} + ⋯

is called a power series centered at x = a, or “a power series about x = a”.

Example 6.5.5. Consider

∑_{n=0}^{∞}(x − 3)^{n} = 1 + (x − 3) + (x − 3)^{2} + ⋯

= \frac{1}{1 − (x − 3)} equality valid when |x − 3| < 1

= \frac{1}{4 − x}

Here conceptually we are treating 3 like we treated 0 before.

Power series can be written in different ways, which have different advantages and disadvantages. For example,

\frac{1}{4 − x} = \frac{1}{4} · \frac{1}{1 − x/4}

= \frac{1}{4} · ∑_{n=0}^{∞} (\frac{x}{4})^{n} converges for all |x| < 4.

Notice that the second series converges for |x| < 4, whereas the first converges only for |x − 3| < 1, which isn’t nearly as good.

6.5.2 Convergence of Power Series

Theorem 6.5.6. Given a power series ∑_{n=0}^{∞} c_{n}(x − a)^{n}, there are exactly three possibilities:

1. The series conveges only when x = a.

2. The series conveges for all x.

3. There is an R > 0 (called the “radius of convergence”) such that ∑_{n=0}^{∞} c_{n}(x − a)^{n} converges for |x − a| < R and diverges for |x − a| > R.

Example 6.5.7. For the power series ∑_{n=0}^{∞} x^{n}, the radius R of convergence is 1.

Definition 6.5.8 (Radius of Convergence). As mentioned in the theorem, R is called the radius of convergence.

If the series converges only at x = a, we say R = 0, and if the series converges everywhere we say that R = ∞.

The interval of convergence is the set of x for which the series converges. It will be one of the following:

(a − R, a + R),  [a − R, a + R),  (a − R, a + R],  [a − R, a + R]

The point being that the statement of the theorem only asserts something about convergence of the series on the open interval (a − R, a + R). What happens at the endpoints of the interval is not specified by the theorem; you can only figure it out by looking explicitly at a given series.

Theorem 6.5.9. If ∑_{n=0}^{∞} c_{n}(x − a)^{n} has radius of convergence R > 0, then f(x) = ∑_{n=0}^{∞} c_{n}(x − a)^{n} is differentiable on (a − R, a + R), and

1. f′(x) = ∑_{n=1}^{∞} n · c_{n}(x − a)^{n−1}

2. ∫ f(x)dx = C + ∑_{n=0}^{∞} \frac{c_{n}}{n + 1}(x − a)^{n+1},

and both the derivative and integral have the same radius of convergence as f.

Example 6.5.10. Find a power series representation for f(x) = tan^{−1}(x). Notice that

f′(x) = \frac{1}{1 + x^{2}} = \frac{1}{1 − (−x^{2})} = ∑_{n=0}^{∞}(−1)^{n}x^{2n},

which has radius of convergence R = 1, since the above series is valid when | − x^{2}| < 1, i.e., |x| < 1. Next integrating, we find that

f(x) = c + ∑_{n=0}^{∞}(−1)^{n} \frac{x^{2n+1}}{2n + 1},

for some constant c. To find the constant, compute c = f(0) = tan^{−1}(0) = 0. We conclude that

tan^{−1}(x) = ∑_{n=0}^{∞}(−1)^{n} \frac{x^{2n+1}}{2n + 1}.

Example 6.5.11. We will see later that the function f(x) = e^{−x^{2}} has power series

e^{−x^{2}} = 1 − x^{2} + \frac{1}{2}x^{4} − \frac{1}{6}x^{6} + · · · .

Hence

∫ e^{−x^{2}}dx = c + x − \frac{1}{3}x^{3} + \frac{1}{10}x^{5} − \frac{1}{42}x^{7} + · · · .

This despite the fact that the antiderivative of e^{−x^{2}} is not an elementary function (see Example 5.7.4).

6.6 Taylor Series

Final exam: Wednesday, March 22, 7-10pm in PCYNH 109. Bring ID! Last Quiz 4: This Friday Next: 11.10 Taylor and Maclaurin series Next: 11.12 Applications of Taylor Polynomials Midterm Letters: A, 32–38 B, 26–31 C, 20–25 D, 14–19 Mean: 23.4, Standard Deviation: 7.8, High: 38, Low: 6.

Example 6.6.1. Suppose we have a degree-3 (cubic) polynomial p and we know that p(0) = 4, p′(0) = 3, p′′(0) = 4, and p′′′(0) = 6. Can we determine p? Answer: Yes! We have

p(x) = a + bx + cx^{2} + dx^{3}
p′(x) = b + 2cx + 3dx^{2}
p′′(x) = 2c + 6dx
p′′′(x) = 6d

From what we mentioned above, we have:

a = p(0) = 4
b = p′(0) = 3
c = \frac{p′′(0)}{2} = 2
d = \frac{p′′′(0)}{6} = 1

Thus

p(x) = 4 + 3x + 2x^{2} + x^{3}.

Amazingly, we can use the idea of Example 6.6.1 to compute power series expansions of functions. E.g., we will show below that

e^{x} = ∑_{n=0}^{∞} \frac{x^{n}}{n!} .

Convergent series are determined by the values of their derivatives.

Consider a general power series

f(x) = ∑_{n=0}^{∞} c_{n}(x − a)^{n} = c_{0} + c_{1}(x − a) + c_{2}(x − a)^{2} + ⋯

We have

c_{0} = f(a)
c_{1} = f′(a)
c_{2} = \frac{f′′(a)}{2}
⋯
c_{n} = \frac{f^{(n)}(a)}{n!},

where for the last equality we use that

f^{(n)}(x) = n!c_{n} + (x − a)(⋯ + ⋯)

Remark 6.6.2. The definition of 0! is 1 (it’s the empty product). The empty sum is 0 and the empty product is 1.

Theorem 6.6.3 (Taylor Series). If f(x) is a function that equals a power series centered about a, then that power series expansion is

f(x) = ∑_{n=0}^{∞} \frac{f^{(n)}(a)}{n!}(x − a)^{n}

= f(a) + f′(a)(x − a) + \frac{f′′(a)}{2}(x − a)^{2} + ⋯

Remark 6.6.4. WARNING: There are functions that have all derivatives defined, but do not equal their Taylor expansion. E.g., f(x) = e^{−1/x^{2}} for x ≠ 0 and f(0) = 0. It’s Taylor expansion is the 0 series (which converges everywhere), but it is not the 0 function.

Definition 6.6.5 (Maclaurin Series). A Maclaurin series is just a Taylor series with a = 0. I will not use the term “Maclaurin series” ever again (it’s common in textbooks).

Example 6.6.6. Find the Taylor series for f(x) = e^{x} about a = 0. We have f^{(n)}(x) = e^{x}. Thus f^{(n)}(0) = 1 for all n. Hence

e^{x} = ∑_{n=0}^{∞} \frac{1}{n!}x^{n} = 1 + x + \frac{x^{2}}{2} + \frac{x^{3}}{6} + ⋯

What is the radius of convergence? Use the ratio test:

lim_{n→∞} | \frac{\frac{1}{(n+1)!}x^{n+1}}{\frac{1}{n!}x^{n}} | = lim_{n→∞} \frac{n!}{(n + 1)!}|x|

= lim_{n→∞} \frac{|x|}{n + 1} = 0, for any fixed x.

Thus the radius of convergence is ∞.

80 CHAPTER 6. SEQUENCES AND SERIES Example 6.6.7. Find the Taylor series of f(x) = sin(x) about x = \frac{π}{2} .^{1} We have

f(x) = ∑_{n=0}^{∞} \frac{f^{(n)} (\frac{π}{2} )}{n!} (x − \frac{π}{2} )^{n} .

To do this we have to puzzle out a pattern:

f(x) = sin(x)
f′(x) = cos(x)
f′′(x) = − sin(x)
f′′′(x) = − cos(x)
f^{(4)}(x) = sin(x)

First notice how the signs behave. For n = 2m even,

f^{(n)}(x) = f^{(2m)}(x) = (−1)^{n/2} sin(x)

and for n = 2m + 1 odd,

f^{(n)}(x) = f^{(2m+1)}(x) = (−1)^{m} cos(x) = (−1)^{(n−1)/2} cos(x)

For n = 2m even we have

f^{(n)}(π/2) = f^{(2m)} (\frac{π}{2} ) = (−1)^{m}.

and for n = 2m + 1 odd we have

f^{(n)}(π/2) = f^{(2m+1)} (\frac{π}{2} ) = (−1)^{m} cos(π/2) = 0.

Finally,

sin(x) = ∑_{n=0}^{∞} \frac{f^{(n)}(π/2)}{n!}(x − π/2)^{n}

= ∑_{m=0}^{∞} \frac{(−1)^{m}}{(2m)!} (x − \frac{π}{2} )^{2m} .

Next we use the ratio test to compute the radius of convergence. We have

lim_{m→∞} \begin{matrix}| & \frac{(−1)^{m+1}}{(2(m + 1))!} & (x − \frac{π}{2} ) & 2(m+1) & | \\ | & \frac{(−1)^{m}}{(2m)!} & (x − \frac{π}{2} ) & 2m & | \end{matrix} = lim_{m→∞} \frac{(2m)!}{(2m + 2)!} (x − \frac{π}{2} )^{2}

= lim_{m→∞} \frac{(x − \frac{π}{2} )^{2}}{(2m + 2)(2m + 1)}

which converges for each x. Hence R = ∞.

1Evidently this expansion was first found in India by Madhava of Sangamagrama (1350-1425).

Example 6.6.8. Find the Taylor series for cos(x) about a = 0. We have cos(x) = sin (x + \frac{π}{2} ). Thus from Example 6.6.7 (with infinite radius of convergence) and that the Taylor expansion is unique, we have

cos(x) = sin (x + \frac{π}{2} )

= ∑_{n=0}^{∞} \frac{(−1)^{n}}{(2n)!} (x + \frac{π}{2} − \frac{π}{2} )^{2n}

= ∑_{n=0}^{∞} \frac{(−1)^{n}}{(2n)!} x^{2n}

6.7 Applications of Taylor Series

Final exam: Wednesday, March 22, 7-10pm in PCYNH 109. Bring ID! Last Quiz 4: Today (last one) Today: 11.12 Applications of Taylor Polynomials Next; Differential Equations

This section is about an example in the theory of relativity. Let m be the (relativistic) mass of an object and m_{0} be the mass at rest (rest mass) of the object. Let v be the velocity of the object relative to the observer, and let c be the speed of light. These three quantities are related as follows:

m = \frac{m_{0}}{\sqrt{1 − \frac{v^{2}}{c^{2}}}} (relativistic) mass

The total energy of the object is mc^{2}:

E = mc^{2}.

In relativity we define the kinetic energy to be

K = mc^{2} − m_{0}c^{2}.  (6.7.1)

What? Isn’t the kinetic energy \frac{1}{2}m_{0}v^{2}?

Notice that

mc^{2} − m_{0}c^{2} = \frac{m_{0}c^{2}}{\sqrt{1 − \frac{v^{2}}{c^{2}}}} − m_{0}c^{2} = m_{0}c^{2} [(1 − \frac{v^{2}}{c^{2}} )^{− \frac{1}{2}} − 1] .

Let

f (x) = (1 − x)^{− \frac{1}{2}} − 1

Let’s compute the Taylor series of f. We have

f(x) = (1 − x)^{− \frac{1}{2}} − 1
f′(x) = \frac{1}{2}(1 − x)^{− \frac{3}{2}}
f′′(x) = \frac{1}{2} · \frac{3}{2}(1 − x)^{− \frac{5}{2}}
f^{(n)}(x) = \frac{1 · 3 · 5 ⋯ (2n − 1)}{2^{n}}(1 − x)^{− \frac{2n+1}{2}} .

Thus

f^{(n)}(0) = \frac{1 · 3 · 5 ⋯ (2n − 1)}{2^{n}}.

6.7. APPLICATIONS OF TAYLOR SERIES 83 Hence

f(x) = ∑_{n=1}^{∞} \frac{f^{(n)}(0)}{n!}x^{n}

= ∑_{n=1}^{∞} \frac{1 · 3 · 5 ⋯ (2n − 1)}{2^{n} · n!}x^{n}

= \frac{1}{2}x + \frac{3}{8}x^{2} + \frac{5}{16}x^{3} + \frac{35}{128}x^{4} + ⋯

We now use this to analyze the kinetic energy (6.7.1):

mc^{2} − m_{0}c^{2} = m_{0}c^{2} · f (\frac{v^{2}}{c^{2}} )

= m_{0}c^{2} · (\frac{1}{2} · \frac{v^{2}}{c^{2}} + \frac{3}{8} · \frac{v^{2}}{c^{2}} + ⋯)

= \frac{1}{2}m_{0}v^{2} + m_{0}c^{2} · (\frac{3}{8} \frac{v^{2}}{c^{2}} + ⋯)

And we can ignore the higher order terms if \frac{v^{2}}{c^{2}} is small. But how small is “small” enough, given that \frac{v^{2}}{c^{2}} appears in an infinite sum?

6.7.1 Estimation of Taylor Series

Suppose

f(x) = ∑_{n=0}^{∞} \frac{f^{(n)}(a)}{n!}(x − a)^{n}.

Write

R_{N}(x) := f(x) − ∑_{n=0}^{N} \frac{f^{(n)}(a)}{n!}(x − a)^{n}

We call

T_{N}(x) = ∑_{n=0}^{N} \frac{f^{(n)}(a)}{n!}(x − a)^{n}

the Nth degree Taylor polynomial. Notice that

lim_{N→∞} T_{N}(x) = f(x)

if and only if

lim_{N→∞} R_{N}(x) = 0.

We would like to estimate f(x) with T_{N}(x). We need an estimate for R_{N}(x). Theorem 6.7.1 (Taylor’s theorem). If |f^{(N+1)}(x)| ≤ M for |x − a| ≤ d, then

|R_{N}(x)| ≤ \frac{M}{(N + 1)!}|x − a|^{N+1} for |x − a| ≤ d.

For example, if N = 0, this says that

|R(x)| = |f(x) − f(a)| ≤ M|x − a|,

i.e.,

|\frac{f(x) − f(a)}{x − a}| ≤ M,

which should look familiar from a previous class (Mean Value Theorem).

Applications:

1. One can use Theorem 6.7.1 to prove that functions converge to their Taylor series.

2. Returning to the relativity example above, we apply Taylor’s theorem with N = 1 and a = 0. With x = −v^{2}/c^{2} and M any number such that |f′′(x)| ≤ M, we have

|R_{1}(x)| ≤ \frac{M}{2} x^{2}.

For example, if we assume that |v| ≤ 100m/s we use

|f′′(x)| ≤ \frac{3}{2}(1 − 100^{2}/c^{2})^{−5/2} = M.

Using c = 3 × 10^{8}m/s, we get

|R_{1}(x)| ≤ 4.17 · 10^{−10} · m_{0}.

Thus for v ≤ 100m/s ∼ 225mph, then the error in throwing away relativistic factors is 10^{−10}m_{0}. This is like 200 feet out of the distance to the sun (93 million miles). So relativistic and Newtonian kinetic energies are almost the same for reasonable speeds.

Some Differential Equations

Final exam: Wed March 22 7-10pm in Pepper canyon 109. Today: Section 9.5 Friday: Review (with special guest John Eggers). Extra Office Hours: Monday 11-2pm

Introduction – not written.

7.1 Separable Equations

A separable differential equation is a first order differential equation that can be written in the form

\frac{dy}{dx} = \frac{f(x)}{h(y)}.

These can be solved by integration, by noting that

h(y)dy = f(x)dx,

hence

∫ h(y)dy = ∫ f(x)dx.

This latter equation defines y implicitly as a function of x, and in some cases it is possible to explicitly solve for y as a function of x.

7.2 Logistic Equation

The logistics equation is a differential equation that models population growth. Often in practice a differential equation models some physical situtation, and you should “read it” as doing so.

Exponential growth:

\frac{1}{P} \frac{dP}{dt} = k.

This says that the “relative (percentage) growth rate” is constant. As we saw before, the solutions are

P_{(t)} = P_{0} · e^{kt}.

Note that this model only works for a little while. In everyday life the growth couldn’t actually continue at this rate indefinitely. This exponential growth model ignores limitations on resources, disease, etc. Perhaps there is a better model?

Over time we expect the growth rate should level off, i.e., decrease to 0. What about

\frac{1}{P} \frac{dP}{dt} = k (1 − \frac{P}{K} ) ,  (7.2.1)

where K is some large constant called the carrying capacity, which is much bigger than P = P (t) at time 0. The carrying capacity is the maximum population that the environment can support. Note that if P > K, then dP/dt < 0 so the population declines. The differential equation (7.2.1) is called the logistic model (or logistic differential equation). There are, of course, other models one could use, e.g., the Gompertz equation.

First question: are there any equilibrium solutions to (7.2.1), i.e., solutions with dP/dt = 0, i.e., constant solutions? In order that dP/dt = 0 then 0 = k (1 − \frac{P}{K} ), so the two equilibrium solutions are P (t) = 0 and P (t) = K.

The logistic differential equation (7.2.1) is separable, so you can separate the variables with one variable on one side of the equality and one on the other. This means we can easily solve the equation by integrating. We rewrite the equation as

\frac{dP}{dt} = −\frac{k}{K} P (P − K).

Now separate:

\frac{KdP}{P (P − K)} = −k · dt,

and integrate both sides

∫ \frac{KdP}{P (P − K)} = ∫ −k · dt = −kt + C.

On the left side we get

∫ \frac{KdP}{P (P − K)} = ∫ (\frac{1}{P − K} − \frac{1}{P} ) dP = ln |P − K| − ln |P | + ∗

Thus

ln |K − P | − ln |P | = −kt + c,

so

ln |(K − P)/P | = −kt + c.

Now exponentiate both sides:

(K − P)/P = e^{−kt+c} = Ae^{−kt}, where A = e^{c}.

Thus

K = P (1 + Ae^{−kt}),

so

P (t) = \frac{K}{1 + Ae^{−kt}} .

Note that A = 0 also makes sense and gives an equilibrium solution. In general we have lim_{t→∞} P (t) = K. In any particular case we can determine A as a function of P_{0} = P (0) by using that

P (0) = \frac{K}{1 + A}  so  A = \frac{K}{P_{0}} − 1 = \frac{K − P_{0}}{P_{0}} .