Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

1. Eat lunch with a different group of students every day.

Answered: 1 week ago