Question

Write code to evaluate the polynomial at the point indicated by using Horner’s algorithm. p(x)=x^5−x^4−3x^3−5x^2+10 at...

Write code to evaluate the polynomial at the point indicated by using Horner’s algorithm.

p(x)=x^5−x^4−3x^3−5x^2+10 at x=2

(use MATLAB to code and show the results.)

Homework Answers

Answer #1

Required Matlab code with explanatory comments is given below:

function x = Q_horner(a,z)
n = length(a); %length of polynomial vector coefficients
result = a(1); %initialize result
for j = 2:n
    result = result*z + a(j); %horner's substitution
end
x = result; %output result

Result:

Hope this was helpful. Please do leave a positive rating if you liked this answer. Thanks and have a good day!

Know the answer?
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
Similar Questions
Given the polynomial f(x) = 3x^4 -7x^3 -3x^2 + 17x + 10, and given the zeros...
Given the polynomial f(x) = 3x^4 -7x^3 -3x^2 + 17x + 10, and given the zeros of -1 and -2/3,   A). Write the polynomial in linear and irreducible quadratic factors B). Write the linear factorization of the polynomial.
1. Let f(x)=−x^2+13x+4 a.Find the derivative f '(x) b. Find f '(−3) 2. Let f(x)=2x^2−4x+7/5x^2+5x−9, evaluate...
1. Let f(x)=−x^2+13x+4 a.Find the derivative f '(x) b. Find f '(−3) 2. Let f(x)=2x^2−4x+7/5x^2+5x−9, evaluate f '(x) at x=3 rounded to 2 decimal places. f '(3)= 3. Let f(x)=(x^3+4x+2)(160−5x) find f ′(x). f '(x)= 4. Find the derivative of the function f(x)=√x−5/x^4 f '(x)= 5. Find the derivative of the function f(x)=2x−5/3x−3 f '(x)= 6. Find the derivative of the function g(x)=(x^4−5x^2+5x+4)(x^3−4x^2−1). You do not have to simplify your answer. g '(x)= 7. Let f(x)=(−x^2+x+3)^5 a. Find the derivative....
finding the inflection point(s) of this function ( 1/5x^5-4/3x^3 ) !
finding the inflection point(s) of this function ( 1/5x^5-4/3x^3 ) !
Differentiate f(x) = (√ x +1)(x(2/5)+3x) f(x) =(5x3+1)/(x2+2x+1) f(x) = -5x(3x-3)4 f(x) = (2x + (x2+x)4)(1/3)
Differentiate f(x) = (√ x +1)(x(2/5)+3x) f(x) =(5x3+1)/(x2+2x+1) f(x) = -5x(3x-3)4 f(x) = (2x + (x2+x)4)(1/3)
a) Define a function to be x^3+3x-4 and define another function to be x^2-5x+10. **Note: Use...
a) Define a function to be x^3+3x-4 and define another function to be x^2-5x+10. **Note: Use different names for each function. b) Plot both functions from part a on the same graph from x=-5 to x=5. Define a range of 0 to 100 with the PlotRange option. Use the PlotLegends option to label the functions with their "Expressions". You may need to refer to the "Lab 3 Functions Continued" instructional notebook or the Documentation Center to see how options are...
Given P(x)=3x^5−x^4+88x^3−48x^2−720^x−432, and that 6i is a zero, write P in factored form (as a product...
Given P(x)=3x^5−x^4+88x^3−48x^2−720^x−432, and that 6i is a zero, write P in factored form (as a product of linear factors). Be sure to write the full equation, including P(x)=
The fourth degree polynomial x^4-5x^3+5x^2+5x-6 has four different zeros. If two of the zeros are 1...
The fourth degree polynomial x^4-5x^3+5x^2+5x-6 has four different zeros. If two of the zeros are 1 and 2, what are the other two zeros?
Given P(x)=3x^5−x^4+88x^3−48x^2−720x−432, and that 6i is a zero, write P in factored form (as a product...
Given P(x)=3x^5−x^4+88x^3−48x^2−720x−432, and that 6i is a zero, write P in factored form (as a product of linear factors). Be sure to write the full equation, including P(x)=
consider the funtion 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 domain of f. (write...
consider the funtion 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 domain of f. (write in interval notation): Df:=_____________? b) Find the x- and y- intercepts. if any. (write your answers as ordered pairs). c) Find the asymptotes of f, if any. If there are not, write why. (write answers as equations). d) Find all of the critical numbers of f. on what intervals is f increasing/decreasing? show all work
use matlab to determine the derivative of 5x^4+3x^3+6x^2-7x+2=0 b. determine the definate integral of the equation...
use matlab to determine the derivative of 5x^4+3x^3+6x^2-7x+2=0 b. determine the definate integral of the equation above from -2 to 6 in matlab please
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT