Question

In: Advanced Math

Numerical Analysis: Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0....

Numerical Analysis:

Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0. Explain how the algorithm works.

Please show table with all values, not just the final root value.

Solutions

Expert Solution


%Matlab code for muller method for finding root
clear all
close all

%function for which root have to find
f=@(x) 600.*x.^4-550.*x.^3+200.*x.^2-20.*x-1;

%three initial guess for x
x0=0;
x1=0.1;
x2=1.0;
%error value for initiation of while loop
error=10;
%displaying the function
fprintf('The function is f(x)=')
disp(f)
%printing result after each iterations
fprintf('Printing result after each iterations\n')
fprintf('\titer,\tf(x0),\tf(x1),\tf(x2),\ta,\tb,\tc,\tx3,\terror\n\n')
cnt=0;
%Loop for Muller's method
while error>=10^-5
    %function value corresponds to initial guess
    f0=f(x0);
    f1=f(x1);
    f2=f(x2);
    cnt=cnt+1;
    %all other terms for Muller method
    h0=x1-x0;
    h1=x2-x1;
  
    del0=(f(x1)-f(x0))/h0;
    del1=(f(x2)-f(x1))/h1;
  
    a=(del1-del0)/(h1+h0);
    b=a*h1+del1;
    c=f(x2);
  
    x31=x2+((-2*c)/(b+sqrt(b*b-4*a*c)));
    x32=x2+((-2*c)/(b-sqrt(b*b-4*a*c)));
  
    %checking root closer to zero
    if abs(f(x31))>=abs(f(x32))
        x3=x32;
    else
        x3=x31;
    end
    %percentage error after each iterations
    error=(abs((x3-x2)/x3))*100;
    fprintf('\t%d,\t%2.2f,\t%2.2f,\t%2.2f,\t%2.2f,\t%2.2f,\t%2.2f,\t%2.2f,\t%2.2e\n',...
        cnt,f0,f1,f2,a,b,c,x3,error);
    %changing x values after each iteration
    x0=x1; x1=x2;x2=x3;
end

fprintf('\nThe root of the function is %f.\n',x3)


%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%


Related Solutions

Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0. Explain how...
Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0. Explain how the algorithm works.
Part I: Numerical Integration Evaluate the following integrals: i. ∫4(1−?−4?3 +2?5)?? 0 ii. ∫3(?2??)?? 0 a)...
Part I: Numerical Integration Evaluate the following integrals: i. ∫4(1−?−4?3 +2?5)?? 0 ii. ∫3(?2??)?? 0 a) Analytically b) Multiple application of Trapezoidal rule n = 4. c) Simpson’s 1/3 rule for n = 4. d) Simpson’s 1/3 and Simpson’s 3/8 rule for n = 5. e) Determine the true percent relative error.
Numerical Analysis: Apply Newton’s method to find the roots of polynomial P(x) = x^3 + 3x^2...
Numerical Analysis: Apply Newton’s method to find the roots of polynomial P(x) = x^3 + 3x^2 − 2x + 1. Find the convergence rate.
1. Use the Laplace transform to solve the initial value problem. ?"+4?′+3?=1−?(?−2)−?(?−4)+?(?−6), ?(0)=0, ?′(0)=0 2. Use...
1. Use the Laplace transform to solve the initial value problem. ?"+4?′+3?=1−?(?−2)−?(?−4)+?(?−6), ?(0)=0, ?′(0)=0 2. Use the Laplace transform to solve the initial value problem. ?"+4?=?(?), ?(0)=1, ?′(0)=−1     = { 1, ? < 1 where ?(?) =   {0, ? > 1.
Consider the following data: x -4 -3 -2 -1 0 P(X=x) 0.2 0.1 0.2 0.1 0.4...
Consider the following data: x -4 -3 -2 -1 0 P(X=x) 0.2 0.1 0.2 0.1 0.4 Step 2 of 5 : Find the variance. Round your answer to one decimal place. Step 3 of 5 : Find the standard deviation. Round your answer to one decimal place.
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 ).
exampleInput.txt 1 2 3 0 2 3 4 0 1 3 5 0 1 2 6...
exampleInput.txt 1 2 3 0 2 3 4 0 1 3 5 0 1 2 6 1 5 6 8 2 4 6 7 3 4 5 9 10 5 8 9 4 7 9 6 7 8 6 How can I detect when 'cin' starts reading from a new line. The amount of numbers in each row is unknown. I need them in type 'int' to use the data.
x P(x) 0 0.15 1 0.1 2 0.3 3 0.45 Find the mean of this probability...
x P(x) 0 0.15 1 0.1 2 0.3 3 0.45 Find the mean of this probability distribution. Round your answer to one decimal place. 2 x P(x) 0 0.05 1 0.15 2 0.25 3 0.55 Find the standard deviation of this probability distribution. Give your answer to at least 2 decimal places 3 2.36 Is it worth it?: Andy is always looking for ways to make money fast. Lately, he has been trying to make money by gambling. Here is...
Assuming that x>0, use the method of reduction of order to find a second solution to...
Assuming that x>0, use the method of reduction of order to find a second solution to x^2y''−3xy'+4y=0 Given y1(x)=x^2
Let y′=y(4−ty) and y(0)=0.85. Use Euler's method to find approximate values of the solution of the...
Let y′=y(4−ty) and y(0)=0.85. Use Euler's method to find approximate values of the solution of the given initial value problem at t=0.5,1,1.5,2,2.5, and 3 with h=0.05. Carry out all calculations exactly and round the final answers to six decimal places.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT