Question
using matlab code please

5.2 Determine the real root of f(x) = 5x? - 5x2 + 6x-2: a. Graphically. b. Using bisection to locate the root. Employ initial
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;
clear all;


f=@(x)5*x^3-5*x^2+6*x-2; %function


disp('Root on interval [0 1]')
a=0;b=1; % interval


eps_step = 10/100;
n=1;
X(1)=a; %initial root;
err=1;
while (err>= eps_step && n~=100 )
  
c = (a + b)/2;
if ( f(c) == 0 )
break;
elseif ( f(a)*f(c) < 0 )
b = c;
else
a = c;
end
X(n+1)=c;
  
err=abs((X(n+1)-X(n))/X(n+1));

n=n+1;
end


disp('Solution by bisction method')
c
disp('Number of iteration')
n-1
disp('Realtive error')
err

%%%%%%%%%%%%%%%%%%%%%%%%%

Root on interval [0 1]
Solution by bisction method

c =

0.4063

Number of iteration

ans =

5

Realtive error

err =

0.0769

>>

Add a comment
Know the answer?
Add Answer to:
using matlab code please 5.2 Determine the real root of f(x) = 5x? - 5x2 +...
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
  • Need solution for question 5.6 using python? tation to within e, 5.11 Determine the real root...

    Need solution for question 5.6 using python? tation to within e, 5.11 Determine the real root of x 80: (a) analytically and (b) with the false-position method to within e, = 2.5%. Use initial guesses of 2.0 and 5.0. Compute the estimated error Ea and the true error after each 1.0% teration 5.2 Determine the real root of (x) 5r - 5x2 + 6r -2 (a) Graphically (b) Using bisection to locate the root. Employ initial guesses of 5.12 Given...

  • Numerical methods. Need help please 2. Determine the real rot of f(x)--26+85x-91x+44x -8xx a. Graphically. b....

    Numerical methods. Need help please 2. Determine the real rot of f(x)--26+85x-91x+44x -8xx a. Graphically. b. Using bisection method. Employ initial guesses of x-O and xu 1 and iterate until the approximate error falls below 10%. Perform the same computation using false-position method. Iterate until the approximate error falls below 0.2%. c.

  • L. Determine the real root(s) off(x)--5xs + 14x3 + 20x2 + 10x a. Graphically on a graph paper. b....

    l. Determine the real root(s) off(x)--5xs + 14x3 + 20x2 + 10x a. Graphically on a graph paper. b. Using Bisection method c. Using False Position method to determine the root, employing initial guesses of x-2 d. Using the Newton Raphson methods to determine the root, employing initial guess to determine the root, employing initial guesses ofxn-2 and Xu-4 and Es= 18%. and r 5.0 andas answer. 1%. was this method the best for these initial guesses? Explain your xo--l...

  • 6.5 Employ the Newton-Raphson method to determine a real root for 4x20.5 using initial guesses of...

    6.5 Employ the Newton-Raphson method to determine a real root for 4x20.5 using initial guesses of (a) 4.52 f(x) 15.5x Pick the best numerical technique, justify your choice and then use that technique to determine the root. Note that it is known that for positive initial guesses, all techniques except fixed-point iteration will eventually converge. Perform iterations until the approximate relative error falls below 2 %. If you use a bracket- ing method, use initial guesses of x 0 and...

  • (la) Determine the root of the x – ez* + 5 = 0 using the Newton-Raphson...

    (la) Determine the root of the x – ez* + 5 = 0 using the Newton-Raphson method with equation initial guess of xo = 1. Perform the computation until the percentage error is less than 0.03%. (1b) Employ bisection method to determine the root of the f(x)=x* – 3x + 7 =0) using equation two initial guesses of x; =-2.1 and x;, =-1.8 . Perform three iterations and calculate the approximate relative error for the third iteration. What is the...

  • 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.

  • Letermine the real root of f(x)= - 8x + 56x4x-7 a) Grophically to determine the root...

    Letermine the real root of f(x)= - 8x + 56x4x-7 a) Grophically to determine the root to b) using bsection &a=2%. Employ initial guesses of and xu = 8 xe=3 c) using the false-position method to determine the root to a 25% . Employ the some intials as in (b).

  • a step by step walkthrough of your methods would be appreciated *since the provided answer is...

    a step by step walkthrough of your methods would be appreciated *since the provided answer is wrong can you instead solve for the correct one?* 5. Determine the real root of of f (x) = 3x - 4x2 +5x-3 ** using the bisection method. Employ initial guesses of x= 0 and Xu = 1 and iterate until the relative error Ea S 30%. Solution Step 1: x=0.5; f(x) = -1.125; Step 2: x = 0.75; f(x) = -0.2344; and &=...

  • Please solve in MATLAB and provide screenshots of the code and a copy of the code....

    Please solve in MATLAB and provide screenshots of the code and a copy of the code. DO PART B ONLY. Chapter 5, Problem 16P 12 Bookmarks Show all steps: OFF Problem Water is flowing in a trapezoidal channel at a rate of Q= 20 m3/s. The critical depth y for such a channel must satisfy the equation 0 = 1-2B - ZA? where g=9.81 m/s2, Ac = the cross-sectional area (m2), and B = the width of the channel at...

  • Problem 2 Determine the real roots of f(x)=-25 +82.x - 90x2 +44x-8x +0.7.x a) Graphically b)...

    Problem 2 Determine the real roots of f(x)=-25 +82.x - 90x2 +44x-8x +0.7.x a) Graphically b) Using bisection method to determine root (0.5, 1.0) 6 = 0.1 c) False position method, Use initial guesses of x=0.5 and x. -1.0 Compute the estimated errore, with stopping criteria 1%

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