1. Homepage
  2. Programming
  3. Math128A Numerical Analysis - Final Project: Modified zero-in for root-finding

Math128A Numerical Analysis - Final Project: Modified zero-in for root-finding

Engage in a Conversation
UC BerkeleyMath128AMA128ANumerical AnalysisModified zero-in for root-findingRoot Finding

Final Project: Modified zero-in for root-finding CourseNana.COM

We would like to find a root of the equation f(x)=0, for xR CourseNana.COM

given an initial interval [a, b] with
f (a) · f (b) < 0. CourseNana.COM

with a combination of two methods CourseNana.COM

bisection method, for its reliability CourseNana.COM

inverse quadratic interpolation (IQI) method, for its higher order of convergence. CourseNana.COM

inverse quadratic interpolation (IQI) method CourseNana.COM

Given three pairs of points (x0, f0) , (x1, f1) , (x2, f2), IQI defines a quadratic polynomial in f that goes through these points, CourseNana.COM

x(f)= (f f1)(f f2) x0+(f f0)(f f2) x1+(f f0)(f f1) x2 (f0 f1) (f0 f2) (f1 f0) (f1 f2) (f2 f0) (f2 f1) CourseNana.COM

def CourseNana.COM

This leads to an estimate for the root x3 = x (0):
x3 = f1 f2 x0+ f0 f2 x1+ f0 f1 x2 CourseNana.COM

(f0 f1) (f0 f2) (f1 f0) (f1 f2) (f2 f0) (f2 f1) CourseNana.COM

Modified zero-in for root-finding in a sketch For given initial interval [a, b] with CourseNana.COM

f (a) · f (b) < 0. Wewouldliketofindarootoftheequation f(x)=0, for xR CourseNana.COM

Modified zero-in for root-finding in a sketch For given initial interval [a, b] with CourseNana.COM

f (a) · f (b) < 0. Wewouldliketofindarootoftheequation f(x)=0, for xR CourseNana.COM

def a+b 1.setx0,x1,x2=a,b,c= 2 CourseNana.COM

2. let x3 = IQI(x0, x1, x2) if x3 ̸∈ [a, b] CourseNana.COM

do bisection steps on [a, b]
set new interval [anew, bnew] [a, b] with CourseNana.COM

f (anew) · f (bnew) < 0, repeat step (1) CourseNana.COM

else if |f (x3)| has not decreased by a factor of 2 within 4 consecutive IQI iterations, CourseNana.COM

do bisection steps on [a, b]
set new interval [anew, bnew] [a, b] with CourseNana.COM

f (anew) · f (bnew) < 0, repeat step (1) CourseNana.COM

repeat IQI in step (2)
3. stop when iteration converged CourseNana.COM

More details! CourseNana.COM

1. function calls: when the function f (·) is called. There are three function calls in IQI formula CourseNana.COM

f0 = f(x0), f1 = f(x1), f2 = f(x2) CourseNana.COM

f1 f2
(f0 f1) (f0 f2) CourseNana.COM

f0 f2
(f1 f0) (f1 f2) CourseNana.COM

f0 f1
(f2 f0) (f2 f1) CourseNana.COM

There are eighteen function calls in IQI formula
f(x1)f(x2) f(x0)f(x2) f(x0)f(x1) CourseNana.COM

x3 = x0+ (f(x0) f(x1)) (f(x0) f(x2)) CourseNana.COM

(f(x1) f(x0)) (f(x1) f(x2)) CourseNana.COM

x1+ x2 (f(x2) f(x0)) (f(x2) f(x1)) CourseNana.COM

2. IQI with safety bracket:
letx0, x1 =a, b; x2 (a,b)withf(a)·f(b)<0 CourseNana.COM

letx3 =IQI(x0, x1, x2)(a,b)
iff(x0)·f(x2)<0,continueIQIwithx0,x2,x3. iff(x2)·f(x1)<0,continueIQIwithx1,x2,x3. CourseNana.COM

CourseNana.COM

Test functions CourseNana.COM

  • ▶  f(x)=xex 2x+1oninterval[0,3],withroot x = 0.671553094250269 CourseNana.COM

  • ▶  f(x)=xcos(x)2x2+3x1oninterval[1,3],withroot x = 1.256623322505569 CourseNana.COM

  • ▶  f(x)=x37x2+14x6oninterval[0,1],withroot x = 0.585786437626905 CourseNana.COM

  • ▶  f(x)=xcos(x)oninterval[0,1],withroot x = 0.641714370872883 CourseNana.COM

  • ▶  f(x)=2xcos(2x)(x+1)2 oninterval[2,4],withroot x = 2.191308011797247 CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
UC Berkeley代写,Math128A代写,MA128A代写,Numerical Analysis代写,Modified zero-in for root-finding代写,Root Finding代写,UC Berkeley代编,Math128A代编,MA128A代编,Numerical Analysis代编,Modified zero-in for root-finding代编,Root Finding代编,UC Berkeley代考,Math128A代考,MA128A代考,Numerical Analysis代考,Modified zero-in for root-finding代考,Root Finding代考,UC Berkeleyhelp,Math128Ahelp,MA128Ahelp,Numerical Analysishelp,Modified zero-in for root-findinghelp,Root Findinghelp,UC Berkeley作业代写,Math128A作业代写,MA128A作业代写,Numerical Analysis作业代写,Modified zero-in for root-finding作业代写,Root Finding作业代写,UC Berkeley编程代写,Math128A编程代写,MA128A编程代写,Numerical Analysis编程代写,Modified zero-in for root-finding编程代写,Root Finding编程代写,UC Berkeleyprogramming help,Math128Aprogramming help,MA128Aprogramming help,Numerical Analysisprogramming help,Modified zero-in for root-findingprogramming help,Root Findingprogramming help,UC Berkeleyassignment help,Math128Aassignment help,MA128Aassignment help,Numerical Analysisassignment help,Modified zero-in for root-findingassignment help,Root Findingassignment help,UC Berkeleysolution,Math128Asolution,MA128Asolution,Numerical Analysissolution,Modified zero-in for root-findingsolution,Root Findingsolution,