Evaluating Polynomials with Horner's Method]

In summary, the Horner's method algorithm evaluates polynomials. The following pseudocode shows how to use this method to find the value of anxn + an-1xn-1 + . . . + a1x + a0 at x = c. The algorithm begins by evaluating x2 + 5x + 3 at x = 2, and uses multiplications and additions to find the value of the polynomial. Exactly how many multiplications and additions are used by this algorithm to evaluate a polynomial of degree n at x = c? (Do not count additions used to increment the loop variable.)
  • #1
hyderman
28
0
The Horner’s method is an algorithm that evaluates polynomials. The following pseudocode shows how to use this method to find the
value of anxn + an-1xn-1 + . . . + a1x + a0 at x = c.
procedure Horner(c, a0, a1, a2, . . . , an : real numbers)
y := an
for i := 1 to n
y := y × c + an-i
end {y = ancn + an-1cn-1 + . . . + a1c + a0}

(a) Evaluate x2 + 5x + 3 at x = 2 by working through each step of the algorithm.
(b) Exactly how many multiplications and additions are used by this algorithm to evaluate a polynomial of degree n at x = c? (Do not count additions used to increment the loop variable.)


please help in details thanks much


[
 
Physics news on Phys.org
  • #2
n=2. a2=1, a1=5, a0=3. c=2. There - I did the hard part. Now just DO it. Step through the algorithm.
 
  • #3
okey x^2 + 5x + 3 at x=2
i need to make sure about your answer.sooo

x^2(is a2) + 5x(is a1) + 3 (is a0) at x=2 (is n=2)
correct or not?

i will give anonther example make sure about it

lets assume evaluate 3x^2 + x + 1 at x=2

so according to you 3x^2(is a=2) + x(is a=1) + 1 (is a=0) at x=2(is n=2)
is it correct

please let me know
thanx
 
  • #4
Boy are they going out of their way to make this obscure.

Horner's method is simply factoring the polynomial to eliminate all orders of x greater then 1. Then you start multiplying and adding your way through the nest.
For example expand a quadratic like this:
[tex] ax^2 + bx + c = x(ax+b) + c [/tex]

To do the calculation start inside the parens and work your way out.

This method is very useful for RPN calculators.
 
  • #5
Integral, Is Horner's method just an elaborate way to say that the value of a polynomial at x=a is simply the remainder when the polynomial is divided by x-a?

Nevermind... (I've never seen it written as Horner's method before; I just scratched it out on paper, and "that's all it is?") You're right! They did make that pretty obscure.

OP, if you're having trouble following it, have you been exposed to synthetic division before? Simply, synthetic division is used to divide a polynomial by a linear binomial in the form (x-a). The remainder after such a division is equal to f(a).
 
  • #6
To answer the question, it doesn't matter if you don't know what Horner's method is, or what it's supposed to do.

You are given an algorithm, and asked to work through it step by step and count the number of operations. A computer just follows the instructions in the algorithm. To answer the question, you need to do the same as the computer would do.
 
  • #7
hello
how did you calculate c=2

please explain in details

how about this
okey x^2 + 5x + 3 at x=2
what is c?
 
  • #8
hyderman said:
hello
how did you calculate c=2

please explain in details

how about this
okey x^2 + 5x + 3 at x=2
what is c?

No one "calculated" c= 2! The definition of Horner's method said "use this method to find the value of a_nx^n + a_(n-1)x^(n-1) + . . . + a_1x + a_0 at x = c".
Your problem asks you to find the value of a given polynomia "at x= 2".

Just compare that "general form "anx^n + an-1x^(n-1) + . . . + a1x + a0 at x = c" with the specific problem you are given. In x^2+ 5x+ 3, the highest power of x is 2: n= 2. The coefficient of that highest power is 1, the next 5, the constant term is 3: a_2= 1, a_1= 5, a_0= 3. Because the problem says "at x= 2" compared with "at x= c", c= 2.

Here's a test: "evaluate 4x^3+ 3x^2- 2x+ 4 at x= 1". What are n, a_3, a_2, a_1, a_0, and c?

By the way, notice the use of "_2" for subscripts and "^2" for exponents? Makes it much easier to read.
 
Last edited by a moderator:
  • #9
thank you HallsofIvy it is clear now...
 

What is Horner's Method?

Horner's Method is a mathematical technique used to evaluate polynomials in an efficient and accurate manner. It involves factoring out the highest degree term of a polynomial and using synthetic division to simplify the calculations.

How is Horner's Method used to evaluate polynomials?

To use Horner's Method, the polynomial must be written in standard form, with the terms arranged in descending order of degree. Then, the highest degree term is factored out and the remaining polynomial is divided by this term. The resulting quotient is used to continue the process until a constant term is reached, giving the final value of the polynomial.

Why is Horner's Method considered more efficient than other methods of polynomial evaluation?

Horner's Method is more efficient because it reduces the number of operations needed to evaluate a polynomial. It eliminates the need for repeated multiplication and addition, making the process faster and less prone to error.

What are the benefits of using Horner's Method in real-world applications?

Horner's Method is commonly used in computer programming and engineering applications, where complex polynomials need to be evaluated quickly and accurately. It also allows for easier implementation in computer algorithms and reduces the risk of rounding errors.

Are there any limitations or drawbacks to using Horner's Method?

Horner's Method may not always be the best option for polynomial evaluation, as it requires the polynomial to be written in standard form. It may also be less efficient for polynomials with small degrees or with multiple terms of equal degree. Additionally, it may be more difficult to understand and implement for those who are not familiar with the method.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
Replies
7
Views
1K
  • Programming and Computer Science
Replies
9
Views
2K
  • Programming and Computer Science
Replies
5
Views
2K
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
244
Replies
6
Views
4K
  • Differential Equations
Replies
4
Views
949
  • Programming and Computer Science
Replies
27
Views
6K
  • General Math
Replies
3
Views
744
Back
Top