# Thread: Evaluating an nth degree polynomial

1. ## Evaluating an nth degree polynomial

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

2. ## Re: Evaluating an nth degree polynomial

Originally Posted by heatly
Iam having some problems understanding the question below.
...
How many additions and multiplications are needed to evaluate an nth degree polynomial
Which word in this question don't you understand?

3. ## Re: Evaluating an nth degree polynomial

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.

4. ## Re: Evaluating an nth degree polynomial

Originally Posted by heatly
1)calculating each power of x and multiply by coeifficent.

say
f(x)=0=a0+a1x+a2x^2+......anx^n
You are given just a polynomial f(x). I don't think you are told to assume that f(x) = 0.

Originally Posted by heatly
Is'nt the powers already known.Why multiple the power by the coeifficient.Sounds like taking the derivitive of each term?
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 $\displaystyle a_kx^k$, you compute $\displaystyle x^2$, $\displaystyle x^3$, ..., $\displaystyle x^k$ and finally $\displaystyle a_kx^k$. Note that the values of intermediate powers $\displaystyle x^2, x^3, ..., x^{k-1}$ can be reused to compute other terms of the polynomial.

The second way of computing f(x) is apparently Horner's method.

5. ## Re: Evaluating an nth degree polynomial

Thanks for that