       Re: Number of zeros finite or infinite?

• To: mathgroup at smc.vnet.net
• Subject: [mg115436] Re: Number of zeros finite or infinite?
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Tue, 11 Jan 2011 00:33:57 -0500 (EST)

```finiteQ[expr_] := FreeQ[expr, Element[_, Integers]]

Bob Hanlon

---- James <icorone at hotmail.com> wrote:

=============
Hello everyone,

I'm working on a program that deals with zeros of functions and would
like to know if the zeros are finite or not.  For example, in the finite
case :

testcase1 = Reduce[2*x^2 + 3*x - 1 == 0, x]
x == (1/4)*(-3 - Sqrt) || x == (1/4)*(-3 + Sqrt)

and in the infinite case for example, I would obtain something like:

thezeros = Reduce[1 - 4*Sin[z]^2 == 0, z]

Element[C, Integers] && (z == -(Pi/6) + 2*Pi*C || z == (7*Pi)/6 + 2*Pi*C || z == Pi/6 + 2*Pi*C || z == (5*Pi)/6 + 2*Pi*C)

Can someone please help me distinguish the two cases so that I can then process them differently?  For example, in pseudo code:

If(finite) do onething, else doanotherthing

Thanks guys,

```

• Prev by Date: Re: PDE system solving
• Next by Date: Re: curve fitting question
• Previous by thread: Number of zeros finite or infinite?
• Next by thread: Re: Number of zeros finite or infinite?