I have an equation for function F[x,y]==0
which first argument x
is real and another, y
, is complex. All constants in equation are real.
I define y
as y=a+I*b
.
I need to plot Im[y]
as function of x
. (in other words, I need a plot of b
as function of x
. The equality for F
for a
and b
and x
can be solved only using FindRoot
function.
Here's how I tried to plot what I need:
ContourPlot[{{Im[F] == 0, Re[F] == 0}}, {b, 0.1,
10^8}, {x, 0.1, 10^16}]
But nothing is plotted. Any ideas? Thank you for help!
Here is the function and constants:
e2 = 5
e3 = 1
omega1 = 1.1242*10^(16)
omega2 = 4.5896*10^(15)
omega3 = 5.5927*10^(15)
e1 = 1 - omega1^2/x^2
c = 3*10^8
k1 = Sqrt[y^2 - x^2/c^2 e1]
k2 = Sqrt[y^2 - x^2/c^2 e2]
k3 = Sqrt[y^2 - x^2/c^2 e3]
h = 5*10^(-9)
y = a + I b
F = ((k2/e2 + k1/e1)*(k3/e3 + k2/e2))/((k1/e1 - k2/e2)*(k3/e3 -
k2/e2)) - Exp[-2 k2 h]
Here is my attemption to plot roots I that I tried with FindRoot. But I am not sure it plots all roots correctly and I don't even know where to search for them:
findPoint[i_] :=
Evaluate[Function[
Assuming[a \[Element] Reals && b \[Element] Reals,
FindRoot[{(Re[F] /. x -> (10000*i)) ==
0, (Im[F] /. x -> (10000*i)) == 0}, {{a, 0.5}, {b, 0.2}}]]]]
list1 := Table[b /. findPoint[i][[1]], {i, 1, 2000}]
list2 := Table[10000*i, {i, 1, 2000}]
PointDone := Inner[List, list1, list2, List]
Show[{Graphics[Point[PointDone], Axes -> False, AspectRatio -> 1/2,
Frame -> {{True, False}, {True, False}}, FrameTicksStyle -> 18]}]
Here is a plot I got..
f
notation, and forgot that in post I used big'F'
. Now everything should work. $\endgroup$ – Gretchen Apr 6 '13 at 16:14