linear approximaon and newton’s methodkeshet/m102/lect2017_4.2.pdf · 2017. 9. 29. · 1. the...
TRANSCRIPT
Tangentlines,cont’d
Linearapproxima5onandNewton’sMethod
Last5me:
A“challenging”tangentlineproblem,becausewehadtofigureoutthepointoftangency.
ground
??(A)Igetit!(B) IthinkIseehowwedidit(C) I’mnotsure(D) I’mconfused(E) I’mtotallylost
Last5me:
A“challenging”tangentlineproblem,becausewehadtofigureoutthepointoftangency.
ground
??(A)Igetit!(B) IthinkIseehowwedidit(C) I’mnotsure(D) I’mconfused(E) I’mtotallylost
SeeSec5on5.6,Try
problem5.10
Last5me
“Uselinearapproxima5ontocalculate105”Solu5on:- figureoutthefunc5on- Figureoutapointnearbywhereweknowthevalueofthefunc5on
- Uselinearapproxima5on
Last5me
“Uselinearapproxima5ontocalculate105”Solu5on:- figureoutthefunc5onf(x)=x- Figureoutapointnearbywhereweknowthevalueofthefunc5on.Weknow100=10
- Uselinearapproxima5on
Geometry:
“S5ckatangentline”onthefunc5onatx0=100,readthevalueonTLnearby(atx=105).
x0
LinearApprox:
-Advantage:easytocalculate:==10+(5/20)=10.25
- Onestepmethod
- Disadvantage:notveryaccuratefurtheraway
Anotherway(Newton’smethod)
Converttheproblemtotheformf(x)=0Useintui5onordesmostogetaroughes5mateforthezeroofthefunc5on.UseNewton’smethodtogetbe_erandbe_erapproxima5on.Disadv:Needsomeintui5onAdvantage:Outstandinglevelofaccuracy!
1.Converttorightform
Finddecimalapproxtox=105.TouseNewton’smethodIwouldconvertthistosolvingtheproblemf(x)=0whereA. f(x)=x2-105B. f(x)=x-105C. f(x)=x-10.5D. f(x)=105
Converttorightform
Finddecimalapproxtox=105.- Sameas:findxsuchthatx2=105x2-105=0- Nowtheproblemisintheformf(x)=0
forf(x)=x2-105
2.My“ini5alguess”forthezerooff(x)=x2-105wouldbe
A.x0=100B. x0=10C. x0=105D. x0=105E. I’mlost.
Ini5alguess
Findvalueofxsomewherearoundzerooff(x)=x2-105Thatwillbethestar5ngvalueforNewton’smethod.x0=10
Newton’sMethod
Awaytofinddecimalapproxima5onforthezeroofafunc5on
UBCMath102
Plan
• WhatisNewton’sMethod• Thegeometrybehindit• Aprac5calexamplewhereweneedtouseit• HowtouseaspreadsheettoimplementNewton’sMethod.
UBCMath102
WhatisNewton’sMethod?
UBCMath102
Newton’smethod
Solvef(x)=0
(3)WhichoftheseisproblemsisnotsuitableforNewton’smethod?
• (A)Solvef(x)=0forx.• (B)Findthezerosofafunc5onf(x).• (C)Findwherethegraphoff(x)crossesthexaxis.
• (D)Approximatethevalueofafunc5onclosetoaknownpointx0.
• (E)Findrootsofanequa5ong(x)=C.
UBCMath102
Newton’smethodcanbeusedto
• (A)Solvef(x)=0forx.• (B)Findthezerosofafunc5onf(x).• (C)Findwherethegraphoff(x)crossesthexaxis.
(E)ItcanalsofindrootsofF(x)=g(x)-C=0
UBCMath102
Hammerandnail
UBCMath102
Newton’smethod
Solvef(x)=0
UBCMath102
Thegeometrybehindit
Tangentline
• Equa5onoftangentlineatx0:
• Findthepointx1atwhichthetangentlineintersectsthexaxis.
UBCMath102
(4)Thetangentlineintersectsthexaxisat:
UBCMath102
DerivingNewton’sFormula
• EqnofTL:• TLintersectsxaxiswhen
Improvingtheroughes5mate..
• Repeattheprocess:
• Atthek’thstep:
Putitonaspreadsheet!
Letthespreadsheetdothoserepe55vecalcula5onsforyou!Goal:finddecimalapproxtosquarerootof105accurateto10decimalplaces!
Spreadsheetsetup
• Thefunc5onisf(x)=x2-105• Weneeditsderiva5vef’(x)=2x• Ini5alguessx0=10
• Formulatorepeat:
• x1=x0–f(x0)/f’(x0)
Spreadsheet
• Thenextfewslidesshowhowtosolvethisproblemonaspreadsheet.
Setup
•
Transferx1toColumnA
•
Highlightthecellsanddragdown
Itshouldlooklike:
Dragdowntheen5rerowtorepeat
•
PartII:Lookingatallthisgeometrically
Recap
• Letuslookagainatlinearapproxima5onandatNewton’smethod
• Wewillusedesmosandthefunc5on
Toillustrateconcepts.
PART1
• Ademooflinearapproxima5on
UBCMath102
Desmos
Graphthefunc5on:Usedesmostographitsderiva5ve
Itshouldlooklike:
•
UBCMath102
Desmoscont’d
Addthevaluex0=5Aslidershouldappearforx0soyoucanshiftheloca5onofthattangentline.Addthepoint(x0,f(x0))toyourgraph.
UBCMath102
Itshouldlooklike:
•
UBCMath102
Desmoscont’d
Addtheequa5onofagenerictangentlineatx=x0Youshouldbeableto“animate”x0andseethatlinesweepacrossyourcurve.
UBCMath102
Itshouldlooklike:
•
UBCMath102
UsingDesmos
Considerthetangentlineatxo=5.Useyourgraphtofindthevaluesbelow:f(5),f(6)andthelinearapproxtof(6)basedatxo=5
UBCMath102
(5)UsingDesmos
Igotthevalues.f(5),f(6)andthelinearapproxtof(6)(A)4.37,4,5(B)4.37,5,2(C)4.37,2,2.5(D)huh??
UBCMath102
PART2
• AdemoofNewton’sMethodonDesmos
UBCMath102
Ondesmos
UseNewton’sMethodtofindthelargestzeroofthefunc5onStartwithroughini5alguessx0=5.
UBCMath102
Tangentlineatx0=5
• TLandf(x)
UBCMath102
Newton’sformula
• Addtheformula
• Plotthepoint
Looklikethis:(hereisx1)
•
Actualzeroofthefunc5on–wewanttofindanaccuratedecimalexpansionforit
Desmosdoesthework
WegotDesmostocomputex1usingtheNewton’sMethodformula:• (Wegotthisbyfindingwhereagenerictangentlinecrossesthexaxis,seepreviouslectures)
Repeattheprocess
Togetclosertothezerooff:• Constructatangentlineatthepointx1• Findthepointwherethenewtangentlineintersectsxaxis(Findx2).
h_ps://www.desmos.com/calculator/1bcshd1qot
UBCMath102
Weusethesameideatofindx2:
•
UBCMath102
ToNo5ce:
• Wearegejngclosertotheactualzeroofthefunc5on.
UBCMath102X0x2x1
Effectofini5alguess
Gotothesliderforx0andshifittothevalue3.Whathappenstothetangentlines?Whathappenstotheapproxima5onforthezeroofthefunc5on?
UBCMath102
Badini5alguess!
• Anini5alguessx0=2.3leadsastray!Doesnotconvergetothezerooff!Seebelow:
UBCMath102
Importantcomments:
1. TheDesmosdemonstra5onisonlytoshowtheGEOMETRYthatexplainshowNewton’sMethodworks.Youdonotneedthis(elaborate)construc5oninaprac5calproblem.
2. HowdoIfindanini5alguess?ßUseDesmos,orsketchthefunc5on.Ensurethereisnomax/minbetweenx0andthetruezero..Wewillseehowtosketchfunc5onsinfuturelectures.
UBCMath102
Answers
• 1.A• 2.B• 3.D• 4.A• 5.C
Solu5onstopreviousproblemsFirsttryouttheproblemsattheendofthelastlectureslides.Onlythenshouldyou“peek”attheanswers.
Differen5ate,usingpowerorquo5entrule
solu5on
Calcula5onwedidinclass
Findtheequa5onofthetangentlinetothegraphofatx=0.Wheredoesthetangentlineintersectthexaxis?
solu5on
Solu5on:(a)Eqnoftangentline
Relatedtestques5on(MT1,2014)(Tangentlines)
Considerthefunc5on(a) Atwhichpoints(a,f(a))doesthegraphofthis
func5onhavetangentlinesparalleltotheliney=−x.
(b) Whatistheequa5onofthetangentlinesateachofthesepoints.
solu5on
Solu5on:
(a)
UBCMath102
Solu5on
(b)
UBCMath102
Solu5ontoRelatedtest-typeproblemfromlast5me:
Findalinearapproxima5onthatprovidesaroughes5mateforthevalueof(1.1)8.Explainwhytheapproxima5onisan(over/under)-es5mate.
• (Note:acalculatorvalueis2.1435)
UBCMath102
solu5on
Testques5on(Quo5entrule,ra5onalfunc5ons)MT12014
Atanall-you-can-eatbuffet,thetotalcaloriesyougaincanberepresentedbythefunc5onwheret≥0isthe5meinminutesyouspendattherestaurantandAandbareposi5veconstants.• (a)Ifyoustayedforalong5me,whatasymptotewouldyourtotalcaloricgainapproach?
• (b)Aferhowmuch5medoyougainexactlyhalfofthatasympto5ccaloricamount?
• (c)At5met,whatistheinstantaneousrateatwhichyourcaloricgainchanges? solu5on
Solu5on:
(a)(b)(c)
UBCMath102
Testyourskillontheseproblems
LinearApproxima5on
Findalinearapproxima5onthatprovidesaroughes5mateforthevalueof(1.1)8.Explainwhytheapproxima5onisan(over/under)-es5mate.
UBCMath102
FindthepreydensitysuchthatP(x)=G(x)
Note:thisproblemissimilartotheaphid–ladybugproblemfromweek1butthefunc5onP(x)isnotthesame.
UBCMath102
Newton’sMethod