MathGroup Archive 2002

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

Search the Archive

Re: Finding many complex roots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37797] Re: Finding many complex roots
  • From: bghiggins at ucdavis.edu (Brian Higgins)
  • Date: Wed, 13 Nov 2002 01:11:23 -0500 (EST)
  • References: <aqo0mp$fql$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Marco, I would suggest you look at Stan Wagon's book "Mathematica in
Action" .  On page 289 he shows how to use ContourPlot to find roots
of two functions f(x,y)=0, and g(x,y)=0. In case you do not have the
book here is the essence of his approach:
 Suppose I want to find the complex roots of  Sin[x]+x=0. 

eqn = Sin[x] + x;
s1 = ComplexExpand[TrigToExp[eqn /. x -> u + I v]]
f[u_, v_] = First[Cases[s1, Times[Complex[0, 1], x__] -> x,
\[Infinity]]];
g[u_, v_] = DeleteCases[s1, Times[Complex[0, 1], x__], \[Infinity]];

The complex roots are then the solutions to f[u,v]=0,g[u,v]=0. These
roots can be visualized as the intersections when the two level curves
are superimposed using ContourPlot

Show[Map[ContourPlot[Evaluate[#[x, y]], {x, -10, 10}, {y, -10, 10},
Contours -> {0}, ContourShading -> False, PlotPoints -> 80] &, {f, 
g}]]

In his book, Stan Wagon goes further to show how one can write a small
code to extract the numerical data from the ContourPlot .

Cheers,

Brian



"Marco" <caiazzo at ieee.org> wrote in message news:<aqo0mp$fql$1 at smc.vnet.net>...
> Hi,
> I have to find many complex roots of complex function like
> f[z]=0  where z is complex.
> I try first the graphical approch:
> ImplicitPlot[{Re[f[a+ Ib]]==0,Im[f[a+I b]]==0},{a,amin,amax},{b,bmin,bmax}]
> or somethink else, and it works good and I visualize the solution in the
> specificated region.
> Now I'd like to compute the finding automaticaly.
> I' seen other posts which illustrates how find many roots of real function
> of real varible but I'm unable to genaralize in 2D case.
> Some one can help me?
> 
> P.S. sorry for my english
> 
> Thanks x1000


  • Prev by Date: Re: Export: Where is exported file?
  • Next by Date: Re: How to convert a matrix into a graph?
  • Previous by thread: Re: Finding many complex roots
  • Next by thread: Multiline Text[ ] in figures: How to change alignmenty (justification)?