Iam having some problems understanding the question below.Does anybody know how the answers below were reached.
How many additions and multiplications are needed to evaluate an nth degree polynomial if it is evaluated:
1) by calculating each power of x and multiplying it by its coifficient. Ans: 2n-1 multiplications and n additions
2)by using the nested form of the polynomial to evaluate it. Ans: n multiplications and n additions
1)calculating each power of x and multiply by coeifficent.
say
f(x)=0=a0+a1x+a2x^2+......anx^n
Is'nt the powers already known.Why multiple the power by the coeifficient.Sounds like taking the derivitive of each term?
This Question is in a numerical math subject.
You are given just a polynomial f(x). I don't think you are told to assume that f(x) = 0.
The question is about computing f(x) for a given number x. The first way is to calculate each term of f(x) and add them together. To compute , you compute , , ..., and finally . Note that the values of intermediate powers can be reused to compute other terms of the polynomial.
The second way of computing f(x) is apparently Horner's method.