I've been stuck at this problem for weeks and I've asked several related questions here:

[ContourPlot shows only part of the contours [duplicate]](https://mathematica.stackexchange.com/questions/32681/contourplot-shows-only-part-of-the-contours)

[How to plot the contour of the radius part of a complex function](https://mathematica.stackexchange.com/questions/32714/how-to-plot-the-contour-of-the-radius-part-of-a-complex-function)

a lot of help has been kindly given but I think my problem is still not solved completely.

In the first question, Jens pointed out that when a function only touch but not cross 0, `ContourPlot` would have difficulty finding the 0 contour. He then suggested to plot `f[x,y]==0.001` or some small number, instead of `f[x,y]==0.`. This seems works very well for some functions like `Abs[Cos[x]+Cos[y]]`. However it doesn't work on my function, and he also gave an explanation that the reason it doesn't work is because the maximals of my function change a lot in the plot region. Along this direction, I rescaled my function to make the maximals at the same order, but the `f[x,y]==0.001` trick still doesn't work. I've been experimenting with these for a while and found that the reason seem more than just the steep change in the maximals. And I also found some behavior of `ContourPlot` that are very confusing for me.

Consider this function, the maximals of it changes quite of lot

```
f[x_, y_] := (Cos[x] + Cos[y]) Exp[I x y] Exp[x/2]

Plot3D[Abs[f[x, y]] == 0.001, {x, 0, 4 Pi}, {y, 0, 4 Pi}, 
 PlotPoints -> 40, PlotRange -> All]

```

![enter image description here](https://i.stack.imgur.com/d8Hfm.png)

Now if we plot the 0 contour, using different `PlotPoints` setting, we would get different results. In fact more plot points makes the contour worse. **Why?**

```
myPlot[sqs__] := Module[{},
  Row@{ContourPlot[Sequence[sqs], ImageSize -> 400], 
    ListPlot[
     Reap[ContourPlot[Sequence[sqs], 
        EvaluationMonitor :> Sow[{x, y}]]][[-1, 1]], 
     PlotStyle -> PointSize[Tiny], ImageSize -> 400, Axes -> False, 
     Frame -> True, AspectRatio -> 1]}
  ]

myPlot[Abs[f[x, y]] == 0.001, {x, 0, 4 Pi}, {y, 0, 4 Pi}]
myPlot[Abs[f[x, y]] == 0.001, {x, 0, 4 Pi}, {y, 0, 4 Pi}, PlotPoints -> 50]
myPlot[Abs[f[x, y]] == 0.001, {x, 0, 4 Pi}, {y, 0, 4 Pi}, PlotPoints -> 100]

```

![enter image description here](https://i.stack.imgur.com/uYbYW.png)

If we increase the plot range, the `ContourPlot` just fails to give the result. **Why?** The MaxRecursion seems can help in this case, but the contour is still broken.

```
myPlot[Abs[f[x, y]] == 0.001, {x, 0, 16 Pi}, {y, 0, 16 Pi}]
myPlot[Abs[f[x, y]] == 0.001, {x, 0, 16 Pi}, {y, 0, 16 Pi}, MaxRecursion -> 3]

```

![enter image description here](https://i.stack.imgur.com/XAVgT.png)

Now compare with the second function

```
f[a_, a0_, k_, K0_] := 
 a^2 Sech[(a a0)/2]^2 (-2 I (1 + E^(2 I a0 k)) k + 
     a (-1 + E^(2 I a0 k)) Tanh[(a a0)/2]) + 
  2 k (I E^(
      I a0 k) ((a - k) (a + k) Cos[a0 k] + (a^2 + k^2) Cos[a0 K0]) + 
     a (-1 + E^(2 I a0 k)) k Tanh[(a a0)/2])

With[{a0 = 10., a = 1.4},
 Plot3D[Abs[f[a, a0, k, K0]] == 0.001, {K0, -2 π/a0, 
   2 π/a0}, {k, 0, 2}, ImageSize -> 400, PlotPoints -> 40]]

```

We can see that this function behaves well in terms of the changes in the maximals. All the maximals seems in the same order. And ContourPlot seems fails to produce the results, even plotting a very small region with `MaxRecursion->3`. Why?

![enter image description here](https://i.stack.imgur.com/fKTWe.png)

```
With[{a0 = 10., a = 1.4},
 myPlot[Abs[f[a, a0, y, x]] == 0.001, {x, -π/a0, π/a0}, {y, 0,2}]]
With[{a0 = 10., a = 1.4},
 myPlot[Abs[f[a, a0, y, x]] == 0.001, {x, -π/a0, π/a0}, {y, 0,2}, MaxRecursion -> 3]]

```

![enter image description here](https://i.stack.imgur.com/rjt1J.png)

**Summary of the Questions**

1. In the first function, why increase PlotPoints makes things worse, and why increases plot range resulted in almost no contour plotted(when plot range is 16pi)?
2. Why the second function, which seems behave better than the first, shows very poor contour results and how to improve it?