[Date Index]
[Thread Index]
[Author Index]
Re: Real and Complex Roots presented in a single plot
*To*: mathgroup at smc.vnet.net
*Subject*: [mg91860] Re: [mg91820] Real and Complex Roots presented in a single plot
*From*: Daniel Lichtblau <danl at wolfram.com>
*Date*: Wed, 10 Sep 2008 05:10:32 -0400 (EDT)
*References*: <200809091056.GAA27909@smc.vnet.net>
Narasimham wrote:
> z[x_] = 1.3 Sin[1.7* x] + 0.6 Sin[4* x] ;
> Plot[z[x], {x, 0, 18}]
>
> In the above plot we can see all the real roots of z very
> approximately at {2.1,3.4, 5.5, 7.6, 9, 11, 13.1, 14.5, 16.5}, as the
> curve crosses x-axis.
>
> We can also recognize and see the real parts of all the
> complex roots of z where the curve is nearest to x -axis at {1.4,
> 4.2, 6.6, 9.6, 12.3, 15.3, 17.7}. They are near to x-values where the
> local maxima/minima occur.But we cannot 'see' their complex parts, as
> they need to be computed.
>
> After computation of all real and complex roots I would like to
> represent all roots, real and complex roots alike, on an ( x - y )
> Argand diagram (in a 2D plot) with the real part on x - axis and
> imaginary part on y - axis. How to do this ?
>
> Regards,
> Narasimham
This computes all roots with nonnegative imaginary part. You can flip
across the real axis to get the conjugates.
ListPlot[
Map[{Re[#], Im[#]} &,
x /. N[{ToRules[
Reduce[{z[x] == 0, -100 <= Re[x] <= 100, 0 <= Im[x] <= 1/2},
x]]}]]]
I capped the imaginary part at 1/2 because FindInstance tells me I can
do so.
In[27]:= FindInstance[{z[x] == 0, Im[x] > 1/2}, x]
Out[27]= {}
You can also get a hint of this from plotting the absolute value,
letting the imaginary part of x go from 0 to 1.
Plot3D[Abs[z[x + I*y]], {x, 0, 18}, {y, 0, 1}]
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: About NDSolve**
Next by Date:
**Re: Error in file / load entire notebook into memory**
Previous by thread:
**Real and Complex Roots presented in a single plot**
Next by thread:
**Re: Real and Complex Roots presented in a single plot**
| |