Question

In: Advanced Math

1. The equation 8?2 − 3?? = 0 has three roots. Find: (i) The first root,...

1. The equation 8?2 − 3?? = 0 has three roots. Find:

(i) The first root, which is between -1 and 0, by the bisection method;

(ii) The second root, which is between 1 and 2, by Newton’s method;

(iii) The third root, which is between 3 and 4, by both the bisection method and Newton’s method.

All the answers should be correct to 2 decimal places.

Solutions

Expert Solution

MATLAB Script:

close all
clear
clc

f = @(x) 8*x^2 - 3*exp(x); % f(x)
tol = 0.01; % 2 decimal place accuracy

fprintf('Part (i)\n-------------------------------------\n')
a = -1; b = 0;
x = bisection(f,a,b,tol);
fprintf('Solution (Using Bisection Method): %.2f\n', x)

fprintf('\nPart (ii)\n-------------------------------------\n')
x0 = 1.5;
df = @(x) 16*x - 3*exp(x); % f'(x)
x = newton(f,df,x0,tol);
fprintf('Solution (Using Newton''s Method): %.2f\n', x)

fprintf('\nPart (iii)\n-------------------------------------\n')
a = 3; b = 4;
x = bisection(f,a,b,tol);
fprintf('Solution (Using Bisection Method): %.2f\n', x)

x0 = 3.5;
x = newton(f,df,x0,tol);
fprintf('Solution (Using Newton''s Method): %.2f\n', x)

function p = bisection(f, a, b, tol)
p = nan;
if f(a)*f(b) > 0
fprintf('Error:\tf(a) and f(b) have the same sign.\n')
fprintf('\t\tHence, f(x) does not contain a root in the given interval.\n')
else
p = a;
while true
p_h = p;
p = (a + b)/2; % Bisection method's root update
if abs(p - p_h) < tol % Termination condition
break
end
if f(a)*f(p) < 0 % Changing the interval
b = p;
else
a = p;
end
end
end
end

function x = newton(f,df,x0,tol)
x = x0;
while true
x_ = x; % Previous approximate root
x = x - f(x)/df(x);
if abs(x_ - x) < tol % Termination condition
break;
end
end
end

Output:

Part (i)
-------------------------------------
Solution (Using Bisection Method): -0.48

Part (ii)
-------------------------------------
Solution (Using Newton's Method): 1.02

Part (iii)
-------------------------------------
Solution (Using Bisection Method): 3.46
Solution (Using Newton's Method): 3.47


Related Solutions

Use Newton-Raphson to find the real root to five significant figures 64x^3+6x^2+12-1=0. First graph this equation...
Use Newton-Raphson to find the real root to five significant figures 64x^3+6x^2+12-1=0. First graph this equation to estimate. Use the estimate for Newton-Raphson
1). Consider the quadratic equation x^2+ 100 x + 1 = 0 (i) Compute approximate roots...
1). Consider the quadratic equation x^2+ 100 x + 1 = 0 (i) Compute approximate roots by solving x^2 -100 x = 0 (ii) Use the quadratic formula to compute the roots of equation (iii) Repeat the computation of the roots but use 3 digit precision. (iv) Compute the relative absolute errors in the two 3 digit precision root approximations in (iii). (v) With x1 =1/2a (-b + sqrt b^2 - 4ac and x2 = 1/2a (-b + sqrt b^2...
1).Find an equation for the conic that satisfies the given conditions. ellipse,    foci (0, −3), (8, −3),...
1).Find an equation for the conic that satisfies the given conditions. ellipse,    foci (0, −3), (8, −3),     vertex (9, −3)
Find all roots of the equation z^5=i, i.e. find the five values of i^1/5 and show...
Find all roots of the equation z^5=i, i.e. find the five values of i^1/5 and show them on an Argand diagram. Show all working
Degree 5. Roots of multiplicity 2 at x = −3 and x = 2 and a root of multiplicity 1 at x=−2. y-intercept at (0, 4). For the above exercises, use the given information about the polynomial graph to write the equation.
Degree 5. Roots of multiplicity 2 at x = −3 and x = 2 and a root of multiplicity 1 at x=−2. y-intercept at (0, 4).  For the above exercises, use the given information about the polynomial graph to write the equation.
Find the value of k for which the equation 3x2+2x+k=0 has distinct and real root.
Find the value of k for which the equation 3x2+2x+k=0 has distinct and real root.
Degree 5. Roots of multiplicity 2 at x = 3 and x = 1, and a root of multiplicity 1 at x = −3. y-intercept at (0, 9). For the following exercises, use the given information...
For the following exercises, use the given information about the polynomial graph to write the equation.Degree 5. Roots of multiplicity 2 at x = 3 and x = 1, and a root of multiplicity 1 at x = −3. y-intercept at (0, 9)
A= 1 2 4 0 1 -2 -1 0 1 2 0 3 8 1 4...
A= 1 2 4 0 1 -2 -1 0 1 2 0 3 8 1 4 . Let W denote the row space for A. (a) Find an orthonormal basis for W and for W⊥. (b) Compute projW⊥(1 1 1 1 1 ).
Find 8 decimal place approximation for all three solutions of the function x^3-4x+1 Use -2, 0,...
Find 8 decimal place approximation for all three solutions of the function x^3-4x+1 Use -2, 0, and 2 as first guesses, organizing data values in side-by-side columns.
show that the equation 2x+2 cos x+5=0 has exactlly one real root
show that the equation 2x+2 cos x+5=0 has exactlly one real root
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT