Question

11. Find a bound for the number of Bisection method iterations needed to achieve an approximation with accuracy 10-3 to the s

ONLY ANSWER IN MATLAB.

1 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Code:

acc = 1e-3;
x_l = 1;
x_u = 4;
xnew = x_u;
xold = x_l;
i = 1;
while(abs(xnew - xold) > acc)
x_m = (x_l + x_u) / 2;
fxl = fval(x_l);
fxu = fval(x_u);
fxm = fval(x_m);
xnew = x_m;
if(fxl * fxm < 0)
x_u = x_m;
xold = x_l;
else
x_l = x_m;
xold = x_u;
end
i = i + 1;
end
i

------------------------------------

output = 13

Add a comment
Know the answer?
Add Answer to:
ONLY ANSWER IN MATLAB. 11. Find a bound for the number of Bisection method iterations needed...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1) Use the bisection method to find the third approximation of 2 starting with the initial interval [1,2], and find the...

    1) Use the bisection method to find the third approximation of 2 starting with the initial interval [1,2], and find the corresponding absolute error. Also, compute the number of iterations needed to achieve an approximation accurate to within 10 Then, use the suitable one to compute the second approximation of the root using xo,and find an upper bound for the corresponding error. 1) Use the bisection method to find the third approximation of 2 starting with the initial interval [1,2],...

  • Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2...

    Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2 +3x−7 Calculate the accuracy of the solution to 1 × 10−10. Find the number of iterations required to achieve this accuracy. Compute the root of the equation with the bisection method. Your program should output the following lines: • Bisection Method: Method converged to root X after Y iterations with a relative error of Z.

  • please show answer in full with explanation, also show matlab 1. Consider the function f(x)2.753 +18r2 21 12 a) Plot...

    please show answer in full with explanation, also show matlab 1. Consider the function f(x)2.753 +18r2 21 12 a) Plot the graph of f(x) in MATLAB and find all the roots of the function f(x) graphically. Provide the code and the plot you obtained. b) Compute by hand the first root of the function with the bisection method, on the interval -1; 0) for a stopping criterion of 1% c) How many iterations on the interval -1, 0 are needed...

  • Iteration count on the bisection method: We learnt that the bisection method is a kind of...

    Iteration count on the bisection method: We learnt that the bisection method is a kind of bracketing method to estimate the roots of an equation. Each iteration involved reducing the interval in which the root lies. How many iterations, n, will be required to attain an accuracy of 10-a starting from an interval      [xl, xu] Write out a general formula for n in terms of a, xl, and xu. Use this formulae to estimate n for these specific cases: (a)...

  • (a) Draw the first two iterations of the Bisection method for finding the root of the...

    (a) Draw the first two iterations of the Bisection method for finding the root of the nonlinear function in the figure below. Mark the first as I, and the second as 12. f(x) X a b (b) Compute the Taylor series approximation, up to and including third order terms of sin(I) about 10 = x/2.

  • Q2. Use two iterations of the bisection method to find the root of f)10x2 +5 that...

    Q2. Use two iterations of the bisection method to find the root of f)10x2 +5 that lies in the interval (0.6, 0.8). Evaluate the approximate error for each iteration. (33 points)

  • 5. For each of the following functions, and the corresponding initial interval, tell whether Bisection method...

    5. For each of the following functions, and the corresponding initial interval, tell whether Bisection method can be applied to find a root in the interval, and if so, how many iterations are required to achieve the associated accuracy. Recall 10-G1 (b-a). (a) f(x) = sin(x), [-1, 1], E = 2-16 (b) f(x) = sn'(x), [-1, 1], € = 2-16 (c) f(z) = cos(x), [-1, 1], ε = 2-16 7. Show that Newton's method for finding the root of a...

  • please show steps Make the Newton and Bisection method algorithms output to a CSV file. It...

    please show steps Make the Newton and Bisection method algorithms output to a CSV file. It is okay for now if they each output to a separate CSV file and you manually combine them-if you're slick, make the algorithms do that for you Solve a2-4 z -6-exp(2 -1) 0. Use eps-10 as your tolerance. -3, b 2 for the Bisection Method and zo = 2 as your initial guess for the Newton Method. Use a a. Find the solution to...

  • this is numerical analysis QUESTION 1 (a) Apart from 1 = 0 the equation f(1) =...

    this is numerical analysis QUESTION 1 (a) Apart from 1 = 0 the equation f(1) = x2 - 4 sin r = 0 has another root in (1, 2.5). Perform three (10) iterations of the bisection method to approximate the root. State the accuracy of the root after the three iterations. (b) Perform three iterations of Newton's method for the function in (a) above, using x) = 1.5 as the initial (10) solution. Compare the error from the Newton's approximation...

  • QUESTION 1 = = (a) Apart from x = 0 the equation f(x) 22 – 4...

    QUESTION 1 = = (a) Apart from x = 0 the equation f(x) 22 – 4 sin r 0 has another root in (1, 2.5). Perform three iterations of the bisection method to approximate the root. State the accuracy of the root after the three iterations. (b) Perform three iterations of Newton's method for the function in (a) above, using x(0) = 1.5 as the initial solution. Compare the error from the Newton's approximation with that incurred for the same...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT