Question

In: Computer Science

Consider the polynomial f(x) = 3x 3 + 5x 2 − 58x − 40. Using MATLAB....

Consider the polynomial f(x) = 3x 3 + 5x 2 − 58x − 40. Using MATLAB. Find the three roots of the polynomial, i.e, x where f(x) = 0, using Newton’s method. Report the number of iterations taken by each algorithm using a tolerance of 10−8 .

Solutions

Expert Solution

Root of Polynomial - Newton's Method:

function [ root, iter ] = newton( f, df, x0, epsilon, max_iter )
%function, derivative,initial guess, epsilonerance, max iteration
x(1) = x0 - (f(x0)/df(x0));
error(1) = abs(x(1)-x0);
k = 2;
while (error(k-1) >= epsilon) && (k <= max_iter) %while we have a reasonable root
x(k) = x(k-1) - (f(x(k-1))/df(x(k-1))); %formula
error(k) = abs(x(k)-x(k-1)); %error
k = k+1;
end
root = x(length(x));
iter=k-2;
end

Screenshot:

Note: If you have any related doubts, queries, feel free to ask by commenting down below.

And if my answer suffice your requirements, then kindly upvote.

Happy Learning


Related Solutions

Using MATLAB, Consider the polynomial f(x) = 3x^3 + 5x^2 − 58x − 40. Find the...
Using MATLAB, Consider the polynomial f(x) = 3x^3 + 5x^2 − 58x − 40. Find the three roots of the polynomial, i.e, x where f(x) = 0, using: (i) Bisection method, and (ii) Newton’s method. Report the number of iterations taken by each algorithm using a tolerance of 10^−8 .
Consider f(x) = 2 + 3x^2 − x^3
Consider f(x) = 2 + 3x2 − x3 a) Find local max and min values b) Find intervals of concavity and infection points
. Let f(x) = 3x^2 + 5x. Using the limit definition of derivative prove that f...
. Let f(x) = 3x^2 + 5x. Using the limit definition of derivative prove that f '(x) = 6x + 5 Then, Find the tangent line of f(x) at x = 3 Finally, Find the average rate of change between x = −1 and x = 2
Consider the following real 3rd order polynomial f (x)= x^3− 5.5 x^2− 5x+ 37.5 A) Use...
Consider the following real 3rd order polynomial f (x)= x^3− 5.5 x^2− 5x+ 37.5 A) Use the bisection method to determine one of the roots, employing initial guesses of xl = - 10, xu = -1, and a stopping criterion εs=12% . B) Use the false position method to determine a root, employing initial guesses of xl = - 1, xu = 4, and a stopping criterion εs=3%. Was this method the best for these initial guesses? C) Use the...
if f(x) = -5x^2 sin(5x) and g(x) = x^2 -3x +9 are defined over the interval...
if f(x) = -5x^2 sin(5x) and g(x) = x^2 -3x +9 are defined over the interval (2,4) write the full MATLAB commands to plot the two functions above two functions on the same set of axes 2 find the x and y coordinate of all points of intersections (x,y) that you can clearly see between the two graphs. Round up to 4 decimal
compute the 2-degree polynomial approximation of f(x)= 3x-e^x^2
compute the 2-degree polynomial approximation of f(x)= 3x-e^x^2
Using Matlab, consider the function f(x) = x^3 – 2x + 4 on the interval [-2,...
Using Matlab, consider the function f(x) = x^3 – 2x + 4 on the interval [-2, 2] with h = 0.25. Write the MATLAB function file to find the first derivatives in the entire interval by all three methods i.e., forward, backward, and centered finite difference approximations. Could you please add the copiable Matlab code and the associated screenshots? Thank you!
Question1: Find the interval of increase and decrease of given function f(x)=3x^5-5x^3 f(x)=1/3 x^3-9x+2
Question1: Find the interval of increase and decrease of given function f(x)=3x^5-5x^3 f(x)=1/3 x^3-9x+2
let p1(x) = x^2-3x-10 ,p2(x)=x^2-5x+1,p3(x)=x^2+2x+3 and p4(x)=x+5 a- Using standard polynomIAL ADDITION ,what polynomial ax^2+bx+c can...
let p1(x) = x^2-3x-10 ,p2(x)=x^2-5x+1,p3(x)=x^2+2x+3 and p4(x)=x+5 a- Using standard polynomIAL ADDITION ,what polynomial ax^2+bx+c can be expressed as linear combination of p1(x),p2(x),p3(X),p4(x) b- a polynomial is equal to zero if and only if all it's coefficient to zero . solve for a1,a2,a3,a4 by expanding ,written as polynomial in x,and setting each coefficient equal to zero: a1p1(x)+a2p2+a3p3(x)+a4p4(x)=0
consider the function f(x)=3x-5/sqrt x^2+1. given f'(x)=5x+3/(x^2+1)^3/2 and f''(x)=-10x^2-9x+5/(x^2+1)^5/2 a) find the local maximum and minimum...
consider the function f(x)=3x-5/sqrt x^2+1. given f'(x)=5x+3/(x^2+1)^3/2 and f''(x)=-10x^2-9x+5/(x^2+1)^5/2 a) find the local maximum and minimum values. Justify your answer using the first or second derivative test . round your answers to the nearest tenth as needed. b)find the intervals of concavity and any inflection points of f. Round to the nearest tenth as needed. c)graph f(x) and label each important part (domain, x- and y- intercepts, VA/HA, CN, Increasing/decreasing, local min/max values, intervals of concavity/ inflection points of f?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT