Finding Multiple Roots of Equations

In summary, the conversation discusses the task of finding the largest positive root of a function within a specific interval using different methods. The user has already written code for the bisection method, Newton-Raphson method, and secant method, but needs help in finding all the roots without hard coding different intervals. Horner's algorithm, which involves synthetic division, is mentioned as a possible solution. The conversation also mentions that finding one root of a polynomial using Horner's method can lead to finding the remaining roots. However, it is unclear how Horner's method can be applied to non-polynomial functions.
  • #1
trouty323
24
0

Homework Statement



Hello everyone. My task is to find the largest positive root in a specific interval of a function using the bisection method, Newton-Raphson method, and secant method. I've written code for all three of these methods, but the only way I can find all of the roots is to hard code different intervals. I know that is horrible practice, but the teacher never explained how to find them all using a different approach. However, I did read online that it can be done using Horner's algorithm (synthetic division). Basically, from my understanding, all of the roots can be found if one root is known. However, I could not find examples of code using Horner's algorithm specific to my purpose. I'm not asking for code, but a logical explanation as to how this can be accomplished. I originally posted this in the Computer Science forum, but was directed here. Thanks in advance!
 
Physics news on Phys.org
  • #2
Finding one root doesn't mean you can find all roots. Take x^3+2x^2-x-2. If you find one root, say x=1, then you know (x-1) must divide x^3+2x^2-x-2. Indeed (x^3+2x^2-x-2)/(x-1)=x^2+3x+2. Now the remaining roots must be roots of x^2+3x+2. You've cut the degree of the polynomial you have to solve down by one.
 
  • #3
AFAK, Horner's method is the division of a polynomial by a linear binomial:
[tex]
\left( a_0 \, x^n + a_1 \, x^{n - 1} + \ldots + a_{n - 1} + a_n \right) = (x - \alpha) \, \left( b_0 x^{n - 1} + b_1 \, x^{n - 2} + \ldots + b_{n - 2} \, x + b_{n - 1} \right) + r
[/tex]

The recursion is as follows:
[tex]
b_0 = a_0
[/tex]
[tex]
b_{k} = \alpha \, b_{k - 1} + a_{k}, \ k = 1, \ldots, n - 1
[/tex]
[tex]
r = \alpha \, b_{n - 1} + a_{n}
[/tex]

Now, if [itex]\alpha[/itex] is a root of the polynomial, then, by definition, [itex]r \equiv P_n(\alpha) = 0[/itex]. In a numerical procedure, r should be sufficiently small.

If you managed to find the root of a polynomial largest by absolute value, then you may find the quotient polynomial that is one order lower and repeat the same procedure. In this way, you can enumerate all the roots of the polynomial.

For non-polynomial functions, I don't know what Horner's method means.
 

Related to Finding Multiple Roots of Equations

1. How do you find multiple roots of an equation?

To find multiple roots of an equation, you can use various mathematical methods such as factoring, graphing, or using the quadratic formula. These methods will help you determine the values of x that make the equation equal to zero, which are the roots.

2. What is the importance of finding multiple roots of an equation?

Finding multiple roots of an equation is important for solving real-world problems, as it helps us determine the possible solutions to a given problem. It also helps us understand the behavior and patterns of the equation and its graph.

3. Can an equation have more than two roots?

Yes, an equation can have more than two roots. The number of roots an equation can have depends on the degree of the equation, which is the highest power of the variable in the equation. For example, a quadratic equation can have a maximum of two roots, while a cubic equation can have a maximum of three roots.

4. How do you know if an equation has multiple roots?

An equation has multiple roots if it has more than one solution for the variable. This means that when you plug in these values for the variable, the equation will be equal to zero. You can also determine the number of roots an equation has by looking at its degree.

5. What is the difference between real and complex roots?

Real roots are values of x that make the equation equal to zero and lie on the real number line. They are represented by points on the x-axis on a graph. Complex roots, on the other hand, are solutions that involve imaginary numbers. They are represented by points in the complex plane and do not lie on the real number line.

Similar threads

Replies
16
Views
2K
  • Precalculus Mathematics Homework Help
Replies
13
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
777
Replies
1
Views
866
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Programming and Computer Science
Replies
30
Views
4K
  • Precalculus Mathematics Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Back
Top