Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Number of zeros finite or infinite?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115461] Re: Number of zeros finite or infinite?
  • From: Christopher Arthur <aarthur at tx.rr.com>
  • Date: Tue, 11 Jan 2011 19:21:56 -0500 (EST)

Maybe this...

If[Position[_Element,#]!={},Do for finite,Do for infinite]

since the answer wont have the keyword for finite cases...


Chris


James a =E9crit :
> 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[17]) || x == (1/4)*(-3 + Sqrt[17])
>
> and in the infinite case for example, I would obtain something like:
>
> thezeros = Reduce[1 - 4*Sin[z]^2 == 0, z]
>
> Element[C[1], Integers] && (z == -(Pi/6) + 2*Pi*C[1] || z == (7*Pi)/6 + 2*Pi*C[1] || z == Pi/6 + 2*Pi*C[1] || z == (5*Pi)/6 + 2*Pi*C[1])
>
> 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: Extracting graphics from notebook
  • Next by Date: Re: Turning Derivative into Function (Newbie Question)
  • Previous by thread: Re: Number of zeros finite or infinite?
  • Next by thread: Re: How do I do very big integer computing by