calculus ii–math 227.04

89
Calculus II–Math 227.04 David Meredith Department of Mathematics San Francisco State University San Francisco, CA 94132 Fall 2001–MWF 2-3, Tu 12:35-1:25–BUS 110

Upload: vukhuong

Post on 01-Jan-2017

245 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Calculus II–Math 227.04

Calculus II–Math 227.04

David MeredithDepartment of MathematicsSan Francisco State UniversitySan Francisco, CA 94132

Fall 2001–MWF 2-3, Tu 12:35-1:25–BUS 110

Page 2: Calculus II–Math 227.04

Contents

1 Introduction 31.1 Instructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Web Site and E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4.1 Mathematical Software . . . . . . . . . . . . . . . . . . . . . . 31.4.2 Word Processing Software . . . . . . . . . . . . . . . . . . . . . 4

1.5 Class procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5.1 Attendance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5.2 Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5.3 Homework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5.4 Exams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.5.5 Grading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Projects 102.1 Learning Mathematica–Due September 28 . . . . . . . . . . . . . . . 102.2 Center of a Triangle–Due October 24 . . . . . . . . . . . . . . . . . . 102.3 Measuring a Football–Due November 14 . . . . . . . . . . . . . . . . 102.4 Finding Logarithms–Due December 5 . . . . . . . . . . . . . . . . . . 10

3 Lectures 113.1 Introduction to TestGiver . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.2.1 Using Integral Tables . . . . . . . . . . . . . . . . . . . . . . . 113.2.2 Definite Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . 143.2.3 Areas between curves . . . . . . . . . . . . . . . . . . . . . . . 153.2.4 Integration by Substitution . . . . . . . . . . . . . . . . . . . . 183.2.5 Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.6 Integration by Parts . . . . . . . . . . . . . . . . . . . . . . . . 253.2.7 Work Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.2.8 First Moments and Centers of Mass . . . . . . . . . . . . . . . 303.2.9 Partial Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . 333.2.10 Improper Integrals . . . . . . . . . . . . . . . . . . . . . . . . . 383.2.11 Numerical Integration . . . . . . . . . . . . . . . . . . . . . . . 413.2.12 The Fundamental Theorem of Calculus . . . . . . . . . . . . . 483.2.13 Probability Integrals . . . . . . . . . . . . . . . . . . . . . . . . 51

3.3 Infinite Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563.3.1 Numerical Series . . . . . . . . . . . . . . . . . . . . . . . . . . 563.3.2 Power Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673.3.3 Representing Functions with Power Series . . . . . . . . . . . . 683.3.4 Taylor Polynomials and Remainders . . . . . . . . . . . . . . . 723.3.5 Taylor Series and Convergence . . . . . . . . . . . . . . . . . . 743.3.6 Manipulating Taylor Series . . . . . . . . . . . . . . . . . . . . 783.3.7 Binomial series . . . . . . . . . . . . . . . . . . . . . . . . . . . 793.3.8 Taylor Series and differential equations . . . . . . . . . . . . . . 81

3.4 Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 813.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

1

Page 3: Calculus II–Math 227.04

3.4.2 Separable Differential Equations . . . . . . . . . . . . . . . . . 843.4.3 Direction Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 853.4.4 Euler’s Method of Approximating Solutions to Differential Equa-

tions y0 = f (t, y) . . . . . . . . . . . . . . . . . . . . . . . . . . 883.4.5 Exponential Growth and Decay . . . . . . . . . . . . . . . . . . 903.4.6 The Logistic Equation . . . . . . . . . . . . . . . . . . . . . . . 92

4 Exams 964.1 Math 227.04 Midterm 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 964.2 Math 227.04 Midterm 1 Answers . . . . . . . . . . . . . . . . . . . . . 974.3 Math 227.04 Midterm 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 994.4 Math 227.04 Midterm 2 Answers . . . . . . . . . . . . . . . . . . . . . 100

2

Page 4: Calculus II–Math 227.04

Chapter 1 IntroductionCalculus II divides into two parts: during the first 11 weeks you will study the theory,methods and applications of integration, including differential equations; during thelast four weeks you will study the theory and application of power series. Along theway you will learn to use Mathematica as your personal mathematical assistant, andyou will practice your mathematical writing.Integration is both harder and more useful than differentiation. (Why is that not

surprising?) Since the eighteenth century most scientific laws have been expressed asdifferential equations, and integration is the mathematical tool required to use them.Integration is also widely used in data analysis.Power series are not as ubiquitous as integration, but they are key to understanding

how calculators and computers do mathematics. Important numerical methods forevaluating transcendental functions and solving differential equations depend on powerseries. Those of you who study advanced mathematics will find that power series playan important role in advanced analysis.

1.1 Instructor

David MeredithTH 933

Office Hours: MWF 11-12(415) 338-2199E-mail: [email protected]: http://online.sfsu.edu/˜meredith

1.2 Web Site and E-mail

Class notes, handouts, syllabus changes, grade sheet, etc. can be found at the classweb site, which you can access by going to my web site and clicking on CalculusII. I will not distribute any more paper handouts to you. All information will bedistributed via the class web site.When you cannot get to my office hour or wait for the next class, you may submit

questions to me by e-mail. Projects may be submitted as e-mail attachments. I canread Word, Tex, DVI, Adobe Acrobat and Mathematica files.

1.3 Text

Stewart, Calculus: Concepts and Contexts, Brooks/Cole, Pacific Grove CA, 1998.

1.4 Software

1.4.1 Mathematical Software

In this course you will learn to calculate with software. There are several programsyou can use. I will instruct the class to use Mathematica, but I will try to help youindividually if you choose to use another program.

3

Page 5: Calculus II–Math 227.04

1.4.1.1 Maple

Maple is a symbolic and numerical powerhouse similar to Mathematica but not aswidely used outside of academia.

1.4.1.2 Mathematica

Mathematica computes numerically and symbolically. You can calculateP50i=1

1

i2

ord

dxe3x cos 4x. With Mathematica, you can work interactively or you can write

subroutines. The Math Dept. at SFSU has decided to use this program in many of itscourses. Mathematica is freely available M-F, 10-3, in the Math/Stat Computing Lab,TH404. Buying your own copy is not necessary, but it might be a good investment.If you learn to use Mathematica effectively, you will find it very valuable in all yourscience, engineering and math courses. The bookstore will sell you a copy for $150.

1.4.1.3 Matlab

Matlab is the classic linear algebra program with the best numerical algorithms, and itcan be used with difficulty for calculus. A student version is available at the bookstore.If you are going into engineering, it might pay to learn this program. Matlab nowincludes Maple, so some symbolic calculations can be performed with Matlab. If yourfocus is symbolic work, Mathematica or Maple is a better choice.

1.4.1.4 X(PLORE)

Truth in advertising: I wrote X(PLORE). It is freely available from my web site andin the Math/Stat Computing Lab. You can do most of the calculations for this coursein X(PLORE). The advantage is the cost; the disadvantage is the lack of symboliccomputation.

1.4.1.5 Graphing Calculators

These toys can be used for the simple calculations and graphs. The most recent mod-els will perform symbolic integration and matrix calculations. On the other hand,calculators are much harder to use than computer software. The keystroke combina-tions are harder to remember, the screen is much harder to read, and the capabilitiesare much less. I have never seen a professional scientist or engineer use a graphingcalculator; they use computers. Maybe you should start learning to use a computertoo. It is possible to do all the computer homework in this course on the most powerfulgraphing calculators (TI 89, HP 49), but it won’t be fun.

1.4.2 Word Processing Software

You can write mathematical reports with Mathematica, but not easily. Moreover,the result is ugly. Much better tools are any standard word processor with equation-writing capability (Word or WordPerfect will do nicely, but you may have to installthe equation module for Word) or a special scientific work processor like ScientificWorkPlace ($600) or Scientific Notebook($75). I highly recommend Scientific Work-place and Scientific Notebook. They include Maple, so you can do simple computationsinside the word processor. The output looks good, much better than the output fromeither Mathematica or Word. Sometimes the bookstore stocks Scientific Notebook.More information about these products can be found at http://www.mackichan.com.This document was produced with Scientific Workplace.

4

Page 6: Calculus II–Math 227.04

1.5 Class procedures

1.5.1 Attendance

I take attendance every day.

1.5.2 Schedule

Dates Topics Due Date

8/29-9/7 5.7, 6.1 9/109/10-9/14 5.5, 6.2 9/179/17-9/21 5.5, 6.2 9/24Project 1 9/289/24-9/28 5.6, 6.5 10/110/1-10/5 App.F, 6.5 10/8Midterm Tuesday 10/910/10-10/12 5.9, 6.5 10/1510/15-10/19 5.8, 6.3 10/22Project 2 10/2410/22-10/26 5.4, 6.7 10/29Midterm Tuesday 10/3010/31-11/2 8.1-8.2 11/511/5-11/9 8.2-8.4 11/12Project 3 11/1411/12-11/16 8.5-8.6 11/1911/19-11/21 8.7 11/2611/26-11/30 8.8-8.9 12/3Project 4 12/512/3-12/7 7.1-7.3 12/1012/10-12/14 7.4-7.6 12/17Final Monday, 12/17, 1:30-4:00

1.5.3 Homework

You will have two kinds of homework in this course. There will be problems andprojects. Homework is an important part of this course. Forty-five percent of yourgrade comes from the homework.

1.5.3.1 Problems

Homework problems will be assigned weekly. They are similar to the exercises in thetext, but the format is new. I’ve developed an electronic homework system calledTestGiver that you will use.

1. You begin by downloading the program TestGiver from the class web site andinstalling it on your computer at home. Or you can use TestGiver in theMath/Stat Lab (TH 404).

(a) TestGiver includes a massive help file, and the folder that contains yourinstallation also contains a pdf file with a manual for the program. Youshould read the section titled “Overview” in the help file or the manual.

2. Then every week, at least seven days before the assignment is due, youdownload the weekly assignment file. This will be a file with the extension TGV.

(a) Load your test into TestGiver using the menu item File/Open New Test.Random items will be given values, and the questions will be displayed onthe Test page.

5

Page 7: Calculus II–Math 227.04

i. If the test is not displayed, click the tab marked ”Test” at the top ofthe window.

ii. You should see the questions and spaces for your answers.

iii. You may want to print your test and work away from the computer.Wise students will keep printed copies of their completed tests. At anytime during the test-taking, a printed copy of the test with all answersentered so far can be created by selecting the menu item File/Print

Test.

(b) When you enter an answer, it will be checked instantly and you will be toldif it is right or wrong.

i. Most questions allow you to keep trying answers until you get the rightanswer. But questions with a yellow background give you only one try.Think carefully before answering a one-try question.Usually one-try questions are like true/false questions. They have alimited number of possible answers, and the one-try rule is there tokeep test takers from just trying all possible answers without actuallydoing the problem.If you enter the wrong answer to a one-try question, you can submita written correction that explains the problem thoroughly in completesentences. Begin with a statement of the problem.

(c) At any time you can save a partially completed test and reload it later intoTestGiver. All randomly produced parameters and all answers, right andwrong, are saved. Nothing is changed when the test is reloaded for furtherwork. Saving is done with the menu item File/Save Test and reloadingis done with the menu item File/Open Old Test. The recommended fileextension for saved tests is TST.

i. WARNING: always reload a TST file that you have saved. If youreload a TGV file, all answers will be lost and all random parameterswill be recalculated. Loading a TGV file with File/Open New Testalways restarts a test. Loading a TST file with File/Open Old Testallows you to continue a test you have already started.

ii. If you are doing your work in the lab, you should save your test on afloppy disk. That way, when you return, you can work at any computer.

(d) When you finish the assignment, send a report of your work to me over theinternet.

i. Get connected to the internet. If you are in the lab, you are alreadyconnected.

ii. Send your report by using the menu item File/Send Report.

iii. Reports must be send on or before the due date. Late papers will berejected by the recording software.

A. Falling behind is one of the main reasons students fail calculus.This rule is designed to help you keep up. It is better to submit apartially completed assignment and go on to the next one than tofall behind while trying to complete an old assignment.

B. If you have a good reason for turning in an assignment late, pleasesee me.

(e) If you have questions about your homework, you can send me an email byclicking Help/Send e-mail to Dr. Meredith.

1.5.3.2 Projects

1. Projects are formal reports. I will give you a problem, usually with a lot ofparts, and you will write a report based on the problem.

(a) Reports must be written in correct mathematical English. Your textbookis a model of correct mathematical writing.

6

Page 8: Calculus II–Math 227.04

i. The test of good writing is this: a student in another linear algebraclass at another college should be able to read your paper and under-stand what problem you were doing and how you answered it.

(b) The most important criteria for a good report is that it is clear and withouterrors. It is better to write a grammatical, well-organized report thatcorrectly answers part of the question than to write a report that purportsto answer the entire question but is either fragmentary or contains mistakes.

i. Think of getting one point for each correct, well-written part and -1point for each part that is grammatically or mathematically wrong.You can get a lot of points just by not turning in wrong answers.

ii. There is no partial credit for mistakes.

iii. There is lots of partial credit for correctly stating and answering partof a problem. If you cannot do a problem as stated, then:

A. do a simpler version. If the problem asks about n × n matrices,you might solve it for 3× 3 matrices.

B. do an example. If the problem asks you to prove something aboutsymmetric matrices, you can show that the property holds for onesymmetric matrix.

C. discuss the problem. Prove what you can and explain why you arestuck.

The important thing is to write a well-organized report that is inter-nally correct, even if it does not completely answer the problem posed.

(c) You do not have to take up the problem parts in the order I present them.You can organize your report any way you like, so long as it is clear.

i. You can use a part that you cannot prove to prove another part, solong as you are clear about what you are doing.

2. Rules for Writing Projects

(a) Things to do

i. Your paper should read from left to right and top to bottom. If yourreaders have to follow a wandering path down the page, they will beconfused.

A. Do not put little clusters of words on the page.

B. Start each paragraph at the left margin, but do not start each sen-tence at the left margin. Write paragraphs, not lists of sentences.

ii. Every word on your page must be part of a sentence.

A. Pick a word at random on your page. Can you find the capitalletter that starts the sentence containing it? Can you find theperiod that ends the sentence? Can you find the subject and verb?

iii. Each part of your project should begin with a statement of what youwill prove.

A. Do not assume that your reader has a copy of the problem state-ment. Although you can refer to theorems in the text by number(say: “by Lipschutz, 5.3.2”). you have to state completely whateach part of your report proves.

B. Do not simply copy the problem statement. The problem state-ment asks the reader to do something, which is not what you want.You want to say what you will calculate or prove, so rewrite theproblem statement as a positive statement of what you will do.

C. If you are only doing part of a problem or a special case, then yourintroductory statement should say exactly what you will do (notwhat you won’t do). If the problem asks you to prove something forn points and you do the problem for 3 points, then your statementshould start: “Let M be a set of three points. Then ...”.

7

Page 9: Calculus II–Math 227.04

iv. Finish each part with a conclusion.

v. If you type, you must still use standard mathematical notation. If youcannot get your word processor to print fractions, exponents, etc., thenwrite the formulas in by hand.

vi. Good mathematical writing is clear but succinct. Don’t overdo longcalculations. Put in enough steps so another student could repeat yourcalculation, but no more.

(b) Things to Avoid

i. NEVER use arrows. They are not well-defined mathematical sym-bols. They have no meaning. Use words and mathematical formulasto convey your meaning.

A. If one system of equations is derived from another, don’t just putan arrow to one from the other. Put in a sentence that says howthe systems are related, for example: “Eliminating x from all butthe first equation, we obtain the system:..”

ii. Never use a triangle of three dots to replace the word “therefore”.

A. Never use a triangle of three dots for anything else either.

iii. Do not use abbreviations or other informal grammatical elements. Pre-pare a manuscript that you would be proud to see published.

iv. Never turn in a paper that includes unfinished problems, fragments,scratchwork, or other clutter. The reader will try to read everythingon your page, so make sure that everything on your page is clear andcomplete.

A. Do not turn in first drafts. Solve problems first on scratch paper,then write your final answer on the paper you turn in.

3. Projects may be turned in by groups of up to three students.

(a) If two projects contain significant copied parts, both will receive zeros. Ido not care who copied from whom.

4. Projects will be graded on a scale of 0-4

(a) 0: not submitted, no attempt to write complete sentences, or no correctparts.

(b) 1: many mathematical or grammatical errors

(c) 2: some parts done correctly, not too many mathematical or grammaticalerrors

(d) 3: most parts done correctly and few mistakes, writing is grammaticallycorrect

(e) 4: almost all parts done correctly and no mistakes, writing is clear andwell-organized

5. Late papers will not be accepted except by prior arrangement.

(a) If you cannot come to class, have a friend bring your work or send it byemail.

(b) Write your work up as you go along. If something happens and you cannotfinish, you will have a partially completed assignment to turn in.

1.5.4 Exams

Exam problems will be similar to the easier homework problems. Exams must be takeindividually. Bring plenty of blank 812”× 11” paper.

8

Page 10: Calculus II–Math 227.04

1.5.4.1 Midterms

There will be two midterms: October 9 and October.30. You may use one 812”× 11”page of notes (both sides) for each test.

1.5.4.2 Final

The final will be in the regular lecture room. You may use two 8 12” × 11” page ofnotes (both sides) for the final. The final exam will cover the entire course.

1.5.5 Grading

Grading SystemAttendance 10%Problems 25%Projects 20%Midterms 25%

Final Exam 20%Final grades will be assigned according to a scale no harsher than: A ≥ 85%,

B ≥ 70%, C ≥ 60%.

9

Page 11: Calculus II–Math 227.04

Chapter 2 Projects

2.1 Learning Mathematica–Due September 28

From the class web site download the Mathematica notebook “Mathematica for Cal-culus Students”. Do all the “do it yourself” sections, delete all other sections, andsend the resulting notebook to me by e-mail. The usual literacy requirements forprojects are not in force for this part of the assignment.

2.2 Center of a Triangle–Due October 24

Let x,y, z be points in the plane considered as the vertices of a triangle. Show thatx+y+z

3 is the centroid of the triangle.

2.3 Measuring a Football–Due November 14

Carefully measure the circumference of a football at various points along its axis. Useyour measurements to estimate the volume of the football (think Simpson’s method).Carefully explain your method of computation: exactly what measurements you madeand how you converted them into a volume. Check your work by measuring the volumesome other way, for example by determining how much water the football can displace.

2.4 Finding Logarithms–Due December 5

Assemble the following points into a coherent essay about calculating the logarithmof any positive number.

1. Using the Maclaurin series for1

1− x , find the series of ln (1− x) and ln (1 + x).

2. Use the fact that ln1 + x

1− x = ln (1 + x)− ln (1− x) to find the series for ln1 + x

1− x.

3. The series for1

1− x converges for |x| < 1. Explain why your series for ln1 + x

1− xconverges for |x| < 1.

4. Show if c > 0 then we can find x in the domain −1 < x < 1 such that 1 + x1− x = c.

5. Conclude that your series will calculate ln c for any positive c. Use the firstten terms of your series (with Mathematica) to approximate ln (0.5), ln 2, ln 10.How accurate are your answers?

10

Page 12: Calculus II–Math 227.04

Chapter 3 Lectures

3.1 Introduction to TestGiver

1. I’ve written a computer program TestGiver to “help” you do your homework.

(a) Truth in advertising: TestGiver helps me by automatically grading andrecording your homework

(b) TestGiver helps you in two ways:

i. TestGiver tells you if your answer is right or wrong.

A. Usually you can keep trying for a right answer

ii. TestGiver includes computational and graphical tools

2. You will download TestGiver from the class website and install it on your PC,or you can use it in the Math/Stat lab in TH 409.

3. You will download weekly homework assignments from the class website.

(a) You can work on an assignment, save your work, and continue at a latertime.

(b) You can print your homework, work out the answers, then go a computerto enter them. You do not have to do all your work on the computer.

(c) When you have finished your homework, you send it to me over the internetwith one click of the mouse.

4. If using this system causes a hardship for you, please see me. We’ll work out adifferent homework system for you.

3.2 Integration

3.2.1 Using Integral Tables

1. Class: define

(a)

Zf (x) dx

(b)

Z b

a

f (x) dx

2. Answers

(a) any function whose derivative is f (x)

(b) (informal) the area under the curve y = f (x) between x = a and x = b,counting area below the x-axis as negative.

(c) F (b)−F (a) isWRONG answer to (b). The fundamental theorem of cal-culus is a method for evaluating integrals, not the definition of the integral.

i. Lots of functions don’t have antiderivatives, but they can still be inte-grated.

ii.

Z 1

0

px3 + 1dx cannot be evaluated by antiderivatives, but it is still

defined.

3. Most problem for the first part of this course reduce to evaluating integrals.

11

Page 13: Calculus II–Math 227.04

4. In back of book is three page table of integrals, which you can copy and bringto all exams.

(a) All methods of integation are there to change an integral to one in thetable. If the integral is already in the table, then use the table.

5. Example:

Z √1 + t2

t2dt

(a) formula 24:Z √a2 + u2

u2du = −

√a2 + u2

u+ ln

³u+

pa2 + u2

´+ C

(b) Let a = 1, u = t, thenZ √1 + t2

t2dt = −

√1 + t2

t+ ln

³t+

p1 + t2

´+ C

(c) Check by differentiation:

d

dt

Ã−√1 + t2

t+ ln

³t+

p1 + t2

´!=

p(1 + t2)

t2

(d) TestGiver: sqrt(1+t^2)/t^2

(e) Mathematica: Sqrt[1+t^2]/t^2

6. Class: Check answers by differentiation. Write in TestGiver notation.

(a)

Zdx

4 + x2

i.1

2arctan

³x2

´+ C

ii. TestGiver: 1/2*atan(x/2)

iii. Mathematica: 1/2*ArcTan[x/2]

(b)

Zcos2 x dx

i.x

2+sin 2x

4+ C

ii. TestGiver: x/2+sin(2*x)/4

iii. Mathematica: x/2+Sin[2x]/4

7.

Zsin3 xdx

(a) Formula 73.Zsinn u du = − 1

nsinn−1 u cosu+

n− 1n

Zsinn−2 u du

(b) Let n = 3, u = x. ThenZsin3 xdx = −1

3sin2 x cosx+

2

3

Zsinx dx

= −13sin2 x cosx− 2

3cosx+ C

(c) Check:d

dx

µ−13sin2 x cosx− 2

3cosx

¶= sin3 x

12

Page 14: Calculus II–Math 227.04

(d) TestGiver: -1/3*sin(x)^2*cos(x)-2/3*cos(x)

(e) Mathematica: -1/3 Sin[x]^2 Cos[x]-2/3 Cos[x]

8. Class:

Zcos4 xdx. Check.Write for TestGiver.

(a)1

4cos3 x sinx+

3

8cosx sinx+

3

8x+ C

(b) 1/4*cos(x)^3*sin(x)+3/8*cos(x)*sin(x)+3/8*x

9. Class:

Z √2− 3xx

dx Check.Write for TestGiver.

(a) 2√2− 3x+√2 ln

¯¯√2− 3x−√2√2− 3x+√2

¯¯+ C

(b) 2*sqrt(2-3*x)+sqrt(2)*ln(abs((sqrt(2-3*x)-sqrt(2))/(sqrt(2-3*x)+sqrt(2))))

10. Warning:

Z1

9 + 4x2dx

(a) Formula 17. Zdu

a2 + u2du =

1

atan−1

u

a+ C

(b) So you might think you could say:

a = 3

u = 2xZ1

9 + 4x2dx =

1

3tan−1

2x

3+ C

But this is wrong because it does not work. Checking by differentiationshows that this answer is wrong.

d

dx

µ1

3tan−1

2x

3

¶=

1

3

1³1 +

¡2x3

¢2´ µ2x3¶0

=1

3

Ã1

9+4x2

9

!µ2

3

¶=

18

9 (9 + 4x2)

=2

9 + 4x2

In the integration formula #17, the expression that is squared u and theexpression after the differential du are the same. In the problem the ex-pression that is squared 2x and the expression after the differential dx arenot the same.

(c) The trick is to reduce the problem to one with a simple variable squared inthe denominator. This is a special case of the method of substitution.

w = 2x

dw = 2dx1

2dw = dxZ

1

9 + 4x2dx =

Z1

9 + w21

2dw

=1

2

Z1

9 + w2dw

=1

2

µ1

3tan−1

w

3+ C

¶=

1

6tan−1

2x

3+ C

13

Page 15: Calculus II–Math 227.04

TestGiver: 1/6*atan(2*x/3)

Mathematica: 1/6 ArcTan[2x/3]

i. Check:

d

dx

µ1

6tan−1

2x

3

¶=

1

6

1

1 +¡2x3

¢2 µ2x3¶0

=1

6

1

1 +¡2x3

¢2 µ23¶

=2

18¡9+4x2

9

¢=

1

9 + 4x2

11. Class. Check and write for TestGiver.Zcos (4x) dx =

1

4sin 4x+ C

= 1/4*sin(4*x)Zx sin

x

2dx = 4 sin

1

2x− 2x cos 1

2x+ C

= 4*sin(x/2)-2*x*cos(x/2)Zln (3x+ 1) dx =

1

3(3x+ 1) ln (3x+ 1)− x− 1

3+ C

= 1/3*(3*x+1)*ln(3*x+1)-x-1/3Zsin−1 5t dt = t arcsin 5t+

1

5

p(1− 25t2) + C

= t*asin(5*t)+1/5*sqrt(1-25*t^2)

3.2.2 Definite Integrals

1. Sample problem: evaluate the integral

Z π

0

x sinxdx :Z π

0

x sinxdx = −x cosx+ sinx|x=πx=0

= (−π cosπ + sinπ)− (−0 cos 0 + sin 0)= (−π (−1) + 0)− (−0 (1) + 0)= π

TestGiver: pi

Mathematica: Pi

(a) Only put in as many steps as you need to calculate accurately

2. Find the area under the curve y = tanx between x = 0 and x = π4

0.2 0.4 0.6 0.8

0.2

0.4

0.6

0.8

1

tanx

14

Page 16: Calculus II–Math 227.04

The answer is the integral

Z π/4

0

tanxdx :

Z π/4

0

tanxdx = − ln cos (x)|x=π/4x=0

= − ln cos (π/4) + ln cos (0)= − ln

µ1√2

¶+ ln (1)

= − ln³2−1/2

´+ 0

=1

2ln 2

TestGiver: 1/2*ln(2)

Mathematica: 1/2 Log[2]

3. Evaluate the integralR π/2−π/2 e

x sin 2xdx

Z π/2

−π/2ex sin 2xdx =

ex

5(sin 2x− 2 cos 2x)

¯x=π/2x=−π/2

=

µeπ/2

5(sinπ − 2 cosπ)

¶−µe−π/2

5(sin (−π)− 2 cos (−π))

¶=

µeπ/2

5(0− 2 (−1))

¶−µe−π/2

5(0− 2 (−1))

¶=

2

5eπ/2 − 2

5e−π/2

TestGiver: 2/5*E^(pi/2)-2/5*E^(-pi/2)

Mathematica: 2/5E^(Pi/2)-2/5E^(-Pi/2)

(a) 97:

Zeau sin bu du =

eau

a2 + b2(a sin bu− b cos bu) + C

4. Class: Check and write for TestGiver.Z π

0

sin2 xdx =π

2

= pi/2Z 2

0

xe3xd =5

9e6 +

1

9

= 5/9*E^6+1/9Z 3

1

x√2 + xdx =

10

3

√5 +

2

5

√3

= 10/3*sqrt(5)+2/3*sqrt(3)

3.2.3 Areas between curves

1. If you have two curves, say the graphs of f (x) and g (x), and if for all a ≤ x ≤ byou have g (x) ≤ f (x),

15

Page 17: Calculus II–Math 227.04

fHxL

gHxLx=a

x=b

then the area between the graph of f (x) and the graph of g (x) for a ≤ x ≤ b isZ b

a

(f (x)− g (x)) dx.

2. Example: find the area between f (x) = x and g (x) = x2 for 0 ≤ x ≤ 1

(a)

Z 1

0

¡x− x2¢ dx = 1

6

(b) In TestGiver and Mathematica, 1/6

3. Class find area between√x and x2 for 0 ≤ x ≤ 1.

(a)

Z 1

0

¡√x− x2¢ dx = 1

3

4. Sometimes you are asked to find the area bounded by two curves.

(a) In the example above we found the area bounded by x and x2

5. Example: find the area bounded by f (x) = sin (πx) and g (x) = 4x2.

16

Page 18: Calculus II–Math 227.04

(a) Observe that

f (0) = g (0) = 0

f (1/2) = g (1/2) = 1

Therefore the bounded area is

Z 1/2

0

¡sin (πx)− 4x2¢ dx = 1

π− 16

i. TestGiver: 1/pi-1/6

ii. Mathematica: 1/Pi-1/6

iii. This is plausible–the answer is positive and the area under sinπx =1

π, is about twice the area under 4x2 =

1

6.

6. Class find area between 4x2 and x2 + 3.

(a) Answer:

Z 1

−1

¡¡x2 + 3

¢− 4x2¢ dx = 47. Class find area between x+ 2 and x2. Make a graph.

(a)

Z 2

−1

¡(x+ 2)− x2¢ dx = 9

2

8. Example: Approximate the area bounded by ex and x+2.to at least four digitsaccuracy.

0

1

2

3

4

-2 -1 1x

(a) First we must find the intersections, which can only be approximated.

i. Using TestGiver to find the lower rootInputFindRoot((x+2)-E^x; x, -2)

Output-1.84141

The left intersection is at x = −1.84141.

17

Page 19: Calculus II–Math 227.04

ii. Using Mathematica to find the upper root

The right intersection is at x = 1.1462.

(b) The area isZ 1.1462

−1.8415(x+ 2− ex) =

x2

2+ 2x− ex

¯x=1.14162x=−1.8415

=

µ1.141622

2+ 2 (1.14162)− e1.14162

¶−Ã(−1.8415)2

2+ 2 (−1.8415)− e−1.8415

!= (−0.1969)− (−2.1460)= 1.9491

i. TestGiver calculates the answer as follows:Inputa=FindRoot((x+2)-E^x; x, -2);

b=FindRoot((x+2)-E^x; x, 1);

c=Integrate((x+2)-E^x; x, a, b)

Outputa : REAL

a = -1.84141

b : REAL

b = 1.14619

c : REAL

c = 1.94909

ii. You could use Mathematica like this:

3.2.4 Integration by Substitution

1. The most important method for integration is substitution. We begin withindefinite integrals (anti-derivatives).

(a) ConsiderRx sinx2dx

i. You can break this into two factors: sinx2 and x dx. The factorsmultiply to the whole thing

ii. Define u = x2 and note that du = 2xdx , so our integral can be

rewritten as1

2

Rsinu du = −1

2cosu+ C = −1

2cosx2 + C

iii. ALWAYS check by differentiation. In this class you get negative pointsfor wrong antiderivatives, since they are so easy to check.

18

Page 20: Calculus II–Math 227.04

(b) Here is the general idea: given an integralRf (x) dx, try to rewrite the

integrand so that g is easier to integrate than f .

f (x) dx = g (u (x)) u0(x) dx

i. ThenRf (x) dx =

Rg (u) du = G (u) + C = G (u (x)) + C

(c) Example:Rx e−x

2

dx.

i. I see Zx e−x

2

dx =

Ze(−x

2) (xdx)

which looks sort of like: Zeudu

which I can do. The correspondence is not exact, but it is good enoughto encourage me to proceed.

ii. I define

u = −x2du = −2x dxxdx = −1

2du

iii. Then I have Zxe−x

2

dx = −12

Zeudu

= −12eu + C

= −12e−x

2

+ C

(d) Example:R lnxxdx. Z

lnx

xdx =

Z(lnx)

µ1

x

¶dx

≈Zu du

i. I decide to try the substitution

u = lnx

du =1

xdx

ii. Then I get: Zlnx

xdx =

Zu du

=1

2u2 + C

=1

2(lnx)2 + C

(e) Class try:Rcos (5x) dx,

Rcos3 x sinxdx,

R √2x− 4dx, R tanx dx, R x√x− 1dx,R x√

2x− 1dx,

2. Substitution and definite integrals

19

Page 21: Calculus II–Math 227.04

(a)R√π0

x sinx2 dx

u = x2

x dx =1

2du

x 0√π

u 0π

2Z x=√π

x=0

x sinx2dx =1

2

Z u=π/2

u=0

sinu du

= −12cosu|u=π/2u=0

= −12cosx2|x=

√π

x=0 BAD IDEA

= −12cos

π

2+1

2cos 0 BETTER IDEA

=1

2

(b)R π0sin 5x dx,

R 20

dx

2x+ 3,R π/20

sin3 x cosx dx,R π0(cosx) esinxdx,

R 30x√x+ 1dx

3. More substitution practiceR π/40

sin 4t dt = 12

R 10cosπt dt = 0

R 10(2x− 1)100 dx = 1

101R 1/20

dx

1 + 4x2= 1

8πR e4e

dx

x√lnx

= 4− 2 ln 12 e

R π/30

sin θ

cos2 θdθ = 1R 1

0

ex + 1

exdx = −e−1 + 2 R 1

0

ex

ex + 1dx = ln (e+ 1)− ln 2 R 3

2

3x2 − 1(x3 − x)2 dx =

18R 1/2

0

sin−1 x√1− x2 dx =

172π

2R 41

1

x2

r1 +

1

xdx = − 5

12

√5 + 4

3

√2

R π/2−π/2

x2 sinx

1 + x6dx =

R 12π

− 12πx2 sinx1+x6 dx

3.2.5 Volumes

1. Here is a general procedure for finding the volume of a solid object

(a) Draw a straight line next to the object, called the reference line. Gettingthe right reference line is the key to successfully computing the volume.

(b) Pick one point on the line to be 0. Pick a positive direction on the line.Usually 0 will be at one end of the object, and the object will be on thepositive side of 0.

(c) Consider the cross-section of the object perpendicular to the line at x.Ifyou choose a good line, this cross-section will have a simple shape and acomputable area. For every point x on the line, find a formula A (x) forthe area of the cross-section.

(d) The volume is the integral of A (x) from the beginning of the object atx = a to the end at x = b:

V =

Z b

a

A (x) dx

2. Example: consider a circular cone of height 5 and bottom radius 3.

(a) Draw a picture

(b) Let the reference line be parallel to the central axis of the cone.

(c) Let x be the coordinate of the reference line. Put x = 0 at the point onthe line next to the top of the cone. The bottom of the cone is at x = 5.

20

Page 22: Calculus II–Math 227.04

(d) For any point x between 0 and 5, the cross-section of the cone is a circle

with radius3x

5. Thus the area of the cross-section is

9πx2

25.

(e) The volume isR 50

9πx2

25dx = 15π

(f) Check: the formula for the volume of a circular cone is1

3πr2h where h is

the height and r the radius of the bottom.

3. Class find volume of circular cone with bottom radius 2 and height 4.

4. Find volume of truncated cone with height 3 , bottom radius 4, top radius 2.

(a) Draw a picture

(b) Let the reference line be parallel to the central axis of the cone.

(c) Let x be the coordinate of the reference line. Put x = 0 at the point onthe line where the cone would come to a point. The point where the conehas radius 2 is at a and the point where the cone has radius 4 is at b.Let rbe the radius at x

b− a = 3b

4=

a

2a = 3

b = 6

r =2

3x

(d) The volume is Z 6

3

π

µ2

3x

¶2dx = 28π

5. Class find volume of truncated cone with height 4, bottom radius 3, top radius1.

6. Volumes of Rotation

(a) Many volumes arise by revolving a curve around a line.Here is an example

(b) Consider the curve y = cosx.for 0 ≤ x ≤ π

2. and the region between the

curve and the x-axis. Revolve this region around the x-axis. To find theresulting volume:

i. Draw a picture

Graph of y = cosx rotated about the x-axisii. Let the x-axis be the reference line.

21

Page 23: Calculus II–Math 227.04

iii. Use the coordinates on the x-axis for the coordinates of the referenceline.

iv. The cross-section perpendicular to a the x-axis at a point x is a circlewith radius cosx. Thus the area is A (x) = π cos2 x.

v. The volume isZ π/2

0

π cos2 x dx = π

µx

2− sin (2x)

4

¯π/20

=1

4π2

by table #64

A. On a test, if you can’t do the problem, at least set up the integralcorrectly.

vi. This is called the method of disks because you divide the volume intoa sequence of disks.

(c) Class do: Consider the region between the graph of ex and the x-axis for1 ≤ x ≤ 3. Revolve the region about the x-axis.i. Draw a picture

ii. set up the integral

iii. and find the volume

iv. Answer:R 31π (ex)

2dx = π

R 31e2xdx = π

¡12e6 − 1

2e2¢

7. Suppose we consider the graph of y = cosx for 0 ≤ x ≤ π

2and rotate the region

betwee the curve and the x-axis about the y-axis.

(a) Make a drawing

Graph of y = cosx revolved about the y-axis

(b) Let the reference line be the y-axis.

(c) Use the coordinates on the y-axis for the coordinates of the reference line.

(d) The cross section at point y is a circle of radius arccos y so the area is

A (x) = π arccos (y)2(that doesnt’ look good)

(e) The volume isR 10π (arccos (y))

2dy = π (π − 2) by Mathematica .

8. Class do: consider the region bounded by y = 2x, y = 0, x = 1. Rotate theregion about the y-axis.

(a) i. Draw a picture

ii. set up the integral

iii. and find the volume

iv.R 20π³1− ¡y2¢2´ dy = 4

22

Page 24: Calculus II–Math 227.04

9. There is a better way, the method of shells.

(a) Draw a picture.

(b) Pick a central axis for the object (in this case the y-axis). For this methodto work, the following must be true about your object and the axis. If youtake a cylindrical slice around the axis (take all the points in the volumea given distance away from the axis), you get a round cylindrical shell ofconstant height.

(c) Pick a ray perpendicular to the central axis (in this case the positive x-axis).The coordinates of the ray start at 0 where the ray leaves the axis.

(d) For each point x on the ray, let h (x) be the height of the cylindrical shellabove x. The area of the shell is then A (x) = 2πxh (x).

(e) The volume is the integral of A (x) along the ray from the axis to the edgeof the object.

10. For the example above

(a) Draw a picture

Graph of y = cosx revolved about the y-axis showing a cylindrical shell at x = 1.

(b) Use the y-axis for the central axis.

(c) Use the x-axis for the ray.

(d) The height is h (x) = cosx so the area of a shell is A (x) = 2πx cosx

(e) The volume isZ π/2

0

2πx cosx dx = 2π (cosx+ x sinx|π/20

= π2 − 2π

by table #81

11. Class try: Find the volume you get revolving the region bounded by y = xex,y = 0, x = 2 about the y-axis.

(a) Draw a picture

(b) set up the integral

(c) and find the volume

(d)R 202πx (xex) dx = 2π

R 20x2exdx = 2π

¡2e2 − 2¢

12. Variations

(a) Consider the region bounded by y = sinx, x = 0, and y = 1. Rotate theregion about the line y = 1.

23

Page 25: Calculus II–Math 227.04

i. Draw a picture

Graph of y = sinx rotated about y = 1 with cross-section at x = 0.6

i. Use the x-axis as the reference line.

ii. Use the coordinates of the x-axis for the coordinates of the referenceline.

iii. The cross-section at x is a circle of radius 1 − sinx so the area isA (x) = π (1− sinx)2.

iv. The volume isZ π/2

0

π (1− sinx)2 dx = π

Z π/2

0

¡1− 2 sinx+ sin2 x¢ dx

= π

µx+ 2 cosx+

x

2− sin 2x

4

¯π/20

=3

4π2 − 2π

using table #63 to integrate sin2 x.

(b) Class: region bounded by y = x− x2 and y = 0 about the line y = 1.i. Draw a picture

ii. set up the integral

iii. and find the volume

iv. AnswerR 10π¡1− ¡x− x2¢¢2 dx = 7

10π

(c) Consider region between the graph of y = lnx, y = 0, and x = 2. Rotatethis region about the y-axis.

i. Draw a picture

Graph of lnx , 1 ≤ x ≤ 2, revolved about y-axis with cylinrical shell at x = 1.5.ii. Us the y-axis as the central axis.

24

Page 26: Calculus II–Math 227.04

iii. Use the x-axis as the ray.

iv. At distance x the height is lnx and the area of a shell is A (x) =2πx lnx.

v. The volume Z 2

1

2πx lnxdx = 2π

µx2

4(2 lnx− 1)

¯21

= 4π ln 2− 32π

by table #101.

(d) Class: region bounded by y = x− x2 and y = 0 about the line x = 1.i. Draw a picture

ii. set up the integral

iii. and find the volume

iv. Answer:R 102π (1− x) ¡x− x2¢ dx = 1

13. More volumes

(a) y = sinx, y = 0, 0 ≤ x ≤ π. revolved about the x-axis.

i.R π0π sin2 x dx = 1

2π2

(b) y = sinx, y = 0, 0 ≤ x ≤ π. revolved about the line y = 1.

i.R π0π (1− sinx)2 dx = 3

2π2 − 4π

(c) y = ex, y = 0, x = 0, x = 1; revolved about x-axis.

i.R 10π (ex)

2dx = 1

2πe2 − 1

(d) y = x2, y = 4, x = 0; revolved about y-axis.

i.R 40π¡√y¢2dy = 8π

(e) y = x2, x = 0, x = 2; revolved about y-axis.

i.R 40π³22 − ¡√y¢2´ dy = 8π

3.2.6 Integration by Parts

1. differential notation

(a) instead of writing y = f (x), dydx = f0 (x), we write dy = f 0 (x) dx

(b) this is called a differential form

(c) for example

i. if y = x2 then dy = 2xdx

ii. if y = sinx then dy = cosxdx

iii. if y = x lnx then dy = (lnx+ 1) dx

(d) You can think of this as saying that if you start at x,you have a certainvalue for y, and if change x by dx then y changes by approximately dy.

(e) The fundamental theorem of calculus can be writtenR badf = f |ba

2. Given a product of functions y = p (x) q (x) we have

dy = d (pq) = p dq + q dpZd (pq) =

Zp dq +

Zq dpZ

p dq =

Zd (pq)−

Zq dp

= pq −Zq dp

25

Page 27: Calculus II–Math 227.04

3. How can we use this bit of formal nonsense?

(a)Rxexdx

p = x dq = exdxdp = dx q = exRx exdx = xex − R exdx

= xex − ex + C(b)

Rx3 lnxdx

p = lnx dq = x3dx

dp =dx

xq =

x4

4Rx exdx =

x4

4lnx− 1

4

Rx3dx

=x4

4lnx− x

4

16+ C

(c)Rsin−1 x dxp = sin−1 x dq = dx

dp =dx√1− x2 q = xR

sin−1 x dx = x sin−1 x− R x√1− x2 dx

u = 1− x2 du = −2xdxR x√1− x2 dx = −

1

2

R du√u

= −√u = −√1− x2Rsin−1 x dx = x sin−1 x+

√1− x2

4. class

(a)Rxe−xdx = −xe−x − e−x

(b)Rx2 ln (2x) dx =

1

3x3 ln 2x− 1

9x3

(c)Rtan−1 x dx = x arctanx− 1

2ln¡x2 + 1

¢5. me

(a)R π0x sinx dx

p = x dq = sinx dxdp = dx q = − cosxR π0x sinx dx = −x cosx|π0 +

R π0cosx dx

= −π (−1)− 0 + 0 = π

Note: we expect a positive result

(b)R π/20

x2 cosxdx

p = x2 dq = cosxdxdp = 2xdx q = sinxR π/20

x2 cosxdx = x2 sinx¯π/20− 2 R π/2

0x sinx dx

=π2

4− 2 R π/2

0x sinx dx

p = x dq = sinx dxdp = dx q = − cosxR π/20

x sinx dx = −x cosx|π/20 +R π/20

cosxdx= 1R π/20

x2 cosxdx =π2

4− 2 (1) = π2

4− 2

6. class

26

Page 28: Calculus II–Math 227.04

(a)R 10x exdx = 1

(b)R 31lnx dx = 3 ln 3− 2

(c)R 20x2exdx = 2e2 − 2

7. me

(a)R π/20

ex sinx

p = sinx dq = ex dxdp = cosx dx q = exR π/20

ex sinxdx = ex sinx|π/20 − R π/20

ex cosxdx

= eπ/2 − R π/20

ex cosxdx

p = cosx dq = ex dxdp = − sinx dx q = exR π/20

ex cosx dx = ex cosx|π/20 +R π/20

ex sinx dx

= −1 + R π/20

ex sinx dxR π/20

ex sinxdx = eπ/2 −³−1 + R π/2

0ex sinx dx

´= eπ/2 + 1− R π/2

0ex sinx dx

2R π/20

ex sinx dx = eπ/2 + 1R π/20

ex sinxdx =eπ/2 + 1

2

8. class

(a)R π−π e

x cosxdx =1

2

¡−1 + e−2π¢ eπ9. Class Z 1

0

x2e−xdx = −5e−1 + 2Z π/2

0

x2 sin 2xdx =1

8π2 − 1

2Z 4

1

ln√xdx = 4 ln 2− 3

2Zsin√xdx = 2 sin

√x− 2√x cos√xZ 4

1

e√xdx = 2e2

3.2.7 Work Problems

1. Work is a technical concept from physics. By definition,

work = force× distance

2. If distance measured in feet and force in pounds, then work in foot-pounds.

3. If distance in meters and force in Newtons (N), then work in Joules (J).

(a) The force required to lift an object of mass m kilograms is 9.8m Joules atthe Earth’s surface.

4. Example: a bucket of cement weighing 500lbs is lifted from ground level to thetop of a 200’ building. How much work is done?

(a) 500 lbs × 200 ft = 100, 000 ft-lbs.

27

Page 29: Calculus II–Math 227.04

5. Example: a bucket of cement weighing 300 kgs is lifted from ground level to thetop of a 80 m. building. How much work is done?

(a) 300 kg × 80 m × 9.8 Jkg−m = 2. 352× 105J .

6. Class: how much work is required to lift a 50 lb object 75 ft? How much workis required to lift a 50 kg. object 75 m?

7. Work accumulates as you move an object. How do you measure work when theforce required to move the object is not constant?

8. Example: a bucket of cement weighing 500lbs is lifted from ground level to thetop of a 200’ building, and for every foot lifted 1 lb of cement leaks out of thebucket. How much work is done?

9. If a constant force F is applied to an object, the work performed in moving theobject a distance x isW (x) = F x.Therefore, dWdx = F . We can extend this ideato a variable force.

(a) Alternate definition of work: The rate of change of work with respect todistance is the force exerted at each point. If an object is being movedalong the x-axis, and a force f (x) is applied at each point x to move theobject, and the work required to move the object from a to x isW (x) then

dW

dx= f (x)

(b) In other words, if you have to exert a force f (x) at each point x to move anobject along the x-axis from x = a to x = b, then the total work performed

is W =R baf (x) dx.

10. Consider the leaky cement bucket. Coordinatize the situation with a variable xby setting x = 0 at the bottom of the building and x = 200 at the top. Whenthe leaky cement bucket is at position x, it weights 500− x lbs. Therefore theforce required to move the bucket is 500− x. The work necessary to move thebucket to the top of the building is

R 2000

(500− x) dx = 80 000.11. Class: If the leaky cement bucket starts with 100 kg. of cement and loses 2 kg

per meter lifted, how much work is required to lift the bucket a distance of 50meters? How much cement reaches the workers at the top?

12. Example. The force required to pull a spring is proportional to the distancefrom rest. For a particular spring, suppose the force is 5x, where x is measuredin feet from the resting position and f is measured in pounds.

(a) The spring constant is 5.

(b) The work required to pull the spring out 2 feet isR 205xdx = 10 ft-pounds.

13. Class: if 4 lbs of force stretch a spring 20 cm.,

(a) what is the spring constant?

(b) how much work is required to stretch the spring from rest to 50 cm?

(c) how much work is required to stretch the spring from 10 cm to 30 cm?

3.2.7.1 Collective Work

1. Work is additive. If a task is divided into two parts, the work required for thewhole is the sum of the work required for each part.

2. Suppose a 200’ chain that weighs 5 lbs/ft is hanging from a 200’ building. Howmuch work is required to lift the chain to the top of the building?

28

Page 30: Calculus II–Math 227.04

(a) Think of the chain as divided into (infinitessimally) small segments oflength dx. Each segment weighs 5dx lb. Let x measure distance fromthe top of the building. The work required to lift the segment of chain atposition x to the top of the building is 5x dx.

(b) The total work required to lift the chain to the top of the building is thesum of the work required to lift each segment, orZ 200

0

5x dx = 100 000 ft-lbs

(c) Class: how much work is required if the chain is only 100 feet long?R 1000

5x dx = 25000 ft-lbs.

(d) Suppose the chain is 300 feet long? Divide it into two parts: 100 feet ofchain lying on the ground and 200 feet of chain hanging from the top ofthe building. The work required to lift the part on the ground is 100 ft ×5lbs/ft ×200 ft = 100 000 ft-lbs. The work required to lift the hanging parthas already been computed to be 100 000 ft-lbs. The total work is 200 000ft-lbs.

3. Suppose a conical water tank is 4 ft tall, and the radius at the top is 3 ft. If thetank is full of water, how much work is required to pump the water out of thetank?

(a) This is the work required to lift all the water to the top of the tank.

(b) Divide the water into horizontal slices of thickness dx, where x measuresthe vertical distance from the top of the tank. The radius at position x is

3 − 34x ft, so the volume of the slice is π

¡3− 3

4x¢2dx. The weight of the

slice is 62.4π¡3− 3

4x¢2dx. The work required to lift the slice to the top of

the tank is 62.4πx¡3− 3

4x¢2dx, and the total work required to pump the

water out of the tank is:Z 4

0

62.4πx

µ3− 3

4x

¶2dx = 2352. 42 ft-lbs

(c) Class: if the water is only 2 ft deep, how much work is required to pumpit out of the tank? Z 4

2

62.4πx

µ3− 3

4x

¶2dx = 735.133

(d) Class: if the tank is 4 m high and has a top radius of 3 m, how much workis required to pump out a full tank?Z 4

0

9.8× 1000πxµ3− 3

4x

¶2dx = 3.69451× 105J

4. Class: A rectangular aquarium 18” long, 12” wide and 12” high is 80% full ofwater. How much work is required to pump it out?Z 1.0

0.5

62.5× 1.5xdx = 32.1563 ft-lbs

5. Class: A cattle tank is 6’ long with 1/2-round ends of diameter 2’. If the tankis full, how much work is required to pump it out?Z 1

0

62.4× 6× 2xp1− x2dx = 249.6 ft-lbs

(a) One cubic foot is 7.481 gallons. If the tank holds 50 gallons, how muchwork is required to pump it out?

29

Page 31: Calculus II–Math 227.04

3.2.8 First Moments and Centers of Mass

1. A point-mass is a mathematico-physical fiction consisting of a single point withweight.

(a) Suppose a point-mass m is placed at a position x1 on the x-axis. Thefirst moment of the mass about the point x0 is (x1 − x0)m. That’s adefinition. You can’t argue with it.

(b) If several masses m1, . . . ,mn are placed at positions x1, . . . , xn. The firstmoment of the system of masses about the point x0 is

Pni=1 (xi − x0)mi.

(c) Example: a 2 kg mass and a 3 kg mass are 5 m apart. What is the firstmoment of the system about a point 2 m from the first mass and 3 m fromthe second?

i. Create an x-axis with the 2 kg mass at x = 0 and the 3 kg mass atx = 5. The first moment about x = 2 is

2 (0− 2) + 3 (5− 2) = 5 kg-m

(d) Class: a 4 lb mass is placed 6 ft from a 3 lb mass. What is the first momentof the system about a point half-way between the masses?

(e) Class: find the point between the masses about which the first moment is0.

2. The first moment measures how unbalanced the system is (how much torqueit exerts). A system with positive first moment tilts toward the high side; asystem with negative first moment tilts toward the low side; a system with zerofirst moment is balanced.

(a) Archimedes discovered this.

(b) Children using a see-saw have intuitive knowledge of this principal.

(c) How can you find the balance point for a system?

3. Theorem: Suppose you have a system of masses placed on the x-axis. Let thefirst moment about x = x0 beM, and the let the sum of the masses be m. Thenthe first moment about the the point x = x0 +

Mm is 0

(a) Corollary: Suppose you have a system of masses placed on the x-axis.Let the first moment about x = 0 be M, and the let the sum of the massesbe m. Then the first moment about the the point x = M

m is 0

(b) The point about which the first moment is 0 is unique and is called thecenter of mass of the system. The system is “balanced” about this point.

(c) Example: a 2 kg mass and a 3 kg mass are 5 m apart. What is the firstmoment of the system about a point 2 m from the first mass and 3 m fromthe second?

i. Create an x-axis with the 2 kg mass at x = 0 and the 3 kg mass atx = 5. The sum of the masses is m = 5kg. The first moment aboutx = 0 is

M = 2 (0− 0) + 3 (5− 0) = 15 kg-mThe center of mass is x = M

m = 15 kg-m5 kg = 3 m on the x-axis.

(d) Class: a 4 lb mass is placed 6 ft from a 3 lb mass. Where is the center ofmass?

4. Masses are placed at points in the xy-plane:

mass 5 4 3 4location (3, 2) (4,−1) (−2, 3) (−2,−5)

30

Page 32: Calculus II–Math 227.04

(a) You can find the moment of the system about the y-axis by ignoring the y-measurements and pretending that all the masses are on the x-axis. Some-times this is called the x-moment. Its value is

Mx = 5× 3 + 4× 4 + 3× (−2) + 4× (−2)= 17

(b) Similarly the moment about the x-axis is

My = 5× 2 + 4× (−1) + 3× 3 + 4× (−5)= −5

(c) The sum of the masses is m = 16, and the center of mass is

x =Mx

m

=17

16

y =My

m

= − 516

The system is balanced about this point.

(d) Class: if masses are located at

mass 5 2 3 4location (3, 1) (2,−1) (−3, 4) (−2,−6)

find the center of mass.

5. Now we want to extend the concepts of moment and center of mass from point-masses to extended objects.

6. Suppose a rod has length 3 has density ex/10 where x is the distance from theleft end.

(a) The weight of an (infinitessimal) segment of rod of length dx at position xis ex/10dx.

(b) The total weight of the rod is the sum of the infinitessimal weights:

m =

Z 3

0

ex/10dx = 3.49859

(c) The moment of this segment about the left end x = 0 is xex/10dx. Thetotal moment about the point x = 1 is the sum of the moments of all theinfinitessimal segments, or:

M =

Z 3

0

xex/10dx = 5.50988

(d) The center of mass is x = Mm = 1.57489. This is the point about which the

rod balances.

(e) Check that the moment about this point is 0:Z 3

0

(x− 1.57489) ex/10dx = −7.9× 10−6

(f) Class: a rod has density 1 + x2 at distance x from the left end. Find thecenter of mass of the rod.

31

Page 33: Calculus II–Math 227.04

7. Finding the center of mass for a 2-dimensional region is more difficult. Thegeneral problem is left for next semester, when you study multiple integration.We restrict ourselves to regions or lamina of constant density. In this case thecenter of mass of the region is called its centroid.

8. Consider the rectangle bounded by (0, 0) , (0, 3) , (3, 4) , (0, 4).

(a) Since we are assuming constant density, we might as well take density equalto 1 for finding the centroid. The mass is then the same as the area, or

m = 12

(b) To find the first moment in the x-direction, we think of the rectangle asdivided into vertical strips (of infinitessimal width, of course). Each striphas mass 4dx, and x-moment 4x dx. Therefore the total x-moment is

Mx =

Z 3

0

4xdx

= 18

(c) To find the first moment in the y-direction, we think of the rectangle asdivided into vertical strips again. Each strip has mass 4dx and its centerof mass is at distance 2 from the x-axis. Therefore the y-moment of eachstrip is 2× 4dx, and the y-moment is

My =

Z 3

0

8 dx

= 24

(d) The center of mass is then:

x =Mx

m= 1.5

y =My

m= 2

which is the answer we expect.

9. Consider the half-disk bounded by y =√R2 − x2 and the x-axis. By symmetry

x = 0. By geometry,

m =π

2R2

To calculate y, we have divide the half-disk into vertical strips of mass√R2 − x2dx

distance x from the y-axis. The y-moment of each strip ispR2 − x2

√R2 − x22

dx =R2 − x22

dx

and the total y-moment is:

My =

Z R

−R

R2 − x22

dx

=2

3R3

The y-coordinate of the center of mass is then:

y =23R

3

π2R

2

=4

3πR

This answer is reasonable because

32

Page 34: Calculus II–Math 227.04

(a) it is a linear multiple of R

(b) it is less than 1/2 way to the top of the circle

10. Class: find the centroid of the region bounded by the x-axis and the graph ofy = x − x2. Start by setting up the integrals for the the mass and the twomoments.

m =

Z 1

0

¡x− x2¢ dx = 1

6

Mx =

Z 1

0

x¡x− x2¢ dx = 1

12

My =

Z 1

0

¡x− x2¢22

dx =1

60

x =11216

=1

2

y =16016

=1

10

Why is your answer reasonable?

11. General formula: given a region bounded by y = f(x), y = g(x), a ≤ x ≤ b, andassuming f(x) < g(x), we have:

m =

Z b

a

(g (x)− f (x)) dx

Mx =

Z b

a

x (g (x)− f (x)) dx

My =

Z b

a

(g (x)− f (x))22

dx

x =Mx

my =

My

m

12. Class: Find the center of mass of the triangle bounded by (0, 0), (0, 3), (1, 2).

3.2.9 Partial Fractions

This is really a theorem in algebra that has applications to calculus.

1. Let p (x) = xn + an−1xn−1 + · · ·+ a1x+ a0 be a monic polynomial.(a) monic means leading coefficient is 1.

(b) Carl Friedrich Gauss (1777-1855) proved the Fundamental Theorem of Al-gebra (1799): p can be factored in linear factors:

p = (x− a1)n1 · · · (x− at)nt

i. the ai are all different

ii. n1 + · · ·+ nt = niii. the ai might be complex numbers using the imaginary square root

i =√−1.

(c) If the coefficients of the polynomial are real numbers, it is easy to deducefrom Gauss’ theorem that p can be factored into real linear and quadraticfactors:

p = (x− a1)n1 · · · (x− as)ns¡x2 + b1x+ c1

¢m1 · · · ¡x2 + btx+ ct¢ms

where n1 + · · ·+ ns + 2 (m1 + · · ·+mt) = n

33

Page 35: Calculus II–Math 227.04

i. For the quadratic terms it is always true that b2i < 4ci.so the quadraticscannot be factored.into real factors.

2. This is not easy to do by hand or by machine.

(a) Even if a polynomial has integer coefficients, it probably does not havefactors with integer coefficients.

i. for example x2 − 5 = ¡x−√5¢ ¡x+√5¢(b) Evariste Galois (1811-1832, killed in a duel) proved (1832) that if deg p > 4

then there cannot be a general method for finding the factors.

(c) When a polynomial can be factored into factors with integer coefficients,Mathematica can sometimes find the factors.

Note 3 + 1 + 2 (1 + 2) = 10

(d) Mathematica can also factor any polynomial approximately into real andquadratic factors. Just enter the polynomial with floating point coefficients.

3. Here’s the part that helps with calculus.

4. A rational function is a quotient of polynomialsp (x)

q (x).

(a) Dividing the numerator and denominator by the leading coefficient of q wecan assume that q is monic.

(b) If deg p ≥ deg q then we can use polynomial division to getp (x)

q (x)= a (x) +

r (x)

q (x)

where deg (r) < deg (q)

(c) Every rational functionr (x)

q (x)where q is monic and deg r < deg q can be

written in a special way.

i. The denominator q (x) can be factored into linear and quadratic fac-tors:

q (x) = (x− a1)n1 · · · (x− as)ns¡x2 + b1x+ c1

¢m1 · · · ¡x2 + btx+ ct¢mt

ii. For each linear factor (x− ri)ni we get a sum of terms where numera-tors are real:

ui =∗

x− ai +∗

(x− ai)2+ · · ·+ ∗

(x− ai)ni

iii. For each quadratic factor we get a sum of terms with real linear nu-merators:

vi =∗x+ ∗

x2 + bix+ ci+

∗x+ ∗(x2 + bix+ ci)

2 + · · ·+∗x+ ∗

(x2 + bix+ ci)mi

34

Page 36: Calculus II–Math 227.04

iv.r (x)

q (x)= u1 + · · ·+ us + v1 + · · ·+ vt

5. Example:

6. Another example:

7. Class: What is the FORM of the partial fraction decomposition of: the followingexpressions? Which ones have polynomial parts?

35

Page 37: Calculus II–Math 227.04

(a)1

(x+ 1) (x+ 2)

(b)3x+ 2

(x+ 1)2

(c)x2 − 3x+ 2

(x+ 1) (x+ 2)3

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

(e)x3 − 4x2 + 2x− 1(x2 − 3x+ 4) (x+ 2)

(f)x3 + 2x2 − x− 1

(x2 − 3x+ 4) (x+ 2)2

(g)x7 − 6x6 + x5 − x2 + 2(x2 − 3x+ 4)2 (x+ 2)2

8. How can we find the constants without using Apart in Mathematica?

(a) By hand. I’ll show you how to do some simple ones:

i. Suppose we have only linear terms appearing to the first power (re-member, deg p < u)

a =p (x)

(x− r1) · · · (x− ru)=

d1x− r1 + · · ·+

dux− ru

di =p (ri)

(ri − r1) · · · (ri−1 − ri) (ri+1 − ri) · · · (ru − ri)ii. Example:

a =x2 − 2x+ 4

x (x− 2) (x+ 1)d1 =

02 − 2× 0 + 4(0− 2) (0 + 1)

= −2d2 =

22 − 2× 2 + 4(2) (2 + 1)

=2

3

d3 =(−1)2 − 2× (−1) + 4(−1) ((−1)− 2)

=7

3

a =−2x+

2/3

x− 2 +7/3

x+ 1

iii. Class try

A.3x− 5

(x− 2) (x− 3)B.

5

(x− 1) (x+ 1)

36

Page 38: Calculus II–Math 227.04

(b) How about

3x− 1(x− 2)2 =

a

x− 2 +b

(x− 2)2

=a (x− 2) + b(x− 2)2

=ax+ (b− 2a)(x− 2)2

a = 3

b− 2a = −1b = 5

3x− 1(x− 2)2 =

3

x− 2 +5

(x− 2)2

(c) Class tryx+ 2

(x− 1)2

9. Why do we care:

(a) We can integrate all the terms of a partial fraction decomposition, so we

can integrate anything of the formp (x)

q (x).

(b) We show this by example:Z3

(x− 1)3 dx =−3/2(x− 1)2 + CZ

3

x− 1dx = 3 ln (x− 1) + C

(c) Class try: Z2

(x+ 2)2dx

Z4x− 2

x2 + 2x+ 4dx =

Z2 (2x+ 2)− 6x2 + 2x+ 4

dx

=

Z2 (2x+ 2)

x2 + 2x+ 4dx−

Z6

(x+ 1)2 + 3dx

= 2 ln¡x2 + 2x+ 4

¢− 2√3 arctan √36(2x+ 2) + C

(d) Class try. Z2x+ 1

x2 + 2x+ 2dx

(e) Here’s a hard one:R 2x+ 1

(x2 + 2x+ 2)2dx . To do these with paper and pencil

requires a method we don’t study. Either look up trig substitutions or goto the lab for Mathematica.

37

Page 39: Calculus II–Math 227.04

3.2.10 Improper Integrals

1. Review L’Hopital’s rule: if limx→a f (x) = ± limx→a g (x) = 0 or ±∞, then

limx→a

f (x)

g (x)= limx→a

f 0 (x)g0 (x)

and one limit exists if the other does. Note a can be ±∞, or the limit could beone-sided.

(a) Example:

limx→0+

x lnx = limx→0+

lnx

1/x

Since limx→0+ lnx = − limx→0+ =∞ we have

limx→0+

lnx

1/x= lim

x→0+1/x

−1/x2= − lim

x→0+x

= 0

Test: calculate x lnx for x = 1e− 6, 1e− 12(b) Class do limx→∞ xe−x

2. Whenever we writeR baf (x) dx we insist that f (x) be defined for a < x < b.

However, we can sometimes permit integrals where f (a) or f (b) (or both) isundefined.We all such integrals improper integrals.

(a) An improper integral asks if an area of infinite extent is finite

i. Is the area under the curve y = e−x, x > 0, finite

ii. Is the area under the curve y =1

x, 0 ≤ x ≤ 1, finite?

(b) Could these areas possibly be finite? How?

i. Like 1 +1

2+1

4+1

8+ · · · = 2

38

Page 40: Calculus II–Math 227.04

(c) Identify which are improper:

i.

R∞1

dx

x2R 31sinxdx

R 31

dx

x+ 1R 10lnx dx

R 10

√x

1− xdxR 10x lnxdx

3. One type of improper integral is one with an infinite limit. We defineZ ∞a

f (x) dx = limM→∞

Z M

a

f (x) dx

(a) Example: Z ∞1

dx

x3= lim

M→∞

Z M

1

dx

x3

= limM→∞

−12x2

¯M1

= limM→∞

µ1

2− 1

2M2

¶=

1

2.

(b) Not every problem works out nicelyZ ∞1

dx

x= lim

M→∞

Z M

1

dx

x

= limM→∞

ln (M)

does not converge

(c) When the integral limit converges to a finite value, we say that the integralconverges or is convergent. Otherwise the integral diverges or fails to con-verge or is divergent. All improper integrals fall into exactly one of thesecategories.

(d) Class tryR∞0e−xdx

R∞0

dx

1 + x2

4. Another type of improper integral has finite limits but an integrand undefinedat one of the limits

(a) If f is undefined at a we defineZ b

a

f (x) dx = limM→a+

Z b

M

f (x) dx

(b) The defnition is similar if f is undefined at b :Z b

a

f (x) dx = limM→b−

Z M

a

f (x) dx

(c) Example: Z 1

0

lnxdx = limM→0+

Z 1

M

lnxdx

= limM→0+

x lnx− x|1M= lim

M→0+−1−M lnM +M

= −1

To get this last limit, you have to know that limM→0+M lnM = 0, whichwe proved above using L’Hopital’s rule

39

Page 41: Calculus II–Math 227.04

i. When you do a problem like this, you have to show all the work.

(d) Not all improper integrals on a finite domain converge eitherZ 1

0

dx

1− xdx = limM−→1−

Z M

0

dx

1− x= lim

M−→1−− ln (1− x)M0

= limM−→1−

− ln (1−M)does not converge because 1−M −→ 0 and ln 0 is undefined

5. Class Try:R 10

dx√x,R 10

dx

x2,R∞0xe−xdx,

6. Warning, not all divergent integrals are infinitely large.R∞0sinxdx does not

converge, but the limit does not go to infinity either.

7. Sometimes all we care about is whether or not an integral converges. We arenot concerned with the exact value of the integral. Here are some ideas you canuse to determine if an integral converges without evaluating it.

(a) Useful principal of absolute convergence: ifR ba|f (x)| dx converges

thenR baf (x) dx converges.

(b) IfR baf (x) dx is improper because f (b) is undefined (maybe because b =∞)

but f (x) is defined on a ≤ x ≤ c < b then R baf (x) dx converges if and only

ifR bcf (x) dx converges.

i. You just have to look at the bad part.

ii.

Z ∞0

dx

1 + x2converges if

Z ∞5

dx

1 + x2

iii.R 10

dx

xconverges if and only if

R 0.000010

dx

xconverges

(c) The comparison test is useful in some cases

i. If 0 ≤ f (x) ≤ g (x) for all a < x < b then 0 ≤ R baf (x) dx ≤R b

ag (x) dx.provided the integrals converge

A. IfR bag (x) dx converges then

R baf (x) dx converges

B. IfR baf (x) dx diverges then

R bag (x) dx diverges.

ii.R∞1

lnx

xdx diverges since

R∞1

dx

xdiverges so

R∞3

dx

xdiverges and 0 <

1

x<lnx

xfor x > 3 so

R∞3

lnx

xdx diverges so

R∞1

lnx

xdx diverges.

iii.R 10

sinx√xdx converges because

A. 0 ≤¯sinx√x

¯≤ 1√

x

B.R 10

dx√xconverges, as we have seen

C. Therefore by the comparison test,R 10

¯sinx√x

¯dx converges

D. Therefore, by the absolute convergence test,R 10

sinx√xdx converges.

8. Class try: Find a comparison to determine the convergence or divergence ofR∞1e−x sinxdx,

R π/20

arctanxdx.

9. Class:R∞0

dx√x (1 + x2)

.Hint: break into two partsR 10

dx√x (1 + x2)

andR∞1

dx√x (1 + x2)

and do a comparison on each part.

40

Page 42: Calculus II–Math 227.04

3.2.11 Numerical Integration

(Warning–this is your teacher’s favorite topic)

1. Two important problems that arise frequently is applied mathematics (mathe-matics applied at NASA projects, biological research, semiconductor manufac-turing, oil refineries, any other area where mathematical models are used topredict and control some process)

(a) Evaluate an integral you cannot anti-differentiate, for exampleZ 100

1

p1 + sin4 xdx.

(b) If you only know a function through experimental obervations

x 0.32 0.47 · · · 3.28f (x) 1.36 2.58 · · · 1.26

estimateR 31f (x) dx. Example: I knew the amount of ligand absorbed by

cell receptors as a function of the density of free ligand in the bloodstream.

2. Outside university courses, these problems are much more important and muchmore frequently encountered than problems using anti-differentiation.

3. Class: without using anti-differentiation, find:

(a)R 415dx

(b)R 412xdx

4. The good news is that any integral can be evaluated numerically, and veryefficient methods exist for doing this.

(a) To numerically evaluateR baf dx in Mathematica you use the command

NIntegrate[f,{x,a,b}]. Here’s how you evaluateR 41sin¡x2¢dx:

(b) To make Mathematica show more digits

There is no point asking for more than 18 digits. To get more, you need togo deeper into Mathematica.

(c) When you are doing a problem like this and you want lots of accuracy, itis a good idea to use different software packages to have them check eachother. X(PLORE) says 4.36865542924733e-1 ± 4.4e− 14

(d) X(PLORE) and Mathematica differ in digit 15. After roundoff, Mathematica says 4,X(PLORE) says 3. But X(PLORE) also warns you not to trust more than 13 digits.Mathematica does not estimate the precision of its result.

41

Page 43: Calculus II–Math 227.04

5. We are going to study some methods of integrating functions numerically. Theeasiest method is the left-hand method

(a) To evaluateR 41sin¡x2¢dx using 6 intervals,

i. Determine the step-size ∆x =4− 13

= 0.5.

ii. make a table for x = 1, 1 +∆x, . . . , 4−∆xx 1 1.5 2 2.5 3 3.5sin¡x2¢

0.84 0.78 −0.76 −0.03 0.41 −0.31iii. Compute the approximation

L =¡sin¡12¢+ sin

¡1.52

¢+ · · ·+ sin ¡3.52¢¢× 0.5

= 0.47

(b) You can do the same thing with one step in Mathematica:

(c) The general formula for the left-hand approximation ofR baf (x) dx using n

intervals is this: define ∆x =b− an

and then compute

L = (f (a) + f (a+∆x) + · · ·+ f (b−∆x))∆x

(d) Class: calculate the left hand approximation ofR 20sinxdx using 4 intervals.

6. The right-hand method uses the points x = 1 +∆x, 1 + 2∆x, . . . , 4:

R =¡sin¡1.52

¢+ sin

¡22¢+ · · ·+ sin ¡42¢¢× 0.5

= −0.0994(a) In Mathematica:

(b) The general formula for the right-hand approximation ifR baf (x) dx using

n intervals is this: define ∆x =b− an

and then compute:

R = (f (a+∆x) + · · ·+ f (b−∆x) + f (b))∆x

(c) Class: calculate the right hand approximation ofR 20sinx dx using 4 inter-

vals.

7. An even better approximation ofR 41sin¡t2¢dt can now be obtained almost for

free. The trapezoidal approximation of the integral is:

L+R

2= 0.1829

(a) Unfortunately, all the work we’ve done so far is for naught. We have alousy approximation.

(b) Class do trapezoidal approximation with 4 intervals forR 20sinx dx

42

Page 44: Calculus II–Math 227.04

8. If we make a table of approximations vs. number of intervals we get (usingMathematica)

(a) For example, to calculate the left approximation using 130 intervals, I couldhave written

(b) The two-in-a-row rule says that if you get the same rounded-off answerfor two different values of n using any method of approximate integration,then you can trust that rounded-off answer.

i. This is a rule of thumb, a principal of mathematical engineering.

ii. It is not difficult to find an example that contradicts it,

iii. I prefer the three-in-a-row rule and require that the number of in-tervals be increased by 50% between approxmations.

(c) Looking at these numbers, I believe that the integral is, to 3-digit accuracy,0.437, since I got that answer two times in a row.

i. From left hand approximations, I could conclude that the integral was0.4 to one decimal place accuracy

ii. From right hand approximations, I could conclude that the integralwas 0.43 to two decimal place accuracy, and I would be wrong!

(d) To get the table above, I used some more powerfulMathematica commands,including functions.

9. A direct way to get the trapezoidal approximation is:

T =

µf (a)

2+ f (a+∆x) + · · ·+ f (b−∆x) + f (b)

2

¶∆x

(a) Here’s a Mathematica calculation of the 6-interval trapezoidal approxima-

tion toR 41sin¡t2¢dt :

43

Page 45: Calculus II–Math 227.04

(b) Class: directly calculate the trapezoidal approximation ofR 20sinxdx using

4 intervals.

10. Even better than the trapezoidal approximation is the midpoint approxima-tion.

(a) The general formula for the midpoint approximation ifR baf (x) dx using n

intervals is this: define ∆x =b− an

and then compute:

M =

µf

µa+

∆x

2

¶+ f

µa+

3∆x

2

¶· · ·+ f

µb− ∆x

2

¶¶∆x

(b) For example, the 6-interval midpoint approximation toR 41sin¡t2¢dt is:

M =³sin¡1.252

¢+ sin

¡1.752

¢+ · · ·+ sin (3.75)2

´× 0.5

= 0.5935

(c) In Mathematica we could compute:

(d) Class: calculate the midpoint approximation ofR 20sinx dx using 4 intervals.

(e) Using more intervals we get:

(f) Using the two-in-a-row rule, we could get 3 digit accuracy for our answer:0.437

i. But I would want a little more evidence.

11. Trapezoidal and midpoint approximations converge faster to the correct answerthan left and right approximations

12. Let’s compare errors in trapezoidal and midpoint approximations, assumingMathematica’s answer is correct

44

Page 46: Calculus II–Math 227.04

(a) Class: do you notice a pattern?

13. Why is midpoint better than trapezoidal. See picture.

14. We could average the trapezoidal and midpoint approximations, but it worksbetter to take a weighted average. If T and M are trapezoidal approximations,then Simpson’s Approximation is

simpson =2Mid+ Trap

3

(a) Class: calculate Simpson’s approximation ofR 20sinx dx using 4 intervals.

(b) Simpson’s approximation is much more accurate than even the trapezoidalor midpoint. Notice how good the values are for even a small number ofintervals:

(c) Why is Simpson’s so much better? Because Simpson’s approximates areaunder parabola over interval, not under straight line.

(d) Simpson’s method is often the preferred choice. It is not too complicated,but fairly accurate.

(e) If we define ∆x =b− a2n

then a direct calculation for Simpson’s method is:µf (a) + 4f (a+∆x) + 2f (a+ 2∆x) + 4f (a+ 3∆x)+

· · ·+ 2f (b− 2∆x) + 4f (b−∆x) + f (b)¶∆x

3

We say that this method uses 2n+ 1 points.

i. Proof:

2Mid+ Trap

3=

1

3

2 (f (a+∆x) + f(a+ 3∆x+ · · ·+ f (b−∆x)) 2∆x+

µf (a)

2+ f (a+ 2∆x) + · · ·+ f(b− 2∆x) + f (b)

2

¶2∆x

=

µf (a) + 4f (a+∆x) + 2f (a+ 2∆x) + 4f (a+ 3∆x)+

· · ·+ 2f (b− 2∆x) + 4f (b−∆x) + f (b)¶∆x

3

45

Page 47: Calculus II–Math 227.04

(f) Class: calculate directly Simpson’s approximation ofR 20sinx dx using 5

points.

15. How can you use TestGiver to approximate integrals?

(a) Let’s approximateR 41sin¡x2¢dx using methods:

i. left hand using 20 points

ii. right hand using 20 points

iii. trapezoidal using 21 points

iv. midpoint using 20 points

v. Simpson’s using 41 points

(b) Here is the input to TestGiver’s calculator page.

dx = (4-1)/20;

left = dx*Sum(sin(x^2); x,1,4-dx,dx);

right = dx*Sum(sin(x^2); x,1+dx,4,dx);

trap = (left+right)/2;

mid = dx*Sum(sin(x^2); x,1+dx/2,

4-dx/2,dx);

simpson = 1/3*trap+2/3*mid

(c) Before evaluating the input, choose scientific form for the output.

This will give you lots of digits accuracy in your calculations.

i. Actually calculations are always carried out with lots of precision, butthey can be reported with either 6 or 16 digits accuracy.

(d) Here is TestGiver’s output. You can copy and paste this to the answerspaces using control-C and control-V

dx : REAL

dx = 1.4999999999999999445E-1

left : COMPLEX

left = 5.047997059245112883E-1

right : COMPLEX

right = 3.3539356070356890482E-1

trap : COMPLEX

trap = 4.2009663331404012431E-1

mid : COMPLEX

mid = 4.45392959589994949991E-1

simpson : COMPLEX

simpson = 4.3696085083134328376E-1

16. But why do all this if you have NIntegrate?

(a) Sometimes I have to imbed an integration routine in a more complicatedalgorithm that I’m writing. I have to evaluate many integrals–perhapsthousands or even millions–and I cannot call on Mathematica for eachone.

(b) Sometimes I have to integrate a function from data.

46

Page 48: Calculus II–Math 227.04

17. Given data

Class find left hand, right hand, trapezoidal, and Simpson’s approximation forR 20f (x) dx.

18. Given data

How could you approximateR 20f (x) dx?

(a) In TestGiver

Input

x = {0,0.4,0.95,1.3,1.7,2};y = {0,0.151647,0.661645,0.928444,0.983399,0.826822};Sum((y[j+1]+y[j])/2*(x[j+1]-x[j]);j,1,5)

Output

x : LIST(REAL)

x = {0,0.4,0.95,1.3,1.7,2}y : LIST(REAL)

y = {0,0.151647,0.661645,0.928444,0.983399,0.826822}1.18615

19. Errors in Approximations as function of number of points

(a) Rules of thumb

i. If you double the number of points, the error in trapezoidal and mid-point method goes down by 3/4.

ii. If you double the number of points, the error in Simpon’s method goesdown by 15/16.

(b) Here are some values obtained approximatingR 30sin¡x2¢dx.

i. n is the number of points used.

47

Page 49: Calculus II–Math 227.04

3.2.12 The Fundamental Theorem of Calculus

1. How do you set up an integral to represent a quantity like:

(a) an area

(b) a volume

(c) an arc length

(d) a probability

(e) work

2. Integrals represent accumulations

(a) area is an accumulation of strips

(b) volume is an accumulation of slices

(c) arc length is an accumulation of short line segments

(d) probability is the accumulation of unlikely events

(e) work is the accumulation of little pushes (or pulls)

3. The approach is always the same. Find a parameter (represented by a variable,say x) and a function (say g (x)) such that

(a) the quantity you want to calculate can be represented as a sum of a largenumber of small quantities

(b) each of the small quantities can be represented by g (x)∆x (exactly a prod-uct like this)

(c) the quantity you want is the sum of all the small quantities you get takingall x’s from a to b.

(d) Then Q =R bag (x) dx

4. Let’s look at this for arc length.

(a) A little piece of the graph of f (x) above x can be thought of as having

length

qdx2 + (f 0 (x) dx)2 =

q1 + f 0 (x)2dx.

48

Page 50: Calculus II–Math 227.04

(b) So the entire arc length from x = a to x = b isR ba

q1 + f 0 (x)2dx

5. There is another approach to creating integrals that model desired quantitiesusing the Fundamental Theorem of Calculus

6. The Fundamental Theorem of Calculus:

(a) Given a function f (x) (say continuous on [a, b] to be absolutely correct)

(b) Define a new function F (x) =R xaf (t) dt

i. You can’t sayR baf (x) dx becaus that is a single number

ii. You can’t sayR xaf (x) dx because the symbol ‘x’ has two different

meaning here

iii. The value of the integralR xaf (x) dx is determined by the value of x,

so this is a function of x.

iv. The function F (x) is defined so long as the integral is defined.

A. In particular, the function F (x) is defined on [a, b] and F (a) = 0.

(c) The Fundamental Theorem of Calculus says:

F 0 (x) = f (x) .

7. Let f (x) = sin2 x, and let a = 0. Then F (x) =R x0sin2 t dt =

1

2x− 1

2sinx cosx.

(a) This is not an anti-derivative. It is a definite integral:Z x

0

sin2 t dt =1

2t− 1

2sin t cos t

¯x0

=1

2x− 1

2sinx cosx

(b) Class check thatd

dx

µ1

2x− 1

2sinx cosx

¶= sin2 x

(c) Class if F (x) =R x1

dt

twhat does the Fundamental Theorem say F 0 (x) =?

i. Is this true? Evaluate the integral to find F (x) then differentiate F (x).

49

Page 51: Calculus II–Math 227.04

8. Another version of this theorem is this: if g (x) is a differentiable function on

[a, b] thenR bag0 (x) dx = g (b)− g (a). This is the one you are used to using.

9. So what good is this new version.

10. If you have some quantity F (x) dependent on a parameter x

(a) if F (a) = 0

(b) if you know that F 0 (x) = f (x)

then F (x) =R xaf (t) dt.

11. Many scientific laws give you the derivative of the quantity you want.

(a) The law of gravity gives acceleration: we want to know position and speed.

(b) Newton’s law of cooling gives the rate of change of temperature, not thetemperature.

(c) Maxwell’s laws give the derivatives of the electromagnetic waves.

12. For example, let F (x) be the length of the arc of y = f (x) starting at t = aand ending at t = x.

(a) F (a) = 0 since the arc length from t = a to t = a is 0.

(b)

F 0 (x)

= lim∆x→0

(arc length from 0 to x+∆x)− (arc length from 0 to x)

∆x

= lim∆x→0

arc length from x to x+∆x

∆x

= lim∆x→0

q∆x2 + (f 0 (x)∆x)2

∆x

= lim∆x→0

q1 + f 0 (x)2

=

q1 + f 0 (x)2

Therefore arc length from t = a to t = x isR xa

q1 + f 0 (x)2dx.

13. Exercises:

F (x) =

Z x

0

cos t dt

F 0 (x) = cosx

F (x) =

Z 2

x

3t2dt

= −Z x

2

3t2dt

F 0 (x) = −3x2

F (x) =

Z x2

−1etdt

F 0 (x) =dF

dx2dx2

dx

= ex2

2x

= 2xex2

50

Page 52: Calculus II–Math 227.04

14. Class try: Z x

1

etdtZ 2

x2sin t dt

15. General formula:

d

dx

Z b(x)

a(x)

f (t) dt = f (b (x)) b0 (x)− f (a (x)) a0 (x)

16. Example

F (x) =

Z cosx

sinx

t3dt

F 0 (x) = (cosx)3(− sinx)− (sinx)3 cosx

= − sinx cosx³(cosx)

2+ (sinx)

= − sinx cosx(a) Check:

F (x) =(cosx)4 − (sinx)4

4

F 0 (x) = (cosx)3 (− sinx)− (sinx)3 cosx

17. Class try: Z e2x

ex

1

tdt

3.2.13 Probability Integrals

1. A continuous random variable X can be thought of as a magic box that emitsnumbers.

(a) Although no one can predict the next number to appear, it is assumed thatwe can make statements about the probability that numbers will occur ina certain range.

(b) The probability that a ≤ X ≤ b, written P (a ≤ X ≤ b), is the percentageof emitted numbers that satisfy the condition

(c) A random variable comes with knowledge of all such probabilities.

2. Example: every programming language, including TestGiver and Mathematica,includes a random function that produces values between 0 and 1.

(a) if 0 ≤ a < b ≤ 1, then P (a ≤ Random ≤ b) = b− a(b) TestGiver input

x = MakeList(Random;i,1,100);

Sum(Choose(x[i]<1/3,1,0);i,1,100)/100

(c) TestGiver output

x : LIST(REAL)

x = {0.0489052,0.769638,0.0949757,0.205269,0.800982,0.381896,0.453723,

0.676724,0.498999,0.336422,0.352255,

0.817455,0.535778,0.649806,0.885977,

0.916743,0.169009,0.416907,0.311156,

51

Page 53: Calculus II–Math 227.04

0.915838,0.154497,0.414544,0.250916,

0.375421,0.270999,0.163212,0.191266,

0.893275,0.096042,0.243666,0.251555,

0.894012,0.642095,0.915265.0.463699,

0.962755,0.712461,0.332962,0.0445856,

0.14464,0.0862802,0.909781,0.396014,

0.882005,0.891998,0.621694,0.816544,

0.511161,0.778694,0.301748,0.159643,

0.490599,0.744635,0.220326,0.922486,

0.782521,0.732426,0.498415,0.499808,

0.0595691,0.350143,0.150759,0.587156,

0.658617,0.327814,0.805771,0.967944,

0.453515,0.568628,0.399069,0.16866,

0.0686527,0.904244,0.387533,0.716621,

0.105213,0.913578,0.280736,0.984639,

0.302002,0.414441,0.536631,0.856969,

0.802723,0.487406,0.118382,0.700938,

0.951566,0.141272,0.259189,0.378593,

0.289001,0.979504,0.232006,0.282781,

0.669633,0.47703,0.171012,0.632002,

0.674009}0.35

3. Example: the time required to wait for phone call to be answered, starting fromthe first ring.

(a) That is, the numbers emitted by X have the same statistical distributionas the waiting times for answering phone calls

4. Example: the weight of a male student

(a) That is, the numbers emitted by X have the same statistical distributionas the weights of male students

5. What all these examples have in common is that the value can be any realnumber in a certain range.

(a) That’s why they are called continuous random variables.

(b) Discrete random variables are random variables that emit integer valuesonly. We do not study these.

6. The most common way of specifying the probabilities for a random variable Xis to give a function f (x) called the probability density function for X.

(a) The probability density function satisfies

i. f (x) ≥ 0 for all xii.R∞−∞ f (x) dx = 1

(b) The relationship between the probabilities of the random variable X andthe probability density function f (x) is

P (a ≤ X ≤ b) =Z b

a

f (x) dx

7. Example: the probability density function for the Random function is

f (x) =

0 if x < 01 if 0 ≤ x ≤ 10 if x > 1

52

Page 54: Calculus II–Math 227.04

(a)

-0.2

0

0.2

0.4

0.6

0.8

1.2

-0.4 -0.2 0.2 0.4 0.6 0.8 1 1.2 1.4x

(b) The probability that a random number is between 0.4 and 0.7 is

P (0.4 ≤ random ≤ 0.7) =

Z 0.7

0.4

f (x) dx

=

Z 0.7

0.4

dx

= 0.3

(c) The probability that a random number is between −2 and −1 is:

P (−2 ≤ random ≤ −1) =

Z −1−2

f (x) dx

=

Z −1−2

0dx

= 0

8. Example: the probability density function for the time required to wait for aphone call to be answered is usually thought to be something like:

f (x) =

½0 if x < 013e−x/3

(a)0

0.05

0.1

0.15

0.2

0.25

0.3

-2 2 4 6 8x

(b) This is an example of an exponential probability distribution

(c) check: f (x) ≥ 0 for all x, andZ ∞−∞

f (x) dx =

Z ∞0

1

3e−x/3dx

= −e−3x¯∞0

= 1

(d) P (0 ≤ wait ≤ 2) = R 2013e−x/3dx ≈ 0.487. Almost half the time, the phone

is answered in less than 2 seconds.

53

Page 55: Calculus II–Math 227.04

9. Example: the probability density function for the weight of male students isapproximately

f (x) = 0.02e

− (x− 160)2800

(a)0

0.005

0.01

0.015

0.02

120 130 140 150 160 170 180 190 200x

(b) This is an example of a normal probability distribution

(c) I’m assuming the average weight is 160 lbs and the standard deviation is10 lbs.

(d) Clearly f (x) ≥ 0 for all x. It is not obvious, but R∞−∞ f (x) dx ≈ 1(e) This is only an approximation, since according to this model there is a

small but finite probability that a male student has negative weight.

i. You may have some lightweight friends, but not that lightweight.

ii. P (−10 < weight < 0) = R 0−10 0.02e− (x− 160)2

800 dx

iii. Using numerical integration to evaluate this probability:

A. TestGiver inputintegrate(0.02*exp(-(x-160)^2/800);

x,-10,0)

B. TestGiver output6.14241E-16

iv. We can ignore this discrepency from reality.

(f) The proportion of students weighing over 180 pounds isR∞1800.02e

− (x− 160)2800 dx.

i. Using numerical integration to evaluate this probability:

A. TestGiver inputintegrate(0.02*exp(-(x-160)^2/800);

x,180,1000)

B. TestGiver output0.159076

ii. Sixteen percent of students weigh over 180 lbs.

10. The probability distribution function for a random variableX is F (x) =R x−∞ f (t) dt.

(a) F (x) = P (X ≤ x)(b) F (x) is an increasing function that starts at 0 and goes to 1

(c) The graph of the probability distribution function of random is

54

Page 56: Calculus II–Math 227.04

-0.2

0

0.2

0.4

0.6

0.8

1.2

-0.4 -0.2 0.2 0.4 0.6 0.8 1 1.2 1.4x

(d) The graph of the probability distribution function of telephone wait is:

0

0.2

0.4

0.6

0.8

-2 2 4 6 8 10x

(e) The graph of the probability distribution function of male weight is:

0

0.2

0.4

0.6

0.8

1

120 130 140 150 160 170 180 190 200x

11. Using the probability distribution function, you can answer questions like:

(a) Given a, P (X ≤ a) =?i. This is the same as F (a) =?

(b) Given b, P (X ≤?) = bi. This is the same as F (?) = b

(c) the proportion of values less than 1 is P (X ≤ 1) =?(d) half the values of the random variable are less than ? P (X ≤?) = 0.5

i. This is the median value of the random variable.

12. If F (x) is a probability distribution function for a random variable X, then the

probability distribution function for X is dF (x)dx

13. The long-term average of all values emitted by a random variable with proba-bility density function f (x) is

X =

Z ∞−∞

xf (x) dx

55

Page 57: Calculus II–Math 227.04

(a) This value is called the mean of X and is denoted µ (X) or X.

(b) the mean of the random number function is X =R 10x dx = 0.5

(c) The mean waiting time for telephone answering is

X =

Z ∞0

1

3xe−x/3dx

= 3

i. Note that almost half the waiting times are less than 2, but a smallproportion of very long waits raises the average to 3

(d) The mean male weight is

X =

Z ∞−∞

0.02x e

− (x− 160)2800 dx

≈ 160

3.3 Infinite Series

3.3.1 Numerical Series

3.3.1.1 Infinite Sequences

1. The theory of infinite series gives ways to better understand and calculate manyfunctions. To study these methods, we need to begin with numerical series, orinfinte sums of numbers. Before series, we need to consider infinite sequences ofnumbers.

(a) Example:

1,1

2,1

3,1

4, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

(b) Example:

1,3

2,5

3,7

4, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

(c) Example:

1,3

2,7

4,15

8, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

B. Not all sequences start with the same index.

56

Page 58: Calculus II–Math 227.04

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

(d) Example:1, 1, 1, 1, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

(e) Example:1, 2, 3, 4, 5, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

(f) Example:1,−1, 1,−1, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

(g) Example:sin 1

1,sin 2

2,sin 3

3, . . .

i. What is the generic term sn

A. What is the sequence in Mathematica or TestGiver notation as anexpression in n?

ii. Does the sequence converge to a finite number? What number?

iii. How big does N have to be before all the remaining terms sn, n > Nare within 0.01 of the limit?

2. What does it mean that a sequence converges to a number?

(a) Close books.

(b) Class discuss

3. A sequence converges or is convergent if and only if the numbers get close andstay close to some value, called the limit of the sequence. If the sequence iss1,s2, s3, . . . and the limit is L, we write:

limn−→∞ sn = L

(a) We will use this idea informally. In specific cases the convergence or diver-gence will usually be obvious for at least some components of the problem.

(b) Compare to examples above

(c) Otherwise the sequence is divergent.

57

Page 59: Calculus II–Math 227.04

i. I think it is Chekov who says that all happy families are the same, butthat unhappy families are all unhappy in their own way. Similarly allconvergent sequences converge in the same way, but there are manyways for a series to be divergent.

(d) Asking if a sequence converges has two answers, one satisfying and theother not.

i. Sometimes you can prove that the sequence converges to a specificlimit, or that it diverges

ii. Sometimes you can only prove that the sequence converges, but youcannot find the limit:

A. In these cases the limit may not have a convenient closed form

iii. It may feel unsatisfying to show that a sequence diverges, but the resultcan be important.

A. Divergent sequences can also be very useful. See the theory ofassymptotic series

iv. Another example of a sequence. Suppose you have an infinite decimallike π = 3.14159 . . .. The value is the limit of the finite decimal parts:

s0 = 3

s1 = 3.1

s2 = 3.14

s3 = 3.141

...

π = limi−→∞

si

A. All terms after the third are within 0.001 of the limit. All termsafter the fifth are within 0.00001 of the limit.

B. You can write a rule for si:

si =integer part

¡10iπ

¢10i

v. Here’s a suitably postmodern example (if modern begins about 1880):

s1 = 0.0

s2 = 0.01

s3 = 0.011

s4 = 0.0110

s5 = 0.01101

s6 = 0.011010

s7 = 0.0110101

s8 = 0.01101010

s9 = 0.011010100

s10 = 0.0110101000

s11 = 0.01101010001

Sequence converges to a decimal: 0.011010100010 . . . but what is thevalue? What is the rule?

A. Because it is not known which numbers are prime and which arenot, no one can say if some of the digits of this decimal are 1 or 0,so no one knows what this number is.

4. There are some theorems that help establish convergence or divergence of asequence in specific cases.

58

Page 60: Calculus II–Math 227.04

(a) We will assume the obvious: limn−→∞ 1n = 0 and limn−→∞ 1

an = 0 if|a| > 1.

(b) If you have one convergent sequence you can construct others: Supposelimn−→∞ sn = L. Then:

limn−→∞ (c± sn) = c± L

limn−→∞ csn = cL

i. For example: limn−→∞

µ2− 1

n

¶= 2− limn−→∞ 1

n= 2

(c) If you have two convergenct sequences you can construct others. Supposelimn−→∞ sn = L and limn−→∞ tn =M . Then:

limn−→∞ (sn + tn) = L+M

limn−→∞ (sn − tn) = L−M

limn−→∞ (sntn) = LM

if M 6= 0 then limn−→∞

µsntn

¶=L

M

i. Example:

limn−→∞

2n+ 1

3n+ 2= lim

n−→∞

2 +1

n

3 +2

n

=

limn−→∞

µ2 +

1

n

¶limn−→∞

µ3 +

2

n

=2 + limn−→∞

1

n

3 + limn−→∞2

n

=2

3 + 2 limn−→∞1

n

=2

3

(d) The squeeze theorem: if you have three convergent sequences {sn} , {tn} , {un}and for all n, sn ≤ tn ≤ un, and you know that limn−→∞ sn = limn−→∞ un =L then limn−→∞ tn = L.

i. Example: tn = 1 +sin2 n

n. Let sn = 1 and un = 1 +

1

n. Then

sn ≤ tn ≤ un for all n and limn−→∞ sn = limn−→∞ un = 1. so tn = 1(e) If limn−→∞ |sn| = 0 then limn−→∞ sn = 0

i. But limn−→∞ |sn| = L 6= 0 in general proves nothing about limn−→∞ sn.Consider sn = (−1)n.

(f) Here’s a really useful one. If sn = f (n) for some continuous function f (x)and if limx−→∞ f (x) exists, then limn−→∞ sn = limx−→∞ f (x)

59

Page 61: Calculus II–Math 227.04

i. Example:

sn =ln (2n+ 3)

ln (3n− 2)f (x) =

ln (2x+ 3)

ln (3x− 2)lim

n−→∞ sn = limx−→∞ f (x)

= limx−→∞

2

2x+ 33

3x− 2by L’Hopital

= limx−→∞

2 (3x− 2)3 (2x+ 3)

by algebra

= limx−→∞

6

6by L’Hopital

= 1

(g) A sequence {sn} is increasing if sn ≤ sn+1 for all n. A sequence {sn} isdecreasing if sn ≥ sn+1 for all n. A sequence is monotonic if it is increasingor decreasing.

i. NOT if is it partially increasing and partially decreasing but if thewhole series is increasing or if the whole series is decreasing.

ii. A sequence {sn} is bounded if there exist numbers BL and BH suchthat BL ≤ sn ≤ BH for all n.

iii. A sequnce that is monotonic and bounded converges

A. this theorem does NOT help find the limit

B. The postmodern example above is an increasing sequence that isbounded below by 0 and above by 1, so it converges.

3.3.1.2 Infinite Series

1. Now we are ready for series.

(a) An infinite series is an infinite sum of numbers:P∞i=? ai.

(b) The n0th partial sum isPni=? ai

(c) Let’s consider some examples.

2. Example:

1 +1

2+1

4+1

8+ · · ·

(a) What is the generic term sn

(b) What is the series in summation notation

i. What is the series in Mathematica or TestGiver notation?

(c) Partial sum is

1 + · · ·+ 1

2n= 2− 1

2n

(d) Does the series converge to a finite number? What number?

(e) How many terms do you have to take before the partial sums are within0.001 of the limit.

3. Example:1− 1 + 1− 1 + · · ·

(a) What is the generic term sn

(b) What is the series in summation notation.

60

Page 62: Calculus II–Math 227.04

i. What is the series in Mathematica or TestGiver notation?

(c) What are the partial sums?

(d) Does the series converge to a finite number? What number?

(e) How many terms do you have to take before the partial sums are within0.001 of the limit.

4. Example:

1− 12+1

3− 14+ · · ·

(a) What is the generic term sn

(b) What is the series in summation notation.

i. What is the series in Mathematica or TestGiver notation?

ii. Not all sums start with the same index.

(c) What are the partial sums?

(d) Does the series converge to a finite number? What number? (ln 2–seelater)

(e) How many terms do you have to take before the partial sums are within0.001 of the limit.

5. Example: the harmonic series.

1 +1

2+1

3+1

4+ · · ·

(a) What is the generic term sn

(b) What is the series in summation notation.

i. What is the series in Mathematica or TestGiver notation?

(c) What are the partial sums?

(d) Does the series converge to a finite number? No

i. Hard proof–see integral test below for easier proof.

1 +1

2+1

3+1

4+ · · ·

= 1 +1

2+

µ1

3+1

4

¶+ · · ·

+

µµ1

2n+ 1

¶+ · · ·+ 1

2n+1

¶+ · · ·

≥ 1 +1

2+ 2

µ1

4

¶+ · · ·

+2nµ

1

2n+1

¶+ · · ·

= 1 +1

2+ · · ·+ 1

2+ · · ·

6. Consider the first two examples. What does it mean that a series converges.under what conditions do we say a series converges

(a) A series converges if the sequence of partial sums converges, gets closeand stays close to some limit.

7. One series that you can always sum exactly is a geometric series. If |x| < 1 andan = x

n thenP∞

n=0 an =1

1− x .

61

Page 63: Calculus II–Math 227.04

(a) Proof: the partial sums arePNn=0 an =

1− xN1− x and as N −→ ∞ this

converges to1

1− x .

(b)P∞n=0

µ1

3

¶n=

1

1− 13

=3

2

(c)P∞n=2

µ−34

¶n=9

16

P∞n=0

µ−34

¶n=9

16

1

1−µ−34

¶ =9

28.

(d) Class doP∞n=1

µ1

2

¶n8. Interesting aside: repeating decimals

(a)

0.1515151515 . . . = 0.15¡1 + .01 + .012 + · · · ¢

= 0.15

µ1

1− .01¶

=0.15

0.99

=5

33

(b)

0.761515151515. . . . = 0.76 + 0.01 (0.15151515 . . .)

= 0.76 + 0.01

µ5

33

¶=

76

100+

5

3300

=2513

3300

(c) Class do 0.576363636363 . . .

(d) Every eventually repeating decimal (including eventually 0 decimals) is afraction, and every fraction can be represented by a repeating decimal.

i. Proof of part 2: when you do the division algorithm it must eventuallyrepeat.

9. The following properties often simplify problems:

(a) IfPan converges then

Pcan converges to c

Pan.

(b) IfPan and

Pbn converge then

P(an ± bn) converges to

Pan ±

Pbn

(c) e.g.P∞n=0

µ1

2n+2

3n

¶(d) Class find limit.

10. We need some tests for convergence.

(a) Often we will not be able to tell what number the series converges to, butwe can tell that it converges.

11. Easiest but most confusing test is the limit test. This either gives no infor-mation or says that a series diverges. When it gives no information, the seriesmight converge or might diverge.

62

Page 64: Calculus II–Math 227.04

(a) . If an 9 0 thenPan does not converge.

(b) Example:P n− 1

ndiverges since limn−→∞

n− 1n

= 1 6= 0.(c) Converse is false. It is possible that an −→ 0 but

Pan still does not

converge.

i. For example, the harmonic series 1 +1

2+1

3+ · · · does not converge.

(d) Class: doesP∞n=1 sin (n) converge? How about

P∞n=1

sin (n)

n?

12. The comparison test can tell us if a series comverges without giving muchinformation about the limit.

(a) GivenPan with an ≥ 0 , if we can find another series

Pbn that converges

such that 0 ≤ an ≤ bn thenPan converges.

(b) Example:P∞n=0

1

2n + 1. Since 0 ≤ 1

2n + 1≤ 1

2nand

P∞n=0

1

2nconverges

to 1,P 1

2n + 1converges to something less than 1.

(c) You can read this backwards: if 0 ≤ an ≤ bn andPan diverges then

Pbn

diverges.

i. example: sinceP∞

n=2

1

ndiverges,

P∞n=2

n

n2 − 1 diverges

(d) Class doP∞n=1

1

2n − 113. More complex but less delicate than the comparison test is the comparison

ratio test.

(a) If limanbnconverges to a non-zero value then

Pan and

Pbn both diverge

or both converge .

(b) Example:P 1

2n − 1 converges, becauseP 1

2nconverges and

limn−→∞

1/2n

1/ (2n − 1) = limn−−→∞

2n − 12n

= limn−→∞ 1−

1

2n

= 1

both converge or both diverge.because lim

(c) Class: compareP 1

3n − 1 andP 1

2n

14. Another ratio test: if lim

¯an+1an

¯< 1 then the series converges.

(a) For example, an =1

2n.

i. lim

¯an+1an

¯= lim

1/2n+1

1/2n=1

2< 1

(b) Class do: an =1

n!

(c) Proof: If lim

¯an+1an

¯= c < 1 then for n > N ,

¯an+1an

¯< d =

1 + c

2< 1.

Thus for n > N, |an| < |aN | dn−N . Therefore (except for the first fewterms)

0 ≤ |an| < Adn

SincePAdn converges to

A

1− d ,P |an| converges. By the absolute con-

vergence test,Pan converges.

63

Page 65: Calculus II–Math 227.04

15. Perhaps the most powerful test.is the integral test

(a) Let f be a positive continuous decreasing function and an = f (n). ThenR∞Mf (x) dx converges if and only if

P∞an converges.

(b) starting points don’t matter so much.

(c)P 1

ndiverges. because

R∞1

1

xdx diverges (Class prove).

(d)P 1

n2converges (to

π2

6) .Class set up integral and show it converges.

(e)P 1√

ndiverges. Class set up integral and show it diverges.

i. Also this series diverges by comparison withP 1

n. since

1

n<

1√nfor

n ≥ 2 and P 1

ndiverges.

(f) Class tryP 1

n3/2

(g) p-series:P 1

npconverges if and only if p > 1.

i. proof:R∞1x−pdx converges if and only if p > 1.

16. Special tests for series with mixed signs

(a) Absolute Convergence test: ifP |an| converges then

Pan converges

i. Example:P∞n=1

sinn

2nconverges by two steps:

A. 0 ≤¯sinn

2n

¯≤ 1

2nand

P∞n=1

1

2nconverges to 1, so by comparisonP∞

n=1

¯sinn

2n

¯converges to something between 0 and 1.

B. By the absolute convergence test,P∞n=1

sinn

2nconverges to some-

thing between −1 and 1.ii. Class: show

P∞n=1

sinn

n2converges

(b) Another ratio test: if lim

¯an+1an

¯< 1 then the series converges. If

lim

¯an+1an

¯> 1 then the series diverges.

i. For example, an =1

2n.

A. lim

¯an+1an

¯= lim

1/2n+1

1/2n=1

2< 1

ii. Class do: an =1

n!

iii. Proof: If lim

¯an+1an

¯= c < 1 then for n > N ,

¯an+1an

¯< d =

1 + c

2< 1.

Thus for n > N, |an| < |aN | dn−N . Therefore (except for the first fewterms)

0 ≤ |an| < Adn

SincePAdn converges to

A

1− d ,P |an| converges. By the absolute

convergence test,Pan converges.

(c) Alternating series test: an easy test when it applies

i. If an ≥ 0 and an ≥ an+1 and limn−→∞ an = 0 thenP(−1)n an

converges.

64

Page 66: Calculus II–Math 227.04

ii. Example: 1− 12+1

3− 14+ · · · converges. an = 1

niii. Must check all hypotheses, especially an monotonically converging to

0.

iv. The series 1 − 13+1

2− 15+1

4− 17and

P sinn

ndo not satisfy all the

hypotheses

A. the first example is not decreasing monotonically to 0, the signs inthe second example are not alternating.

v. Class show thatP2

n=1

(−1)nlnn

converges

17. Rarely useful but always spectacular: telescoping series.

∞Xn=1

1

n2 + n=

1

2+1

6+1

12+ · · ·

=∞Xn=1

µ1

n− 1

n+ 1

¶= 1

18. A series we have used as an example above whose convergence we could not

determine:P∞n=1

sin (n)

n= arctan

µsin 1

1− cos 1¶

(a) Requires complex analysis to evaluate

(b) Check numerically:

i.P1000n=1

sin (n)

n= 1. 070 694 152

ii. arctan

µsin 1

1− cos 1¶= 1. 070 796 327

(c) Proof:. This is just for fun. You are not expected to understand all of it.

i.eix = cosx+ i sinx

ii.∞Xn=1

sin (n)

n= Im

à ∞Xn=1

ein

n

!

= Im

à ∞Xn=1

¡ei¢nn

!iii.

∞Xn=1

xn

n=

Z ∞Xn=0

xndx

=

Zdx

1− x= − ln (1− x)

iv.∞Xn=1

sin (n)

n= Im

¡− ln ¡1− ei¢¢= − arg ¡1− ei¢= − arctan

µ − sin 11− cos 1

¶= arctan

µsin 1

1− cos 1¶

65

Page 67: Calculus II–Math 227.04

19. How to use convergence tests. Given a seriesPan

(a) If limn−→∞ an 6= 0 then the series diverges.(b) If it is the form an = Kx

n with |x| < 1 then the series converges to K

1− x(c) If lim

¯an+1an

¯< 1 then the series converges. If lim

¯an+1an

¯> 1 then the

series diverges.

(d) If all the terms are positive:

i. If an = f (n) with f (x) a decreasing positive function, then the seriesconverges if and only if

R∞f (x) dx converges.

ii. If you can find a convergent seriesPbn such that either bn ≥ an or

limn−→∞anbn<∞ then

Pan converges.

(e) If the terms have mixed signs:

i. If limn−→∞ an 6= 0 and the series is alternating and terms, in absolutevalue, are decreasing, then the series converges.

ii. IfP |an| converges, then so does

Pan.

66

Page 68: Calculus II–Math 227.04

3.3.2 Power Series

1. A power series is an expression of the form::

a0 + a1x+ a2x2 + · · ·

for some constants an.

(a) When x gets a numerical value, the power series turns into an ordinaryseries of numbers

(b) The set of all power series is denoted R [[x]] if you like fancy notation.(c) We have made a choice of what to study here. Other things we might study

are:

i. polynomials: a0 + a1x+ a2x2 + · · · where an = 0 for almost all n (all

but a finite number of n). The set of polynomials is R [x].

ii. rational functions:p (x)

q (x)where p, q are polynomials. The set of rational

functions is R (x).iii. Laurent series anx

n+anxn+1+ · · ·where n can be any integer, positive

or negative. The set of Laurent series is denoted R ((x)). We may showlater that R (x) ⊂ R ((x))

2. For some but not necessarily all values of x, a power series converges to avalue. For these values of x, the power series is a function. For other values ofx, the power series does not converge. The power series, with x an unevaluatedvariable, is a mathematical thing that can be studied in its own right.

(a) I’ll try to distinguish when I’m talking about a formal power series and aseries where x has a numerical value.

(b) The series 1 + x+x2

2!+x3

3!+ · · · converges for all values of x

i. the value converged to is ex

(c) The series 1 + x+ x2 + x3 + · · · converges for |x| < 1.i. the value converged to is

1

1− x

3. Theorem: ifP∞n=0 anx

n is a power series and limn−→∞

¯anan+1

¯= c (which

means that the limit has to converge) then the series converges for |x| < c anddiverges for |x| > c. If c =∞ then the series converges for all x.

(a) c is called the radius of convergence of the series.

(b) If |x| = c then there is no information about the convergence of the series.It might converge; it might diverge.

(c) If the limit does not converge, then there is no information. More sensitivetests of this sort are known–try Math 370.

(d) Example: 1 + x+ x2 + · · · .i. an = 1 for all n

ii. c = limn−→∞1

1= 1.

(e) Example: 1 + x+x2

2!+x3

3!+ · · · .

i. an =1

n!

ii. c = limn−→∞

1

(n+ 1)!1

n!

= limn−→∞n!

(n+ 1)!= limn−→∞

1

n+ 1= 0

67

Page 69: Calculus II–Math 227.04

(f) Proof: limn−→∞

¯an+1x

n+1

anxn

¯= |x| limn−→∞

¯an+1an

¯= |x| 1

c. By the ratio

test, the series converges if|x|c< 1 and diverges for

|x|c> 1. That is, the

series converges for |x| < c and diverges for |x| > c

4. Class find radius of convergence.

(a) x+x2

2+x3

3+ · · ·

(b) x+ 2x2 + 3x3 + · · ·

(c) x+x2

4+x3

9+ · · ·

(d) 1 +x

2+x2

4+x3

8+ · · ·

(e)x

2+x2

2+3x3

8+x4

16+5x5

32+ · · ·+ nx

n

2n+ · · ·

5. Example: p = x− x3

3!+x5

5!− · · ·

(a) if n is even then an = 0; if n is odd then an =(−1)n−12n!

(b) limn−→∞

¯an+1an

¯doesn’t exits. What to do?

(c) q = 1− t

3!+t2

5!− t

7

7!+ · · · .

i. an =(−1)n(2n+ 1)!

ii. c = 0

iii. q converges for all t

iv. q1 = 1− x2

3!+x4

5!− · · · converges for all x

v. p = x q1 converges for all x

6. Class: show carefully that the series 1− x2

2+x4‘

4!+x6

6!− · · · converges for all x

3.3.3 Representing Functions with Power Series

1. We know for |x| < 1,1

1− x = 1 + x+ x2 + x3 + · · ·= cxi

2. Powers of x can be substituted for x. Therefore, for |x| < 1

1

1 + x=

∞Xi=0

(−x)i

=∞Xi=0

(−1)i xi

= 1− x+ x2 − x3 + · · ·1

1− x2 = 1 + x2 + x4 + · · ·

68

Page 70: Calculus II–Math 227.04

(a) Class: find power series for1

1 + x2

3. Multiples of x can replace x, but that changes the radius of convergence. For¯x2

¯< 1 or |x| < 2:

1

1− x2

=2

2− x= 1 +

x

2+³x2

´2+ · · ·

=∞Xi=0

xi

2i

(a) Class: find power series for1

1− 2x . What is radius of convergence?

4. Series can be multiplied by constants, and finite polynomials can be added andsubtracted to series without changing the radius of convergence. For |x| < 1:

3

1− x = 3 + 3x+ 3x2 + 3x3 + · · ·

5. Series can be added and subtracted. If both summands converge, so does thesum. For |x| < 1:

1

1− x +2

1 + x2=

3− 2x+ x21− x+ x2 − x3

= 3 + x− x2 + x3+3x4 + x5 − x6 + x7+3x8 + · · ·

(a) Class: Check previous result by finding power series for

1

1− x2 =1

2

µ1

1− x +1

1 + x

¶What is radius of convergence?

6. These operations can be combined. To get a power series for1

2− x , you haveto manipulate the expression into a form

a

1− xn/b :

1

2− x =1/2

1− x/2=

1

2

µ1 +

x

2+x2

4+x3

8+ · · ·

¶=

1

2+x

4+x2

8+x3

16+ · · ·

This series converges for |x/2| < 1 or |x| < 2.

(a) Class: find power series for2

3− x2 and find radiusof convergence.

7. Series can also be multiplied and divided.

(a) Multiplication is like polynomial multiplication, but it goes on forever.¡a0 + a1x+ a2x

2 + · · · ¢ ¡b0 + b1x+ b2x2 + · · · ¢= a0b0 + (a0b1 + a1b0)x+ (a0b2 + a1b1 + a2b0)x

2 + · · ·

69

Page 71: Calculus II–Math 227.04

(b) The power series for1

(1− x)2 is¡1 + x+ x2 + · · · ¢2

= 1 + 2x+ 3x2 + · · ·This series converges for |x| < 1.

(c)1 + x

1− x can be calculated:

1 + x

1− x = (1 + x)¡1 + x+ x2 + x3 + · · · ¢

= 1 + 2x+ 2x2 + 2x3 + · · ·This series converges for |x| < 1.

(d) Class: confirm previous result by computing

1

1− x2 =

µ1

1− x¶µ

1

1 + x

¶¡1 + x+ x2 + · · · ¢ ¡1− x+ x2 − · · · ¢

(e) To divide series, set up an equation. Remember, the a’s and b’s are known,and we are solving for the c’s .We assume b0 6= 0.

a0 + a1x+ a2x2 + · · ·

b0 + b1x+ b2x2 + · · · = c0 + c1x+ c2x2 + · · ·¡

b0 + b1x+ b2x2 + · · · ¢ ¡c0 + c1x+ c2x2 + · · · ¢ = a0 + a1x+ a2x

2 + · · ·b0c0 = a0

c0 =a0b0

b0c1 + b1c0 = a1

c1 =a1 − b1c0

b0b0c2 + b1c1 + b2c0 = a2

c2 =a2 − b1c1 − b2c0

b0

8. Series can be integrated and differentiated. This is how we represent manyfunctions. µ

1

1− x¶0

=1

(1− x)2= (1 + x+ x2 + x3 + · · · )0

1 + 2x+ 3x2 + · · ·

arctanx =

Zdx

1 + x2

=

Z ¡1− x2 + x4 − · · · ¢ dx

= x− x3

3+x5

5− · · ·

Both series converge is |x| < 1(a) Therefore

π

4= arctan 1

= 1− 13+1

5− 17+ · · ·

70

Page 72: Calculus II–Math 227.04

Check:

41000Xi=0

(−1)i2i+ 1

= 3. 142 591 654.

(b) Remarkable: a way to calculate π to any accuracy. And we can do better

tanπ

6=

1√3

π = 6arctan1√3

= 6

Ã1√3− 1

3×√33+

1

5×√35− · · ·

!

=6√3

µ1− 1

3× 3 +1

5× 9 −1

7× 27 + · · ·¶

= 2√3∞Xn=0

(−1)n(2n− 1) 3n

2√310Xn=0

(−1)n(2n+ 1) 3n

= 3. 141 593 305

(c) Class: find series for

ln (1 + x) =

Zdx

1 + x

=

Z ¡1− x+ x2 − · · · ¢ dx

i. What is the radius of convergence of your series.

ii. Show

ln 2 = 1− 12+1

3− 14+ · · ·

=∞Xn=1

(−1)n−1n

= − ln 12

=1/2

1+1/22

2+1/23

3+1/24

4+ · · ·

=∞Xn=1

1

n2n

Which series converges faster?

ln 2 = 0.693 147 180 610Xn=1

(−1)n−1n

= 0.645 634 920 6

100Xn=1

(−1)n−1n

= 0.688 172 179 3

10Xn=1

1

n2n= 0.693 064 856 2

100Xn=1

1

n2n= 0.693 147 180 6

71

Page 73: Calculus II–Math 227.04

3.3.4 Taylor Polynomials and Remainders

1. There are two reasons for studying infinite series

(a) Given a transcendental function like ex or sinx, how do you calculate itsvalues.

i. How does your calculator or Mathematica or TestGiver know the val-ues?

ii. How did Newton and Euler get the values?

(b) How do you represent a function like f (x) =R x0

√1 + t3dt which is not

a combination of elementary functions like sine and logarithm and squareroot.

2. Here’s a useful fact about integrals. If f (x) is continuous on (a, b) then there is

a number c between a and b such thatR baf (x) dx = f (c) (b− a).

3. Here’s a big theorem, the mean value theorem.

(a) For almost any function you will encounter in this course (technically: if fis continuous on [a, x] and differentiable on (a, x)) then

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

for some c in (a, x).

i. Proof: the theorem follows from the fundamental theorem of calculus,since

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

Z x

a

f 0 (t) dt

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

for some c in (a, x).

4. Here is an extension that works for almost all functions we will encounter definedon an interval [a, x]. (Technically we need f continuous on [a, x] and be n + 1times differentiable on (a, x)):

f (x) = f (a) + f 0 (a) (x− a) + · · ·+ f(n) (a)

n!(x− a)n + f

(n+1) (c)

(n+ 1)!(x− a)n+1

for some c in (a, x).

(a) The part f (a) + f 0 (a) (x− a) + · · ·+ f(n) (a)

n!(x− a)n is called the Taylor

polynomial for f (x) expanded about x = a .

(b) The partf (n+1) (c)

(n+ 1)!(x− a)n+1 is called the remainder term.

(c) n is called the degree of the Taylor polynomial.

5. Example: Find the Taylor polynomial of degree 4 aroundπ

2for sinx. Also find

the remainder term as best you can.

(a) We need to fill in the table:

n 0 1 2 3 4dn

dxnsinx sinx cosx − sinx − cosx sinx

dn

dxnsinx

¯x=π/2

1 0 -1 0 1

72

Page 74: Calculus II–Math 227.04

Thus the Taylor polynomial is:

P4 (x) = f³π2

´+ f 0

³π2

´³x− π

2

´+f (2)

³π2

´2!

³x− π

2

´2+f (3)

³π2

´3!

³x− π

2

´3+f (4)

³π2

´4!

³x− π

2

= 1− 12

³x− π

2

´2+1

24

³x− π

2

´4and the remainder is:

cos c

120

³x− π

2

´5for some value of c between

π

2and x.

(b) Thus for any x,

sinx = p (x) + f (x, c) for some c betweenπ

2and x

= 1− 12

³x− π

2

´2+1

24

³x− π

2

´4+cos c

120

³x− π

2

´5for some c between

π

2and x

6. Class find Taylor polynomial of degree 4 and remainder for ex about x = 0.

(a) Write ex = p (x) + f (x, c) for some c between 0 and x.

7. We can use the Taylor polynomial and remainder to estimate sin 2.

(a) This is what is so valuable about Taylor polynomials.

sin (2) = P4 (2) +cos c

120

³2− π

2

´5P4 (2) = 1− 1

2

³2− π

2

´2+1

24

³2− π

2

´4= 0.909¯

cos c

120

³2− π

2

´5 ¯<

0.55

120

= 0.00026

sin 2 = 0.909± 0.00026

8. This is revolutionary. We can actually calculate accurate values for sinx. Wecan produce estimates and error bounds.

(a) Class use the degree 4 Taylor polynomial for ex to estimate e0.2 and put abound on the error.

9. More words. A Taylor polynomial expanded about 0 is called a Maclaurinpolynomial.

10. Here are some common Maclaurin polynomials with remainder:

ex = 1 + x+ · · ·+ xn

n!+ecxn+1

(n+ 1)!

sinx = x− x3

3!+ · · ·+ (−1)n x2n+1

(2n+ 1)!+ (−1)n+1 (sin c)x

2n+2

(2n+ 2)!

cosx = 1− x2

2!+ · · ·+ (−1)n x2n

(2n)!+ (−1)n+1 (sin c)x

2n+1

(2n+ 1)!

1

1− x = 1 + x+ · · ·+ xn + xn+1

(1− c)n+2

(a) You are expected to remember these.

73

Page 75: Calculus II–Math 227.04

3.3.5 Taylor Series and Convergence

1. Given a function and points a, x we have the Taylor polynomial and remainderof any degree:

f (x) = f (a) + f 0 (a) (x− a) + · · ·+ f(n) (a)

n!(x− a)n + f

(n+1) (c)

(n+ 1)!(x− a)n+1

(a) If we let the Taylor polynomial about a go on forever, we call it the Taylorseries about a.

i. If a = 0 we call it the Maclaurin series.

(b) The Taylor series encodes all the Taylor polynomials, but doesn’t tell usmuch about the remainder.

(c) We write f (x) ∼ (a) + f 0 (a) (x− a) + · · ·+ f(n) (a)

n!(x− a)n + · · ·

i. The symbol ∼ means “Taylor series for”.

2. Here are some common Maclaurin series (Taylor series about 0):

ex ∼ 1 + x+ · · ·+ xn

n!+ · · ·

sinx ∼ x− x3

3!+ · · ·+ (−1)n x2n+1

(2n+ 1)!+ · · ·

cosx ∼ 1− x2

2!+ · · ·+ (−1)n x2n

(2n)!+ · · ·

1

1− x ∼ 1 + x+ · · ·+ xn + · · ·

(a) know these.

3. You cannot evaluate a Taylor series directly, because you cannot add up aninfinite number of terms

4. But you can add up an initial segment of the Taylor series, which is a Taylorpolynomial.

(a) You can hope that the resulting values approximate the function whichgave you the Taylor series.

(b) You can hope that the more terms you add, the more accurate will be yourapproximation

(c) You can hope that it will rain nickles tomorrow.

(d) There is a better chance that the Taylor polynomials will give better andbetter approximations to the function than that it will rain nickles tomor-row.

(e) However, Taylor polynomials DO NOT always approximate the function.

i. Convergence of series is like convergence of improper integrals.

ii. Sometimes it happens, and sometimes it doesn’t

iii. There are ways to know.

5. When the Taylor polynomials give better and better approximations–when thedifference between the approximations and the function value is eventually lessthan any predetermined positive “error”, we say that the Taylor series convergesto the function.

6. We can use the Taylor polynomial and remainder to determine if the seriesconverges to the function.

74

Page 76: Calculus II–Math 227.04

7. In the last section, we used the remainder to determine the number of termsrequired to approximate a function to a certain accuracy. Here we are justconcerned with determining if the series eventually converges, an easier question.

(a) It might appear that there is no need to consider the remainder.

(b) Given a function f (x),

i. construct the Taylor series by evaluating the derivatives of f (x).

ii. use the ratio test to determine the radius of convergence for the series.

iii. that will tell you for which x the series converges to the function

(c) but even if the series converges, how do you know that the series convergesto the function?

i. There are examples of Taylor series that do not converge to their func-tions

ii. The Taylor series about 0 for f (x) = e1/x2

is 0+0x+0x2+ · · · , whichis not equal to the function for any x 6= 0

(d) So to determine if a Taylor series converges to a function you should ex-amine the remainder term

(e) But the details are best left for a more advanced analysis course, so we willbelieve

i. the series for1

1− x converges to1

1− x for |x| < 1ii. the series for ex, sinx and cosx converge for all x

iii. any series derived from these by addition, multiplication, integrationand differentiation has the same radius of convergence as the compo-nents.

iv. division can change the radius of convergence

A. the series for sinx and cosx converge for all x, but the series for

tanx =sinx

cosxconverges for |x| < π

2because tan π

2 is undefined.

B. the series is: tanx = x+ 13x

3 + 215x

5 + 17315x

7 + 622835x

9 + · · ·there is no apparent pattern

8. Here’s a sample calculation for you to read that we’ll skip in class.

(a) The Maclaurin polynomial of degree n with remainder for ex is:

ex = 1 + x+x2

2!+ · · ·+ x

n

n!+ecxn+1

(n+ 1)!

for some c between 0 and x.

(b) If we hold x fixed and let n get bigger and bigger, what happens.

i. For each value of n we have a different c, but no matter what the valueof n we can say that the remainder R satisfies

|R| ≤ max (1, ex)xn+1

(n+ 1)!

limn−→∞

max (1, ex)xn+1

(n+ 1)!= max (1, ex) lim

n−→∞xn+1

(n+ 1)!

= max (1, ex) limn−→∞

xn

n!

75

Page 77: Calculus II–Math 227.04

ii. I want to show that this limit is 0. Choose N > x. Then for n > Nwe have

xn

(n)!=

xN

N !

xn−N

(N + 1) · · ·n

<xN

N !

µx

N + 1

¶n−N0 ≤ lim

n−→∞xn

(n)!

<xN

N !lim

n−→∞

µx

N + 1

¶n−N= 0

(c) This means that, no matter what x you pick, the longer the Maclaurinpolynomial for ex, the better the approximation. You can always pick nso that the nth approximation has error smaller than any desired amount.(But you might have to pick a very large n.)

(d) In this case we say that the series converges to the function. That meansthat we can make the error between the Taylor polynomial value and thefunction value as small as we want by taking a sufficiently large Taylorpolynomial.

(e) A similar argument shows that the Maclaurin series for sin and cos convergefor all x, but some series only converge for some values of x.

9. Here’s another sample calculation to be skipped in class. We can show that the

series for1

1− x converges for −1 ≤ x ≤ 1, but not for other values of x

(a) In fact the series diverges for other values, since the individual terms aregetting bigger and bigger.

(b) The remainder for1

1− x is R =xn

(1− c)n+2 , and we cannot show that thisgoes to 0. But we have a more precise remainder:

(1− x) (1 + · · ·+ xn) = 1− xn+1

1 + · · ·+ xn =1− xn+11− x

1

1− x = 1 + x+ · · ·+ xn + xn+1

1− x

i. The remainder can be writtenxn+1

1− x .

ii. If −1 ≤ x ≤ 1 we have limn−→∞ xn+1

1− x = 0 so the series converges.

iii. If |x| ≥ 1 we have limn−→∞ xn

1− x does not converge to 0.

A. If x = 1,1

1− x is not defined so we cannot say anything about itsMaclaurin series

B. If x = −1 then xn

1− x = ±12and the values do not converge to

anything

C. If x > 1 thenxn

1− x converges to −∞

D. If x < −1 then xn

1− x oscillates between values that are larger andlarger positive and negative

76

Page 78: Calculus II–Math 227.04

(c) Therefore1

1− x ≈ 1 + x+ x2 + · · ·+ xn if − 1 < x < 1

10. We say almost the same thing three ways:

ex = 1 + x+ · · ·+ xn

n!+ecxn+1

(n+ 1)!

ex ∼ 1 + x+ · · ·+ xn

n!+ · · ·

ex ≈ 1 + x+ · · ·+ xn

n!

(a) For any x, ex is equal to the right-hand side for some value of c between 0and x.

(b) The Maclaurin series for ex (Taylor series about 0).

(c) An approximation for ex

11. How good are the approximations:

-1

-0.5

0.5

1

-4 -2 2 4x

sinx red

x black

x− x3

6green

x− x3

6+x5

120purple

x− x3

6+x5

120− x7

5040blue

(a) Here’s another

i.-2

-1

0

1

2

-1 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1x

77

Page 79: Calculus II–Math 227.04

1

1− x red

1 + x black1 + x+ x2 + x3 green1 + x+ x2 + x3 + x4 + x5 purple1 + x+ x2 + x3 + x4 + x5 + x6 + x7 blue

(b) Euler, in a moment of weakness, suggested that1

2= 1− 1+1− 1+1− · · ·

3.3.6 Manipulating Taylor Series

1. Finding a Taylor series for each function would be difficult, but we can use thefour basic series to get a lot of others. This is like using differentiation rulesinstead of computing the limit for each derivative.

(a) To find the Taylor series of f (x)+g (x) about a of degree n, find the Taylorseries for f and g and add them.

(b) To find the Taylor series of f (x) g (x) about a of degree n, find the Taylorpolynomials for f and g and multiply them up to degree n

(c) Example:

ex + cosx ∼ 2 + x+x3

3!+2x4

4!+ · · ·

ex cosx ∼ 1 + x+ x3µ1

3!− 12

¶+ x4

µ1

4!− 14+1

4!

¶+ · · ·

= 1 + x− 13x3 − 1

6x4 + · · ·

(d) Since the components converge for all x, so does the sum and product.

(e) Class do sinx+ cosx, sinx cosx, degree 4.

2. When you combine series (or integrate or differentiate), the result converges ifthe components do.

sinx ∼ x− x3

3!+x5

5!− · · ·

converges for all x

sinx2 = x2 − x6

3!+x10

5!− · · ·

converges for all x

cosx = (sinx)0

∼µx− x

3

3!+x5

5!− · · ·

¶0= 1− x

2

2!+x4

4!− · · ·

78

Page 80: Calculus II–Math 227.04

(sinx)2 ∼µx− x

3

3!+x5

5!− · · ·

¶2ugh

(sinx)2 =

Z2 sinx cosx dx

=

Zsin 2xdx

∼Z Ã

2x− (2x)3

3!+(2x)5

5!− · · ·

!dx

= x2 − 23x4

4!+25x6

6!− · · ·

= x2 − 2x4

1 · 3 +4x6

1 · 3 · 5 −8x8

1 · 3 · 5 · 7 + · · ·

coshx =ex + e−x

2

∼³1 + x+ x2

2! + · · ·´+³1− x+ x2

2! − · · ·´

2

= 1 +x2

2!+x4

4!+ · · ·

converges for all x

3. Class find first few terms of Maclaurin polynomials for

(a) cos (x/2)

(b) sinx cosx two ways: by multiplication and by sinx cosx =1

2sin 2x

4. Class: use Taylor series to show¡e2x¢0= 2e2x

5. Class: use Taylor series to showRxexdx = xex − ex

6. Class: use Taylor series to approximateR 0.50sin t2 dt

7. Class: find the Taylor series for1

2 + 3x2. What is the radius of convergence?

(Hint:1

2 + 3x2=

1

2

1 +3

2x2)

3.3.7 Binomial series

1. We know(1− x)−1 ∼ 1 + x+ x2 + x3 + · · ·

(a) converges for |x| < 1. Actually this is a special case of (1− x)n. We knowwhat to do if n is a positive integer:

(1− x)0 ∼ 1 + 0x+ 0x2 + 0x2 + · · ·(1− x)1 ∼ 1− x+ 0x2 + 0x2 + · · ·(1− x)2 ∼ 1− 2x+ x2 + 0x2 + · · ·

2. More generally, define the binomial coefficients³ni

´=

n!

i! (n− 1)!=

n (n− 1) · · · (n− i+ 1)i!

which works for any number n so long as i is a non-negative integer. If n is anon-negative integer we have:

79

Page 81: Calculus II–Math 227.04

(a) ³n0

´=

³nn

´= 1³n

1

´=

µn

n− 1¶= 1³n

i

´=

µn

n− i¶

³ni

´= 0 if i > n

and most importantly, the binomial theorem

(a+ b)n

=³n0

´anb0 +

³n1

´an−1b1 + · · ·+

³ni

´an−ibi + · · ·+

³nn

´a0bn

= an + nan−1b+n (n− 1)

2an−2b2 + · · ·+ nabn−1 + bn

(1 + x)n = 1 + nx+n (n− 1)

2x2 + · · ·+ nxn−1 + xn

(b) Class do (1 + x)4

3. Newton was able to extend this result to all powers, not just integral powers.In general:

(1 + x)n ∼ 1 + nx+ n (n− 1)

2x2 + · · ·+

³ni

´xi + · · ·

(a) This is an infinite series unless n is non-negative integer. It converges for|x| < 1. For example:

(1 + x)1/2 ∼ 1 +

1

2x− 1

8x2 +

1

2

µ−12

¶µ−32

¶3!

x3 + · · ·

= 1 +1

2x− 1

8x2 +

1

16x3 + · · ·

√0.9 ≈ 1 +

(−0.1)2

− (−0.1)2

8+(−0.1)316

+ · · ·= 0. 948 69

Check: 0. 948 692 = . 900 01

(b) How good is the really cheap approximation√1− x ≈ 1− x

2

i.

x 0.1 0.05 0.01 0.001

1− x2

0.95 0.975 0.995 0.9995√1− x 0.948683 0.974679. 0.994987 0.99949987

4. Class: use the binomial expansion to check the Maclaurin series for1

1− x =(1− x)−1.

5. Class

(a) do four terms for¡1− x2¢−1/2

(b) do four terms for arcsin (x)

(c) If you continued the series, what would the radius of convergence be?

80

Page 82: Calculus II–Math 227.04

3.3.8 Taylor Series and differential equations

1. Series come from functions (Taylor series) and from differential equations

(a) Consider y0 = y − x, y (0) = 1.i. y ∼ a0 + a1x+ a2x2 + · · ·ii. y − x ∼ a0 + (a1 − 1)x+ a2x2 + · · ·iii. y0 ∼ a1 + 2a2x+ 3a3x2 + · · ·iv. y (0) = a0 so a0 = 1 so

a0 = 1

a1 = a0

a1 = 1

2a2 = a1 − 1a2 = 0

3a3 = a2

a3 = 0...

nan = an−1an = 0

v. solution is 1 + x.

(b) change to y0 = y − x, y (0) = 0

a0 = 0

a1 = a0

a1 = 0

2a2 = a1 − 1a2 =

−12

3a3 = a2

a3 =−16...

nan = an−1

an =−1n!

y ∼ −12!x2 − 1

3!x3 − 1

4!x4 − · · ·

= 1 + x− ex

(c) Class: use series to solve y0 = −2xy.

3.4 Differential Equations

3.4.1 Introduction

1. We began by studying integrals, which are useful for calculating quantities thatcan be viewed as accumulations

81

Page 83: Calculus II–Math 227.04

(a) Area is an accumulation of little strips of area

(b) Arc length is an accumulation of little bits of arc length

(c) Volume is an accumulation of little slices or cylinders

(d) Work is an accumulation of little forces

2. There are many ways to calculate integrals, some exact, some approximate

(a) Exact calculations of integrals are carried out with antiderivatives, usingthe fundamental theorem of calculus

(b) It turns out that a more general process related to antidifferentiation cansolve a lot of other scientific problems

3. A differential equation is an equation that tells you how a function and itsderivative are related. The solution is a function, not a number.

(a) The differential equationy0 = y

tells you that you are looking for a function y (t) that equals its derivative.

i. Solutions are y = et, y = −et, y = 3et,ii. most general solution y = Cet

iii. If we add an initial condition y (0) = 2 we get a single solution y = 2et

(b) Class solve y0 = −y, y (1) = 3(c) When you find the antiderivative of a function f (x) you are solving the

differential equation y0 = f (x).(d) In general, differential equations are hard to solve. Imagine:

xy00 + 2y0 + xy = 0

One solution is y =sinx

x.

i. Class check.

xd2

dx2

µsinx

x

¶+ 2

d

dx

µsinx

x

¶+ x

µsinx

x

¶= 0

ii. The generic solution is C1sinx

x+ C2

cosx

x.

4. Differential equations are the language of science.

(a) The first scientist to use differential equations was Isaac Newton, whostated and used a differential equation for gravity. If y is the distancebetween two bodies, then the distance changes according to the law:

y00 =−Gy2

i. Before Newton could do this, he had to invent calculus. Smart guy.

ii. Scientists that followed understood the power of calculus both for ex-pressing scientific laws and using them to predict phenomena.

(b) If a mass M is attached to a spring with spring constant k, let y denotethe position of the spring at time t, with y = 0 corresponding to the restposition of the spring. Then the acceleration of the spring y00 is proportionalto the force on the spring, which is −ky, so the position function y for themass satisfies the differential equation:

My00 = −kyMy00 + ky = 0

The solution with initial condition y (0) = 0, y0 (0) = 1 is y = sin

Ãrk

Mt

!82

Page 84: Calculus II–Math 227.04

i. Class check

(c) Population theory. A population is represented by a function p (t), where tis time measured in years. Suppose the population grows by 2% each year.Then the rate of change p0 (t) of the population function is a constantmultiple of p (t), or

p0 = kp

(Finding k from the given 2% is indirect, as we will see.) If we assume thatthe population at time 0 is p (0) = 10, 000, then

p (t) = Cekt (general solution)

p (0) = C = 10, 000

p (t) = 10000ekt (particular solution)

We know that p (1) = 10, 200, so we can find k:

10200 = 10000ek

k = ln

µ10200

10000

¶= 1. 980 3× 10−2

So the final solution for the population function is:

p (t) = 10000e1.9803t

(d) Class: find population function if decreases at 3% each year and starts at500.

(e) Population theory also applies to radioactive decay.

(f) Now for the bad news. We all die. Populations don’t increase forever. Re-alistic population theory takes account of population growth, stabilizationand decay.

i. Populations grow when they are small (relative to carrying capacity ofenvironment)

ii. Populations decrease when they exceed carrying capacity

iii. Populations at carrying capacity level stay there (except for randomfluctuations and some other very interesting phenomena leading tochaos theory–the local expert is Dr. Goetz.)

(g) The general model is is:

P 0 = kPµ1− P

K

¶Where k and K are positive constants. A “solution” is a function P (t)that describes population levels at time t.

i. If 0 < P (t) < K then P 0 (t) > 0 and the population is increasing.ii. If P (t) > K then P 0 (t) < 0 and the population is decreasing.iii. If P (t) ≈ K then P 0 (t) ≈ 0 and the population is changing very slowly.iv. So long as 0 < P (t) << K then P 0 ≈ kP and population grows

exponentially.

v. P (t) = K, is a special solution. One solution is a population thatstays at the same level K for all time.

vi. If we set K = k = 1 we get the solutions y =et

et + 1y(0) − 1

. Here are

the graphs of some solutions for y (0) = 0.25, 0.6, 1.25, 2.0.

83

Page 85: Calculus II–Math 227.04

0.5 1 1.5 2 2.5 3

0.250.50.75

11.251.51.75

2

A. Class check that solution satisfies equation, that initial value cor-rect, that limit is 1 as t −→∞.

3.4.2 Separable Differential Equations

1. Some differential equations can be solved exactly and easily. These are theso-called separable differential equations. They have the form:

y0 = f(t)g (y)

(a) the solution is

dy

dx= f (x) g (y)

dy

g (y)= f (x) dxZ

dy

g (y)=

Zf (x) dx

2. Example:

y0 = y

y (0) = 1

dy

dt= y

dy

y= dtZ

dy

y=

Zdt

ln y = t+ C1 put arbitrary constant on one side

y = et+C1

= C2et

1 = C2e0 put in initial condition

y = et

3. Another example:

y0 = ty

y (0) = 2

84

Page 86: Calculus II–Math 227.04

dy

dt= ty

dy

y= t dtZ

dy

y=

Zt dt

ln y =t2

2+ C1

y = et2/2+C1

= C2et2/2

4. Class try some

(a) y0 = y/t, y(1) = 1

(b) y0 =1

y, y (0) = 1

(c) y0 = y2, y (0) = 1

(d) y0 =p1− y2, y (0) = 0, y (0) = 1

3.4.3 Direction Fields

We are interested in differential equations that have the form y0 = f (x, y), but notnecessarily separable equations..

1. Example:y0 = t2 + y2

We cannot find exact solution,

(a) We know IF there was a solution y (t) such that y (1) = 2 THEN the slope

of the graph of y (t) at t = 1 would be y0 (1) = 12 + y (1)2 = 12 + 22 = 5.

(b) More generally, the differential equation tells us the slope of the graph ofthe solution function y (t) IF we know a point on the graph.

(c) Could you drive car if the windows were all blacked out, but you had acompass and you got a constant stream of instructions from the radio: “go70◦, go 100◦, go 120◦”? That is what an airline pilot does. Or a boat inthe fog.

(d) If we pick an initial value for our differential equation, say y (0) = 0, thenthe differential equation gives is directions how to drive across the ty-planeto trace out the graph of y (t). We start with slope 0, but as soon as wehave moved a little bit, we have to change our slope and start going up.

(e) The “driving instructions” can be encoded graphically in a direction field.At representative points (t, y) draw a little line with slope t2 + y2.

i. Class do it at (−2,−2) · · · (2, 2).(f) You can draw the direction field in Mathematica. Here are the commands.

Needs[’’Graphics‘PlotField‘’’]

slopeField[f ] := {1, f}/Sqrt[1 + f^2]PlotVectorfield[slopeField[tˆ2+ yˆ2],{t,-2,2},{y,-2,2},Frame->True]i. Here’s the result.

85

Page 87: Calculus II–Math 227.04

ii. The idea is that at representative points (t, y) we draw a vector oflength 1 with slope y0 = t2 + y2. The formula for the vector is:¡

1, t2 + y2¢q

12 + (t2 + y2)2

In Mathematica we begin by loading the package for drawing vectorgraphics. Don’t forget to use double quotes and backwards singlequotes. Then we plot the desired vector field.

A. Remark: we define

G =Fp

F 21 + F22

not

G =Fp

1 + (t2 + y2)2

Both definitions would be the same for our example, but the firstwould work for any vector function F while the second would not.(For G to work for any F you need the colon-equals instead ofplain equals in Mathematica.)

B. Remark: Graphing vectors of length 1 works better than graphingthe vectors F . Here is a graph of F :

86

Page 88: Calculus II–Math 227.04

-2 -1 0 1 2-2

-1

0

1

2

Some vectors are much longer than others, and the short ones don’tshow very well.

iii. The field (the picture) represents driving directions in the sense thatif you start at any point, your driving directions would be: “follow thearrows”.

iv. Here is a trip (trajectory) followiing the directions starting at (0, 0)

-2 -1.5 -1 -0.5 0.5 1 1.5 2

-2-1.5-1

-0.5

0.51

1.52

2. The direction field for the population equation p0 = 3p (1− p) is:

87

Page 89: Calculus II–Math 227.04

0 0.5 1 1.5 2 2.5 3

0

0.5

1

1.5

2

(a) If, at time 0, the population starts at 0, it stays there.

(b) If, at time 0, the population starts between 0 and 1, it rises to 1.

(c) If, at time 0, the population starts at 1, it stays there.

(d) If, at time 0, the population starts above 1, it declines to 1.

3.4.4 Euler’s Method of Approximating Solutions to Differential Equa-tions y0 = f (t, y)

1. Ideally, the direction field provides continuous guidance as we trace the solutionto an IVP. In practice we cannot accept or use continuous information. We canonly use discrete bits of information.

(a) Recall: if you have incomplete information about a function y (t), but youknow at t = a the value y (a) and y0 (a), then for a small value dt you canapproximate y (a+ dt) ≈ y (a) + y0 (a) dt

2. Let’s go back to y0 = t2 + y2, y (0) = 1.

(a) If we start at t = 0, y = 1, the slope of the solution curve is 1. So wemight go to t = 0.1. Then y (0.1) ≈ y (0) + y0 (0) 0.1 = 1.1. We can go to(0.1, 1.1) and take another direction reading.

(b) At the point t = 0.1, y = 1.1, the slope is y0 (0.1) ≈ 0.12 + 1.12 = 1.22.Then y (0.2) ≈ y (0.1) + y0 (0.1) 0.1 ≈ 1.1 + 1.22× 0.1 = 1.222. We can goto (0.2, 1.222) and take another direction reading.

(c) Let’s make a chart

88