Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

8 ? 10x + 7x2 ? 2x3 + 3x4 + 12x5, when x is replaced by an arbitrary (but fixed)

ID: 1888737 • Letter: 8

Question

8 ? 10x + 7x2 ? 2x3 + 3x4 + 12x5,
when x is replaced by an arbitrary (but fixed) real number r.
For this particular instance, n 5 and a0 8, a1 ?10,
a2 7, a3 ?2, a4 3, and a5 12.
procedure PolynomialEvaluation1
(n: nonnegative integer;
r,a0,a1,a2,. . .,an: real)
begin
product := 1.0
value := a0
for i := 1 to n do
begin
product := product * r
value := value + ai * product
end
end
a) How many additions take place in the evaluation of
the given polynomial? (Do not include the n ? 1 additions
needed to increment the loop variable i.) How many multiplications?
b) Answer the questions in part (a) for the general polynomial
a0 + a1x + a2x2 + a3x3 +

Explanation / Answer

a. 5 additions and 10 multiplications

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote