Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bisection Method Write a MATLAB function that implements the bisection algorithm for obtaining the roots of a given function f(x). Use this function to find

Bisection Method

Write a MATLAB function that implements the bisection algorithm for obtaining the roots of a given function f(x). Use this function to find the smallest positive root of the equation f(x) = 0 where

f(x) = tan(pi*x) - x - 6

Plot f(x). By visual observation of the appropriate plot, explain why the interval [0.4,0.48] is a

good choice for the first bracketing interval in the iterative procedure of the bisection method.

Given your initial interval, first write out explicitly on paper all detail describing your first iteration. Indicate how you choose the bracketing interval for the 2nd iteration and estimate your approximate relative error.

Run your program and have it list the number of iteration, values of the endpoints and the midpoint (xl(k), xu(k), and xr(k)) in the notation used in the textbook), the estimated approximate

relative error, and the value of f(xr(k) for each iteration k. List those values from the second iteration onward. Run until your approximate relative error drops below a tolerance of 10-5 (*) .

How many function evaluations did you have to perform to reach this particular tolerance ? NOTE: The actual code to solve this problem can be found very easily ! Dont reinvent the wheel !

(*) This is NOT a percent relative error.

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions