How does one find a0 a1 a2 13. The conventional algorithm for evaluating a polyn
ID: 3198116 • Letter: H
Question
How does one find a0 a1 a2
13. The conventional algorithm for evaluating a polynomial anx" + an-l Xn-l + . . . + aix + ao at x-= c can be ex- pressed in pseudocode by procedure polynomial(c, ao, a1,..., an: real numbers) power :-! for i :" = 1 to n power-power * c y y +ai power return y (y ane an-1c1-1+ +aic + ao where the final valuc of y is the value of the polynomial atx=c. a) Evaluate 3x2 + x + 1 at x = 2 by working through each step of the algorithm showing the values assigned at each assignment stepExplanation / Answer
Note for c=2, n=2, ao=1, a1=1, a2=3
Evaluating
(7*2)+1 = 15
So p(2)=15
i y y=an 0 3 for i=1to n 1 3 y = y*c + an-1 1 (3*2)+1=7 for i=1 to n 2 7 y = y*c + an-1 2(7*2)+1 = 15
for i=1 to n 3 15Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.