MathGroup Archive 2005

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

Search the Archive

Re: Periodic function Roots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58399] Re: Periodic function Roots
  • From: "Valeri Astanoff" <astanoff at yahoo.fr>
  • Date: Thu, 30 Jun 2005 06:16:01 -0400 (EDT)
  • References: <da0bka$fkj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

An example of what i do in such a case:

In[1]:=f[x_]:=Cos[x]+.5 Cos[2x]+.25 Cos[3x]+2.5 Cos[4x]

In[2]:=t=Table[FindRoot[f[x] == 0,{x,u}],{u,0.1,2Pi,0.1}];

In[3]:=Union[t,SameTest -> (Abs[(x/.#2)-(x/.#1)]<10^-5&)]

Out[3]=
{{x -> -0.51129},{x -> 0.51129},{x -> 1.20136},
{x -> 1.91222},{x -> 2.81887},{x -> 3.46432},
{x -> 4.37096},{x -> 5.08183},{x -> 5.7719}}


v.a.


  • Prev by Date: poly question
  • Next by Date: Re: Weird behavior of SparseArray
  • Previous by thread: Periodic function Roots
  • Next by thread: Integrate and Boole problems