You are on page 1of 4

11/7/2016

NewtonRaphsonMethod

NewtonRaphsonMethod

HOME
CourseChapters
Calculator
Fundamentals

Ifyou'veevertriedtofindarootofacomplicatedfunctionalgebraically,youmay
havehadsomedifficulty.Usingsomebasicconceptsofcalculus,wehavewaysof
numericallyevaluatingrootsofcomplicatedfunctions.Commonly,weusethe
NewtonRaphsonmethod.Thisiterativeprocessfollowsasetguidelineto
approximateoneroot,consideringthefunction,itsderivative,andaninitialx
value.
Youmayrememberfromalgebrathatarootofafunctionisazeroofthefunction.
Thismeansthatatthe"root"thefunctionequalszero.Wecanfindtheserootsofa
simplefunctionsuchas:f(x)=x24simplybysettingthefunctiontozero,and
solving:

Mathematics
Review
Numbersand
their
Properties
Numbersin
Science
Ratiosand
Proportions
Units,
Dimensions
and
Conversions
Percents
Simple
Statistics
Logarithms
BasicConcepts
Advanced
Concepts

f(x)=x24=0
(x+2)(x2)=0
x=2orx=2
TheNewtonRaphsonmethodusesaniterativeprocesstoapproachonerootofa
function.Thespecificrootthattheprocesslocatesdependsontheinitial,arbitrarily
chosenxvalue.

Here,xnisthecurrentknownxvalue,f(xn)representsthevalueofthefunctionat
xn,andf'(xn)isthederivative(slope)atxn.xn+1representsthenextxvaluethat
youaretryingtofind.Essentially,f'(x),thederivativerepresentsf(x)/dx(dx=
deltax).Therefore,thetermf(x)/f'(x)representsavalueofdx.

Themoreiterationsthatarerun,thecloserdxwillbetozero(0).Toseehowthis
works,wewillperformtheNewtonRaphsonmethodonthefunctionthatwe
investigatedearlier,f(x)=x24.Belowarelistedthevaluesthatweneedtoknowin
ordertocompletetheprocess.

SectionTests
Pretest
Posttest

Theoretically,wecouldexecuteaninfinitenumberofiterationstofindaperfect
representationfortherootofourfunction.However,thisisanumericalmethodthat
UsefulMaterials weusetolessentheburdenoffindingtheroot,sowedonotwanttodothis.
Thereforewewillassumethattheprocesshasworkedaccuratelywhenourdeltax
Glossary
becomeslessthan0.1.Thisvalueofprecisionshouldbespecifictoeachsituation.
Amuchmore,oramuchless,precisevaluemaybeappropriatewhenusingthe
https://www.shodor.org/UNChem/math/newton/

1/4

11/7/2016

NewtonRaphsonMethod

Online
Calculators

NewtonRaphsonmethodinclass.Thetablebelowshowstheexecutionofthe
process.

RedoxCalculator
KineticsArrhenius
Calculator

xn

f(xn)

f'(xn)

xn+1

dx

x0=6

f(x0=32)

f'(x0=12)

x1=3.33

1 x1=3.33 f(x1)=7.09 f'(x1)=6.66 x2=2.27 dx=1.06

Thermodynamics
Calculator

2 x2=2.27 f(x2)=1.15 f'(x2)=4.54 x3=2.01 dx=.26

NuclearDecay
Calculator

3 x3=2.01 f(x3)=0.04 f'(x3)=4.02 x4=2.00 dx=0.01

Thus,usinganinitialxvalueofsix(6)wefindonerootoftheequationf(x)=x24
LinearLeast
isx=2.Ifweweretopickadifferentinitalxvalue,wemayfindthesameroot,or
SquaresRegression wemayfindtheotherone,x=2.
Newton'sMethod
EquationSolver
Compressibility
Calculator
UnitsConversion
Calculator
Nomenclature
Calculator

Agraphicalrepresentationcanalsobeveryhelpful.Below,youseethesame
functionf(x)=x24(showninblue).Theprocesshereisthesameasabove.Inthe
firstiteration,theredlineistangenttothecurveatx0.Theslopeofthetangentis
thederivativeatthepointoftangency,andforthefirstiterationisequalto12.
Dividingthevalueofthefunctionattheinitialx(f(6)=32)bytheslopeofthe
tangent(12),wefindthatthedeltaxisequalto2.67.Subtractingthisfromsix(6)
wefindthatthenewxvalueisequalto3.33.Anotherwayofconsideringthisisto
findtherootofthistangentline.Thenewxvalue(xn+1)willbeequaltotherootof
thetangenttothefunctionatthecurrentxvalue(xn).

Related
InformationLinks
TexasInstruments
Calculators
CasioCalculators
SharpCalculators
HewlettPackard
Calculators
Credits
Credits
ContactWebmaster

TheNewtonRaphsonmethoddoesnotalwayswork,however.Itrunsinto
https://www.shodor.org/UNChem/math/newton/

2/4

11/7/2016

NewtonRaphsonMethod

problemsinseveralplaces.First,considertheaboveexample.Whatwouldhappen
ifwechoseaninitialxvalueofx=0?Wewouldhavea"divisionbyzero"error,
andwouldnotbeabletoproceed.Youmayalsoconsideroperatingtheprocesson
thefunctionf(x)=x1/3,usinganinitalxvalueofx=1.Dothexvaluesconverge?
Doesthedeltaxdecreasetowardzero(0)?
So,howdoesthisrelatetochemistry?ConsiderthevanderWaalsequationfound
intheGasLawssectionofthistext.Assumingthatwehaveasetnumberofmoles
ofasetgas,notunderidealconditions,wecanusetheNewtonRaphsonmethodto
solveforoneofthethreevariables(temperature,pressure,orvolume),basedonthe
othertwo.Todothis,weneedtousethevanderWaalsequation,andthederivative
ofthisequation,bothseenbelow.

Asyoucansee,theVanderWaalsequationisquitecomplex.Itisnotpossibleto
solveitalgebraically,soanumericalmethodmustbeused.TheNewtonRaphson
Methodistheeasiestandmostdependablewaytosolveequationslikethis,even
thoughtheequationanditsderivativeseemquiteintimidating.
Dependingontheconditionsunderwhichyouareattemptingtosolvethisequation,
severalofthevariablesmaybechanging.So,itmaybenecessarytousepartial
derivatives.Forthepurposesofthisexample,weareassumingthatpressure,
temperature,andvolumearetheonlythingschanging,andthatthesevaluesareall
functionsoftime.Thisavoidstheuseofapartialderivativewesimply
differentiateallvariableswithrespecttotime,asshownabove.Somealgebraic
manipulationoftheequationand/oritsderivativemaybeneededdependingonthe
specificproblemtobesolved.Itisassumedthatallofthevariablesbutoneare
specifiedthatvariableisusedintheexpressionfor"xn+1"thatNewton'smethod
uses.PerformingNewton'smethodonthisequationsuccessfullywouldgiveavalue
ofthatvariablewhichgivesasolutionwhentheothervariablesareheldconstantat
thevaluesyouspecified.
Newton'sMethodEquationSolver:AnOnlineInteractiveTool
[MathematicsIndex[BasicMatrixMath][LinearLeastSquares][Newton's
Method][IntegrationTechniques]
Developedby
Shodor
incooperationwiththeDepartmentofChemistry,
TheUniversityofNorthCarolinaatChapelHill
https://www.shodor.org/UNChem/math/newton/

3/4

11/7/2016

NewtonRaphsonMethod

Copyright19962008Shodor
Pleasedirectquestionsandcommentsaboutthispageto
WebMaster@shodor.org

https://www.shodor.org/UNChem/math/newton/

4/4

You might also like