How to find the number of roots of the function?

In summary, the conversation discusses using the Newton Raphson method to find the root of a function and determining the number and complexity of roots. The "Intermediate Value Theorem" is mentioned as a tool for finding at least one root between two points. It is noted that finding the number of roots for a general function is a difficult task, but for polynomial functions it is easier. The issue of discontinuity and its effect on finding roots is also brought up. The conversation ends with a mention of using Mathematica to plot a function, but it is pointed out that this may not always give the answer.
  • #1
hamamo
14
0
hi there
h r u >?
i am a high school physics teacher, and i write many software in vb.net for simulation and ...
the qustion
i use Newton raphson method to find a root of function but
i want to determine the following
1-is the function has a root or not, and then;

2-how can i find the number of roots, and is it complex or is it real
is there are a way or an alogrithems to find that
 
Mathematics news on Phys.org
  • #2
Hello hamamo!

Since you are using Newton Raphson iterative method to approximate the root of a function, I am going to assume that the functions you are dealing with here are continuous. Given that, by the "Intermediate Value Theorem", if you are given a value of x, say, 5, and the value of that function at x=5 is, suppose, -2, and also given a value of x, eg x=6, and the value of the function there is 1, then you know somewhere between x=5 and x=6 there is a root.

More neatly stated, if f(a) < 0, and f(b) > 0, then f(x) = 0 for some value of x such that a< x < b. So if you have two values of the function, one negative and one positive, you know straight away there has to be at least 1 root in there somewhere.

Finding the number of roots of a particular function can be a very hard task indeed. Do you have a particular type of function you are asking about? For instance, this question is well investigated and easier to answer for Polynomial functions.
 
  • #3
There is no way to determine the number of roots of a general function- except for the obvious: a polynomial of degree n has exactly n roots (counting multiple roots). If it has real coefficients, then the number of complex (i.e. not real) roots must be even.
 
  • #4
Gib Z said:
More neatly stated, if f(a) < 0, and f(b) > 0, then f(x) = 0 for some value of x such that a< x < b. So if you have two values of the function, one negative and one positive, you know straight away there has to be at least 1 root in there somewhere.

You don't even know this! Just because f(a)<0 and f(b)>0 does not mean a zero exists between a and b. It means a zero or a discontinuity exists between a and b. For example, consider the function f(x)=1/x. Note that f(-1)=-1 and f(1)=1, but this function of course has no zeros. The problem here is that pesky discontinuity at x=0. If f(a)<0 and f(b)>0 and f is continuous on (a,b) then one can say that a zero does exist in (a,b).
 
  • #5
D H said:
You don't even know this! Just because f(a)<0 and f(b)>0 does not mean a zero exists between a and b. It means a zero or a discontinuity exists between a and b. For example, consider the function f(x)=1/x. Note that f(-1)=-1 and f(1)=1, but this function of course has no zeros. The problem here is that pesky discontinuity at x=0. If f(a)<0 and f(b)>0 and f is continuous on (a,b) then one can say that a zero does exist in (a,b).

I said earlier in my post I was assuming the function was continuous, as he was using Newtons method on them.
 
  • #6
thanx a lot
i know that the function should be continuous
and i need a way to do that for any function
any ideas!
 
  • #7
For any general function, there is no general method.
 
  • #8
i'm sure mathematica could plot it on pretty much any interval
 
  • #9
Find the zeros of sin(1/x) in the neighborhood of a small but non-zero value of x.
 
  • #10
ice109 said:
i'm sure mathematica could plot it on pretty much any interval
Plot what?
 
  • #11
D H said:
Find the zeros of sin(1/x) in the neighborhood of a small but non-zero value of x.

he didn't say enumerate them, he said find the number. and I'm pretty there are countably infinite zeroes for your function on that interval.

HallsofIvy said:
Plot what?

his function.
 
  • #12
I think the point of DHs comment was that plotting a function in Mathematica doesn't always give the answer.
 
  • #13
Gib Z said:
I think the point of DHs comment was that plotting a function in Mathematica doesn't always give the answer.

[Histronic]
Quelle horreur!
[/Histronic]
 

1. What is the definition of a root in a function?

A root in a function is a value that, when substituted into the function, makes the function equal to zero. In other words, it is the value of the independent variable that satisfies the equation.

2. How do I determine the number of roots in a function?

The number of roots in a function can be determined by looking at the degree of the function. For a polynomial function, the number of roots is equal to the degree of the function. For example, a quadratic function (degree 2) will have 2 roots, a cubic function (degree 3) will have 3 roots, and so on.

3. Can a function have more than one root?

Yes, a function can have more than one root. A polynomial function can have up to n number of roots, where n is the degree of the function. However, other types of functions, such as exponential or trigonometric functions, may have infinitely many roots.

4. How can I find the roots of a function algebraically?

To find the roots of a function algebraically, you can set the function equal to zero and solve for the variable. This method works for polynomial functions, but for other types of functions, you may need to use different techniques such as factoring or the quadratic formula.

5. Can I use a graph to find the roots of a function?

Yes, a graph can also be used to find the roots of a function. The x-intercepts of the graph, where the function intersects with the x-axis, represent the roots of the function. This method is particularly useful for visualizing the roots of functions with higher degrees or for functions that are difficult to solve algebraically.

Similar threads

Replies
16
Views
1K
  • General Math
Replies
7
Views
1K
Replies
13
Views
3K
Replies
4
Views
409
Replies
2
Views
2K
  • General Math
Replies
2
Views
723
  • General Math
Replies
5
Views
843
  • General Math
Replies
1
Views
1K
  • General Math
Replies
1
Views
2K
Replies
22
Views
4K
Back
Top