How to find roots provided by integer values on a function?

477 Views Asked by At

If we have a function (defined on the real or complex numbers) is there a technique that we can use to find roots provided by integer arguments?

For example,

Some f(x) have some roots like x=17.45, x=25, x=546.87. Do we have some techinique like the Newton-Rapson method that we can use to find only the root provided by an integer value (in this case x=25)?

Maybe someone can tell me that I could just test if the root found is integer or not, but the function that I'm studying could have a great number of non-integer roots, but few integer roots, so the Newton-Rapson method don't work very well.

Edit

A "simple function" that I'm studying is this one below. It evaluates to 1/2 when the input number is integer or a half of an integer. I have called it "simple" because probably I will use it with some other things.

Forgot, y = 1, always, in this case. This is the simplified form presented in this link.

enter image description here

1

There are 1 best solutions below

2
On

If you're talking about a polynomial with integer coefficients, any integer root is a divisor of the constant coefficient. That narrows things down to a finite set of possibilities, assuming you can factor that coefficient.