Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a function to determine the left-most root of the following equation using the Bisection Method: f(x)=x2+10 The input would be in the sequence, a,

Create a function to determine the left-most root of the following equation using the Bisection Method:

f(x)=x2+10

The input would be in the sequence, a, b, and error. Name the function "bisection_method(a, b, error)". The "a" is the lower bound, the "b" is the upper bound, and the "error" is the tolerance level. If there is no root then the display would be "no root".

Note: Do not call the function at the end of the script. The function should only output one value; suppress all other outputs.

The code should have this:

Test

a = 0;

b = 5;

error = 0.01;

disp(bisection_method(a,b,error))

expected answer = 3.1543

test

a = -5;

b = 0;

error = 0.01;

disp(bisection_method(a,b,error))

expected answer = -3.1543

test

a = 0;

b = 5;

error = 0.0001;

disp(bisection_method(a,b,error))

expected answer = 3.16231

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_2

Step: 3

blur-text-image_3

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago