unit3 who sept24
TRANSCRIPT
-
8/14/2019 Unit3 Who Sept24
1/43
MIT OpenCourseWarehttp://ocw.mit.edu
18.01 Single Variable Calculus
Fall 2006
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
http://ocw.mit.edu/http://ocw.mit.edu/http://ocw.mit.edu/termshttp://ocw.mit.edu/termshttp://ocw.mit.edu/ -
8/14/2019 Unit3 Who Sept24
2/43
Lecture18 18.01Fall2006
Lecture18: Definite IntegralsIntegralsareusedtocalculatecumulativetotals,averages,areas.
Areaunderacurve: (SeeFigure 1.)1. Divideregionintorectangles2. Addupareaofrectangles3. Take limitasrectanglesbecomethin
a b a b(i) (ii)
Figure1: (i)Areaunderacurve;(ii)sumofareasunderrectanglesExample1. f(x) =x2,a=0,b arbitrary
1. Divide intonintervalsLengthb/n= baseofrectangle
2. Heights: 2
b b1st: x= , height =
n n 22b 2b
2nd: x= , height =n n
Sumofareasofrectangles: 2 2 2 2
b b b 2b b 3b b nb b3+ + + + = (12 + 22 + 32 + +n2)
n n n n n n n n n3
1
-
8/14/2019 Unit3 Who Sept24
3/43
Lecture18 18.01Fall2006
a=0 b
2Figure2: Areaunderf(x) = x above [0, b].Wewillnowestimatethesumusingsome3-dimensionalgeometry.
ConsiderthestaircasepyramidaspicturedinFigure 3.
n = 4
n
Figure3: Staircasepyramid: left(topview)andright(sideview)1st
level: nnbottom,representsvolumen2.2nd level: (n1)(n1),representsvolumne(n1)2),etc.Hence,thetotalvolumeofthestaircasepyramid isn2 + (n1)2 + + 1.
Next,thevolumeofthepyramidisgreaterthanthevolumeofthe innerprism:1 1 1
12 + 22 + +n2 > (base)(height)= n2 n= n3 3 3 3
andlessthanthevolumeoftheouterprism:1 1
12 + 22 + +n2
-
8/14/2019 Unit3 Who Sept24
4/43
Lecture18 18.01Fall2006
Inall,1 1n3 12 + 22 + +n2 1 (n+1)3
= 3
-
8/14/2019 Unit3 Who Sept24
5/43
Lecture18 18.01Fall2006
GeneralPicture
a bci
y=f(x)
Figure5: Onerectangle fromaRiemannSum
Divide intonequalpiecesoflength=x= ban
Pickanyci inthe interval;usef(ci)astheheightoftherectangle
Sumof
areas:
f(c
1
)x+
f(c
2
)x+
+
f(c
n
)x
n
Insummationnotation: f(ci)x calledaRiemannsum.i=1
Definition:n b
lim f(ci)x= f(x)dx calledadefinite integralan
i=1
Thisdefiniteintegralrepresentstheareaunderthecurvey=f(x)above[a, b].
Example3.
(Integrals
applied
to
quantity
besides
area.)
Student
borrows
from
parents.
P =principalindollars,t=timeinyears,r= interestrate(e.g.,6% isr= 0.06/year).Aftertimet,youoweP(1+rt) =P +P rt
Theintegralcanbeusedtorepresentthetotalamountborrowedasfollows. Considerafunctionf(t),theborrowingfunctionindollarsperyear. Forinstance,ifyouborrow$1000/month,thenf(t)=12,000/year. Allowf tovaryovertime.
Sayt= 1/12 year=1 month.ti =i/12 i= 1, ,12.
4
-
8/14/2019 Unit3 Who Sept24
6/43
-
8/14/2019 Unit3 Who Sept24
7/43
Lecture19 18.01Fall2006
Lecture 19: First Fundamental Theorem ofCalculus
Fundamental Theorem of Calculus (FTC 1)Iff(x)iscontinuousandF(x) =f(x),then b
f(x)dx=F(b)F(a)a
Notation: F(x) b =F(x) x=b =F(b)F(a)a x=a
b b3 3 b3 a3x x2; x2dx=Example1. F(x) = F(x) =x =
3 33 , 3a aExample2. Areaunderonehumpofsinx(SeeFigure 1.)
0 sinx dx=cosx
=cos(cos0)=(1)(1)=2
0
1
Figure1: Graphoff(x)=sinxfor0x.
1 16= 1 1
60 = 65dx=x
Example3. x60 0
1
-
8/14/2019 Unit3 Who Sept24
8/43
Lecture19 18.01Fall2006
Intuitive Interpretation of FTC:dx
x(t) isaposition; v(t) =x(t)= isthespeedorrateofchangeofx.dt bv(t)dt=x(b)x(a) (FTC1)
aR.H.S.ishowfarx(t)wentfromtimet=atotimet=b(differencebetweentwoodometerreadings).L.H.S.representsspeedometerreadings.
n
i=1
x(b)x(a) = v(t) cancel each other, whereas an
( ) approximates the sum of distances traveled over times t t tv i
thThe approximation above is accurate if ( ) is close to ( ) on the interval. The interpretationit tv v iof ( ) as an odometer reading is no longer valid if changes sign. Imagine a round trip so thattx v
0. Then the positive and negative velocitiesodometer would measure the total distance not the net distance traveled.Example4.
2
0 sinx dx=cosx2
=cos2(cos0)=0.0
The integral represents the sum of areas under the curve, above the x-axis minus the areas belowthex-axis. (SeeFigure 2.)
+
-
1
2
Figure2: Graphoff(x)=sinx for0x2.
2
-
8/14/2019 Unit3 Who Sept24
9/43
Lecture19 18.01Fall2006
Integralshaveanimportantadditiveproperty(SeeFigure 3.) b c c
f(x)dx+ f(x)dx= f(x)dxa b a
a b c
Figure3: Illustrationoftheadditivepropertyof integralsNewDefinition:
a bf(x)dx= f(x)dx
b aThisdefinitionisusedsothatthefundamentaltheoremisvalidnomatterifa < borb < a. Italsomakes it so that the additive property works for a,b,c in any order, notjust the one pictured inFigure 3.
3
-
8/14/2019 Unit3 Who Sept24
10/43
Lecture19 18.01Fall2006
Estimation: b b
Iff(x)g(x),then f(x)dx g(x)dx(onlyifa < b)a a
xExample5. EstimationofexSince1e forx0,
1 11dx exdx
0 0 1 exdx=ex1 =e1e0 =e1
0 0Thus1e1, or e2.
xExample6. Weshowedearlierthat1+xe . Itfollowsthat 1 1
(1+x)dx exdx=e10 0
1 21x 3
(1+x)dx= x+ =2 20 03 5
Hence,2e1,or,e 2 .
Change of Variable:Iff(x) =g(u(x)),thenwewritedu=u(x)dxand
g(u)du= g(u(x))u(x)dx= f(x)u(x)dx (indefiniteintegrals)Fordefinite integrals:
x2 u2f(x)u(x)dx= g(u)du whereu1 =u(x1), u2 =u(x2)
x1 u1
2 4
Example7. x3 + 2 x2dx1
Letu=x3 + 2. Thendu= 3x2dx = x2dx= du; 3x1 = 1, x2 = 2 = u1 = 13 + 2 = 3, u2 = 23 + 2=10, and
2 10 4 10 4du u5 10535x3 + 2 x2dx= u = =1 3 3 153 15
4
-
8/14/2019 Unit3 Who Sept24
11/43
Lecture20 18.01Fall2006
Lecture20: SecondFundamentalTheoremRecall: FirstFundamentalTheoremofCalculus(FTC1)
Iff iscontinuousandF =f,then bf(x)dx=F(b)F(a)
aWecanalsowritethatas b x=b
f(x)dx= f(x)dxx=aa
Doallcontinuousfunctionshaveantiderivatives? Yes. However...Whataboutafunction likethis?
2ex dx=??
Yes,thisantiderivativeexists. No,itsnotafunctionwevemetbefore: itsanewfunction.Thenewfunctionisdefinedasan integral:
x2
F(x) = et dt0
2
ItwillhavethepropertythatF(x) =ex .sinx1/2Othernewfunctionsincludeantiderivativesofex2, x ex2, ,sin(x2),cos(x2), . . .
xSecondFundamentalTheoremofCalculus(FTC2)
xIfF(x) = f(t)dtandf iscontinuous,then
aF(x) =f(x)
GeometricProofofFTC2: Usethearea interpretation: F(x)equalstheareaunderthecurvebetweenaandx.
F = F(x+ x)F(x)F (base)(height) (x)f(x) (SeeFigure 1.)Fx f(x)F
Hence lim = f(x)x 0 x
But,bythedefinitionofthederivative:F
lim =F(x)x 0 x
1
-
8/14/2019 Unit3 Who Sept24
12/43
Lecture20 18.01Fall2006
x+xxa
F(x)
F
y
Figure1: GeometricProofofFTC2.Therefore,
F(x) =f(x)AnotherwaytoproveFTC2 isasfollows:F 1 x+x xx = x f(t)dt f(t)dta a
1 x+x=
xf(t)dt (which istheaveragevalueoff onthe intervalxtx+ x.)
xAsthe lengthxofthe intervaltendsto0,thisaveragetendstof(x).ProofofFTC1(usingFTC2)
xStart with F = f (we assume that f is continuous). Next, define G(x) = f(t)dt. By FTC2,
aG(x) =f(x). Therefore, (FG) =FG =ff =0. Thus, FG= constant. (Recall weusedtheMeanValueTheoremtoshowthis).Hence,F(x) =G(x) +c. FinallysinceG(a)=0, b
f(t)dt=G(b) =G(b)G(a) = [F(b)c][F(a)c] =F(b)F(a)a
which isFTC1.Remark. IntheprecedingproofGwasadefinite integralandF couldbeanyantiderivative. Letusillustratewiththeexamplef(x)=sinx. Takinga=0 intheproofofFTC1, x x
G(x)= cost dt=sint =sinx andG(0)=0.0 0
2
-
8/14/2019 Unit3 Who Sept24
13/43
Lecture20 18.01Fall2006
If,forexample,F(x)=sinx+21. ThenF(x)=cosxand b
sinx dx=F(b)F(a)=(sinb+21)(sina+21)=sinbsinaaEveryfunctionoftheformF(x) =G(x) +cworks inFTC1.Examplesofnew functionsTheerrorfunction,which isoftenusedinstatisticsandprobability,isdefinedas
22 xerf(x) = et dt
0and lim erf(x) = 1 (SeeFigure 2)
x
Figure2: Graphoftheerror function.Anothernewfunctionofthistype,calledthelogarithmic integral,isdefinedas
x dtLi(x) =
lnt2This functiongivestheapproximatenumberofprimenumbers lessthanx. Acommon encryptiontechnique involvesencodingsensitive information likeyourbankaccountnumbersothat itcanbesent over an insecure communication channel. The message can only be decoded using a secretprimenumber. Toknowhowsafethe secret is, a cryptographer needs to knowroughly how many200-digitprimesthereare. Youcanfindoutbyestimatingthefollowing integral:
10201 dt10200 lnt
Weknowthatln10200 =200ln(10)200(2.3)=460 and ln10201 =201ln(10)462
3
-
8/14/2019 Unit3 Who Sept24
14/43
Lecture20 18.01Fall2006
Wewillapproximatetoonesignificantfigure: lnt500for200t10201.Withallofthatinmind,thenumberof200-digitprimesisroughly1
10201 10201 10200dt dt 1 910200 lnt 10200 500 = 500 1020110200 500 10198
ThereareLOTSof200-digitprimes. Theoddsofsomehackerfindingthe200-digitprimerequiredtobreak intoyourbankaccountnumberareveryveryslim.
AnothersetofnewfunctionsaretheFresnelfunctions,whichariseinoptics:x
C(x) = cos(t2)dt0xS(x) = sin(t2)dt
0Besselfunctionsoftenarise inproblemswithcircularsymmetry: 1
J0(x)= cos(xsin)d2 0
Onthehomework,youareaskedtofindC(x). Thatseasy!C(x)=cos(x2)
x dtWewilluseFTC2todiscussthefunctionL(x)= fromfirstprinciplesnext lecture.
t1
1 Themiddleequality inthisapproximation isaverybasicanduseful fact
bc dx=c(ba)
aThink of this as finding the area of a rectangle with base (ba) and height c. In the computation above, a =
110200, b=10201, c=500
4
-
8/14/2019 Unit3 Who Sept24
15/43
Lecture21 18.01Fall2006
Lecture21: ApplicationstoLogarithmsandGeometry
ApplicationofFTC2toLogarithmsThe integral definition of functions like C(x), S(x)of Fresnelmakesthemnearlyaseasytouse aselementary functions. It is possible to draw their graphs and tabulate values. You are asked tocarry out an example or two of this on your problem set. To get used to using definite integralsandFTC2,wewilldiscussindetailthesimplestintegralthatgivesrisetoarelativelynewfunction,namelythelogarithm.
Recallthat n+1xxndx= +cn+ 1
except when n=1. It follows that the antiderivative of 1/x is not a power, but something else.So letusdefineafunctionL(x)by x dt
L(x) =t1
(Thisfunctionturnsouttobethelogarithm. Butrecallthatourapproachtothelogarithmwasfairlyinvolved. Wefirstanalyzedax,andthendefinedthenumbere,andfinallydefinedthelogarithmas
xtheinversefunctiontoe . Thedirectapproachusingthis integralformulawillbeeasier.)AllthebasicpropertiesofL(x)followdirectlyfrom itsdefinition. NotethatL(x) isdefinedfor
0< x
-
8/14/2019 Unit3 Who Sept24
16/43
Lecture21 18.01Fall2006 ab dt
Tohandle ,makethesubstitutiont=au. Thenta
dt=adu; a
-
8/14/2019 Unit3 Who Sept24
17/43
-
8/14/2019 Unit3 Who Sept24
18/43
Lecture21 18.01Fall2006
First,graphthesefunctionsandfindthecrossingpoints(seeFigure 3).y+ 2 = x=y2
y2y2 = 0(y2)(y+ 1) = 0
Crossingpointsaty=1,2. Plug theseback intofindtheassociatedxvalues,x=1 andx=4.Thusthecurvesmeetat(1,1)and(4,2)(seeFigure 3).Therearetwowaysoffindingtheareabetweenthesetwocurves,ahardwayandaneasyway.HardWay: VerticalSlicesIf we slicetheregion betweenthe twocurvesvertically, weneed toconsider twodifferentregions.
x = y2
y = x 2
(1,1)
(4, 2)
(0, 0)
(0, -2)
dx
2Figure4: The intersectionofx=y andy=x2.Where x >1, the regions lowerbound is the straight line. For x
-
8/14/2019 Unit3 Who Sept24
19/43
Lecture21 18.01Fall2006
x = y2
(1,1)
(4, 2)
y = x 2 ; (x = y +2)(0, 0)
(0, -2)
dy
2Figure5: The intersectionofx=y andy=x2.2. VolumesofsolidsofrevolutionRotatef(x)aboutthex-axis,comingoutofthepage,toget:
f(x)
yrotate an x-y plane section
by 2 radians
x
z
dx
Figure6: Asolidofrevolution: thepurpleslice isrotatedby/4and/2.Wewanttofigureoutthevolumeofasliceofthatsolid. Wecanapproximateeachsliceasa
disk withwidthdx,radiusy,andacross-sectionalareaofy2. Thevolumeofoneslice isthen:dV =y2dx (forasolidofrevolutionaroundthex-axis)
Integratewithrespecttoxtofindthetotalvolumeofthesolidofrevolution.5
-
8/14/2019 Unit3 Who Sept24
20/43
-
8/14/2019 Unit3 Who Sept24
21/43
Lecture22 18.01Fall2006
Lecture22: VolumesbyDisksandShellsDisksandShells
Wewill illustratethe2methodsoffindingvolumethroughanexample.Example1. Awitchscauldron
y
x
2Figure1: y=x rotatedaroundthey-axis.
Method1: Disksy
x
thickness of dy
a
Figure2: VolumebyDisks fortheWitchsCauldronproblem.The area of the disk in Figure 2 is x2. The disk has thickness dy and volume dV = x2dy.
ThevolumeV ofthecauldronisa
V = x2dy (substitute y=x2)0 a 2ay a2
V = ydy= =2 0 20
1
-
8/14/2019 Unit3 Who Sept24
22/43
-
8/14/2019 Unit3 Who Sept24
23/43
Lecture22 18.01Fall2006
Thethinshell/cylinderhasheightax2,circumference2x,andthicknessdx.dV = (ax2)(2x)dx x=a a
V = (ax2)(2x)dx= 2 (axx3)dxx=0 0
2 4 2 2 2x x a a a a a2= 2 a
2 4 0 = 2 2 4 = 2 4 = 2 (sameasbefore)Example2. TheboilingcauldronNow,letsfillthiscauldronwithwater,andlightafireunderittogetthewatertoboil(at100oC).Letssay itsacoldday: thetemperatureoftheairoutsidethecauldronis0oC.Howmuchenergydoesittaketoboilthiswater,i.e. toraisethewaterstemperaturefrom0oCto100oC?Assumethe
y
x
70oC
100oC
Figure5: Theboilingcauldron(y=a=1meter.)temperaturedecreaseslinearlybetweenthetopandthebottom(y=0)ofthecauldron:
T =10030y (degreesCelsius)Usethemethodofdisks,becausethewaterstemperatureisconstantovereachhorizontaldisk. Thetotalheatrequiredis
1H = T(x2)dy (unitsare(degree)(cubicmeters))
01
= (10030y)(y)dy0
1 1= (100y30y2)dy=(50y210y3)
=40(deg.)m30 0
Howmanycaloriesisthat? 3
1cal 100cm#ofcalories =
cm3 deg(40) 1 m =(40)(106)cal=125103kcalThereareabout250kcalsinacandybar,sothereareabout
1#ofcalories = candybar 103500candybars
2So,ittakesabout500candybarsworthofenergytoboilthewater.
3
-
8/14/2019 Unit3 Who Sept24
24/43
Lecture22 18.01Fall2006
R
velocity
Figure6: Flowisfasterinthecenterofthepipe. Itslowssticksattheedges(i.e. theinnersurfaceofthepipe.)Example3. PipeflowPoiseuillewasthefirstpersontostudyfluidflowinpipes(arteries,capillaries). Hefiguredoutthe
velocityprofileforfluidflowinginpipes is:v = c(R2r2)
distancev = speed =time
r
v
cR2
R
v=c(R2-r2)
Figure7: Thevelocityoffluidflowvs. distance fromthecenterofapipeofradiusR.Theflowthroughtheannulus(a.k.aring)is(areaofring)(flowrate)
areaofring=2rdr (SeeFig. 8: circumference2r,thicknessdr)v isanalogoustotheheightoftheshell.
4
-
8/14/2019 Unit3 Who Sept24
25/43
Lecture22 18.01Fall2006
dr
r
Figure8: Cross-sectionofthepipe.
R
R
totalflowthroughpipe = v(2rdr) =c (R2r2)2rdr0 0 R
(R2R2r2 r4R
= 2c rr3)dr= 2c2 4 00
flowthroughpipe = cR42
NoticethattheflowisproportionaltoR4. Thismeanstheresabigadvantagetohavingthickpipes.Example4. DartboardYouaimforthecenteroftheboard,butyouraimsnotalwaysperfect. Yournumberofhits,N,at
2
radiusr isproportionaltoer .2
N =cerThislookslike:
1
2r
y = ce-r2
Figure9:
This
graph
shows
how
likely
you
are
to
hit
the
dart
board
at
some
distance
rfrom
its
center.
Thenumberofhitswithinagivenringwithr1 < r < r2 isr2
2c er (2rdr)
r1
Wewillexaminethisproblemmoreinthenextlecture.
5
-
8/14/2019 Unit3 Who Sept24
26/43
Lecture23 18.01Fall2006
Lecture23: Work,AverageValue,ProbabilityApplicationof IntegrationtoAverageValue
Youalreadyknowhowtotaketheaverageofasetofdiscretenumbers:a1 +a2 a1 +a2 +a3
or2 3
Now,wewanttofindtheaverageofacontinuum.
y=f(x)
a b.
x4
y4.
Figure1: Discreteapproximationtoy=f(x)onaxb.
Average y1 +y2 +...+ynn
wherea=x0 < x1 < xn =b
y0 =f(x0), y1 =f(x1), . . . yn =f(xn)and
n(x) =ba x= bn
a
andThe limitoftheRiemannSumsis
blim(y1 + +yn)b
n
a= f(x)dx
anDividebybatogetthecontinuousaverage
y1 + +yn 1 blim = f(x)dxn n ba a
1
-
8/14/2019 Unit3 Who Sept24
27/43
Lecture23 18.01Fall2006
area = /2
y=1-x2
Figure2:
Average
height
of
the
semicircle.
Example1. Findtheaverageofy=1x2 ontheinterval1x1. (SeeFigure 2)
1 1 1 Averageheight=
2 1x2dx= 2 2 = 41
Example2. Theaverageofaconstant isthesameconstant b1
53dx=53ba a
Example3. Findtheaverageheighty onasemicircle,withrespecttoarclength. (Used notdx.SeeFigure 3)
equal weighting in
different weighting in x
Figure3: Differentweightedaverages.
2
-
8/14/2019 Unit3 Who Sept24
28/43
Lecture23 18.01Fall2006
y = sin
1 1(
cos) 1 2Average = sind= (
cos
(
cos0))==0 0
Example4. Findtheaveragetemperatureofwaterinthewitchescauldronfromlastlecture. (SeeFigure 4).
2m
1m
Figure4: y=x2,rotatedaboutthey-axis.First,recallhowtofindthevolumeofthesolidofrevolutionbydisks.
1 1 y2 1 =
0 2V = (x2)dy= ydy= 20 0Recall that T(y)=10030y and (T(0)=100o;T(1)=70o). The average temperature per unitvolume iscomputedbygivinganimportanceorweightingw(y) =y tothediskatheighty.
1T(y)w(y)dy
01w(y)dy0
Thenumeratoris 1 1 1(10030y)ydy=(500y210y3) =40Tydy=
0 0Thustheaveragetemperatureis:
0
40=80oC
/2Comparethiswiththeaveragetakenwithrespecttoheighty:
1 11Tdy=
1 (10030y)dy=(100y15y2)1
=85oC00 0
Tislinear. LargestT =100oC,smallestT =70oC,andtheaverageofthetwois70+100
=852
3
-
8/14/2019 Unit3 Who Sept24
29/43
-
8/14/2019 Unit3 Who Sept24
30/43
Lecture23 18.01Fall2006
dr
width dr,
circumference 2r
weighting ce-rr
Figure6: Integratingoverrings.
3r1
2Theringhasweight cer (2r)(dr)(seeFigure 6). Theprobabilityofadarthittingyourbrotheris:
12r1 ce
r22rdr6cer22rdr0
Recall that 1 = 5312 is our approximation to the portion of the circumference where the little6
brotherstands. (Note: er2 =e(r2 ) not(er)2 ) b
2 1er2 b 1 1 deb2 2 er2 2=2rerrer ea+dr=
a =2 2 2 draDenominator:
2
2 1 R 1eR2 1e02 1=er er +rdr= =2 2 2 200
(NotethateR2 0asR.)
Figure7: NormalDistribution.
2 213r1 cer 2rdr 13r1 er rdr 1 3r1 226 2r1 = 6 2r1 = er rdr=er 3r1Probability=
cer22rdr 2rdr 3 6er 2r12r10 05
-
8/14/2019 Unit3 Who Sept24
31/43
-
8/14/2019 Unit3 Who Sept24
32/43
Lecture23 18.01Fall2006
VolumebySlices: AnImportantExample
2ComputeQ= ex dx
Figure8: Q=Areaundercurvee(x2).Thisisoneofthemostimportantintegralsinallofcalculus. Itisespeciallyimportantinprobabilityandstatistics. Itsan improperintegral,butdontletthosesscareyou. Inthis integral,theyreactuallyeasiertoworkwiththanfinitenumberswouldbe.
TofindQ,wewillfirstfindavolumeofrevolution,namely,2
V =volumeunderer (r= x2 +y2)Wefindthisvolumebythemethodofshells,whichleadstothesameintegralasinthelastproblem.
2
The shell or cylinder under er at radius r has circumference 2r, thickness dr; (see Figure 9).2ThereforedV =er 2rdr. Intherange0rR,
R2 2 R
=eR2 +er 2rdr=er0
WhenR, eR2 0,0
2
er 2rdr= (sameasinthedartsproblem)V =0
7
-
8/14/2019 Unit3 Who Sept24
33/43
-
8/14/2019 Unit3 Who Sept24
34/43
-
8/14/2019 Unit3 Who Sept24
35/43
-
8/14/2019 Unit3 Who Sept24
36/43
Lecture24 18.01Fall2006
Lecture24:Numerical IntegrationNumerical Integration
Weusenumerical integrationtofindthedefiniteintegralsofexpressionsthat look like: b(abigmess)
aWe also resort to numerical integration when an integral has no elementary antiderivative. Forinstance,there isnoformulafor x 3
cos(t2)dt or ex2dx0 0
Numerical integrationyieldsnumbersratherthananalyticalexpressions.Welltalkaboutthreetechniquesfornumericalintegration: Riemannsums,thetrapezoidalrule,
andSimpsonsrule.1.RiemannSum
a b
Figure1: Riemannsumwith leftendpoints: (y0+y1+. . .+yn1)xHere,
xi xi1 = x(or,xi =xi1 + x)
a=x0 < x1 < x2
-
8/14/2019 Unit3 Who Sept24
37/43
Lecture24 18.01Fall2006
2. TrapezoidalRuleThe
trapezoidal
rule
divides
up
the
area
under
the
function
into
trapezoids,
rather
than
rectangles.
Theareaofatrapezoidistheheighttimestheaverageoftheparallelbases:
base1 + base2 y3 +y4Area=height = x (SeeFigure 2)
2 2
y3
y4
x
Figure2: Area= y3+y4 x2
a b
Figure3: Trapezoidalrule=sumofareasoftrapezoids.
TotalTrapezoidalArea = x y0 +y1 +y1 +y2 +y2 +y3 +...+yn1 +yn2 2 2 2
= xy
20 +y1 +y2 +...+yn1 +y
2n
2
-
8/14/2019 Unit3 Who Sept24
38/43
Lecture24 18.01Fall2006
Note: The trapezoidal rule gives a more symmetric treatment of the two ends (a and b) than aRiemannsumdoestheaverageof leftandrightRiemannsums.
3. SimpsonsRuleThis approach often yields much more accurate results than the trapezoidal rule does. Here, wematchquadratics(i.e. parabolas), insteadofstraightorslanted lines,tothegraph. Thisapproachrequiresanevennumberofintervals.
x x x
y0
y1
y2
x x
Figure4: Areaunderaparabola.
y0 + 4y1 +y2Areaunderparabola=(base)(weightedaverageheight)=(2x)
6Simpsonsrulefornintervals(nmustbeeven!)
1Area=(2x) 6 [(y0 + 4y1 +y2) + (y2 + 4y3 +y4) + (y4 + 4y5 +y6) + + (yn2 + 4yn1 +yn)]Noticethefollowingpattern inthecoefficients:
1 4 11 4 1
1 4 11 4 2 4 2 4 1
3
-
8/14/2019 Unit3 Who Sept24
39/43
Lecture24 18.01Fall2006
0 1 2 3 4
1st chunk 2nd chunk
Figure5: AreagivenbySimpsonsrulefor four intervalsSimpsonsrule:
b xf(x)dx
3(y0 + 4y1 + 2y2 + 4y3 + 2y4 +. . .+ 4yn3 + 2yn2 + 4yn1 +yn)
aThepatternofcoefficientsinparenthesesis:
1 4 1 = sum 61 4 2 4 1 = sum 12
1 4 2 4 2 4 1 = sum 18Todoublecheckplug inf(x) = 1 (neven!).
x x n n 3 (1 + 4 + 2 + 4 + 2 + + 2 + 4 + 1) = 3 1 + 1 + 4 2 + 2 2 1 =nx (neven)
4
-
8/14/2019 Unit3 Who Sept24
40/43
Lecture24 18.01Fall2006
1 1Example1. Evaluate dx using two methods(trapezoidal and Simpsons) of numerical
1 +x20integration.
0 1x x
Figure6: Areaunder(1+
1x2) above [0,1].
x y0 +y1BySimpsonsrule:
2 2 2 2 5 2 2 2 2 5 4
x 1/2 4 1(y0 + 4y1 +y2) = 1 + 4 + = 0.78333...3
Exactanswer:3 5 2
1 1 1 dx=tan1x =tan11tan10 =
4 0 = 4 0.7851 +x2 0Roughlyspeaking,theerror,|SimpsonsExact|, hasorderofmagnitude(x)4.
0
x0 1
1 452
1Bythetrapezoidalrule:
1/(1+x2)
12
+ y2 = (1) + + = + + = 0.7751 1 1 1 4 1 1 1 1 4 1
5
-
8/14/2019 Unit3 Who Sept24
41/43
Exam3Review 18.01Fall2006
Lecture25: Exam3ReviewIntegration
1. Evaluatedefiniteintegrals. Substitution,firstfundamentaltheoremofcalculus(FTC1),(andhints?)
2. FTC2: d x
f(t)dt=f(t)dx a
xIfF(x) = f(t)dt,findthegraphofF,estimateF,andchangevariables.
a3. Riemannsums;trapezoidalandSimpsonsrules.4. Areas,volumes.5. Othercumulativesums: averagevalue,probability,work,etc.Therearetwotypesofvolumeproblems:
1. solidsofrevolution2. other(dobyslices)
Intheseproblems,therewillbesomethingyoucandrawin2D,tobeabletoseewhatsgoingoninthatoneplane.
Insolidofrevolutionproblems,thesolidisformedbyrevolutionaroundthex-axisorthey-axis.You willhavetodecidehowtochopupthe solid: into shellsordisks. Putanother way, youmustdecide whether to integrate withdx ordy. After making that choice, the rest of the procedure issystematicallydetermined. Forexample,considerashaperotatedaround they-axis.
Shells: heighty2y1,circumference2x,thicknessdx Disks(washers): areax2 (orx2
2x2),thicknessdy; integratedy.1Work
Work=Force DistanceWeneedtouseanintegraliftheforce isvariable.
1
-
8/14/2019 Unit3 Who Sept24
42/43
Exam3Review 18.01Fall2006
Example1: Pendulum. SeeFigure 1Considerapendulumof lengthL,withmassmatangle. Theverticalforceofgravityismg (g=gravitational
coefficient
on
Earths
surface)
L
mass m
mg
Figure1: Pendulum.In Figure 2, we find the component of gravitational force acting along the pendulums path
F =mgsin.
mg
Figure2: F=mgsin(forcetangenttopathofmotion).
2
-
8/14/2019 Unit3 Who Sept24
43/43
Exam3Review 18.01Fall2006
Is it possible to build a perpetual motion machine? Lets think abouta simple pendulum, andhowmuchworkgravityperformsinpullingthependulumfrom0 tothebottomofthependulumsarc.
NoticethatF varies. Thatswhywehavetouseanintegralforthisproblem.
0 0
W = (Force) (Distance)= (mgsin)(Ld)0 0
W =Lmgcos0 =Lmg(cos01)=mg[L(1cos0)]0
InFigure 3,weseethattheworkperformedbygravitymovingthependulumdownadistanceL(1cos) isthesameasifitwentstraightdown.
L
L(1-cos)
Figure3: Effectofgravityonapendulum.Inotherwords,theamountofworkrequireddependsonlyonhowfardownthependulumgoes.
Itdoesnt
matter
what
path
it
takes
to
get
there.
So,
theres
no
free
(energy)
lunch,
no
perpetual
motionmachine.