Question: A hybrid root - finding method. Write a python code implementing the following hybrid method to evaluate numerically roots of a function f ( x

A hybrid root-finding method. Write a python code implementing the following "hybrid" method to evaluate numerically roots of a function f(x)
:
Set a tolerance \epsi
and start with an initial interval [x0,x1]
that contains a root of f(x)
(how to grant the presence of a root in the interval?);
Apply a step of the secant method to f(x)
using as points x0
and x1
and denote the number obtained by c
.
If c
is inside [x0,x1]
, set x2=c
; otherwise set x2=(x0+x1)/2
.
Repeat the steps above until the tolerance is reached.
Test the method evaluating the root of x2=2
with an accuracy \epsi =1013
.
Comparing methods. Find the root of sinx=0.5625
with an accuracy \epsi =1012
using the following methods: bisection, secant, Newton and the hybrid method above. In case of the bisection and hybrid methods, start from the interval [0,\pi /2]
. In case of the secant and bisection methods, start from the point 0
. For each method, print the number of steps that were needed to get the desired precision.
Conditioning. Find the root of the polynomial p(x)=x58x4+25.6x340.96x2+32.768x10.48576
between 0 and 3 using Newton's method. Assume that, in the range [0,3]
, p(x)
is known with an accuracy of \Delta p1012
and evaluate the absolute error on the numerical value of the root due to the conditioning of p(x)
at that value.
Remark: feel free to re-use any code or part of code from the textbook.A hybrid root-finding method. Write a python code implementing the following "hybrid"
method to evaluate numerically roots of a function f(x) :
Set a tolerance and start with an initial interval x0,x1 that contains a root of f(x)(how
to grant the presence of a root in the interval?);
Apply a step of the secant method to f(x) using as points x0 and x1 and denote the
number obtained by c.
If c is inside x0,x1, set x2=c; otherwise set x2=x0+x12.
Repeat the steps above until the tolerance is reached.
Test the method evaluating the root of x2=2 with an accuracy =10-13.
Comparing methods. Find the root of sinx=0.5625 with an accuracy =10-12 using the
following methods: bisection, secant, Newton and the hybrid method above. In case of the
bisection and hybrid methods, start from the interval 0,2. In case of the secant and
bisection methods, start from the point 0. For each method, print the number of steps that were
needed to get the desired precision.
Conditioning. Find the root of the polynomial
p(x)=x5-8x4+25.6x3-40.96x2+32.768x-10.48576 between 0 and 3 using Newton's
method. Assume that, in the range [0,3],p(x) is known with an accuracy of p10-12 and
evaluate the absolute error on the numerical value of the root due to the conditioning of p(x) at
that value.
 A hybrid root-finding method. Write a python code implementing the following

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!