# plotting – How can I make sure that the plot of this function cross each other or not?

Using the option `MaxRecursion` reduces the number of `PlotPoints` needed.

``````Clear("Global`*")

f(x_, y_) :=
2 (-4 + x^2) Sinh((π x)/3) +
1/16 (((4 + x^2)^2 + 64 (-4 + x^2) Cos(y) Cosh((2 π x)/3) +
256 x Sin(y) Sinh((2 π x)/3)) Sinh(π x) -
2 (4 + x^2)^2 Sinh((5 π x)/3) + (-12 + x^2)^2 Sinh((7 π x)/3));

ContourPlot(f(x, y), {x, 3.42, 3.5}, {y, 0.5, 1.5},
PlotPoints -> 75, MaxRecursion -> 5)
``````

If the curves intersect then the derivative in each direction should be zero at that point (a minimum in `x` and a maximum in `y`).

``````eqns = Assuming(342/100 < x < 35/10 && 1/2 < y < 3/2,
Thread(D(f(x, y), {{x, y}}) == {0, 0}) // Simplify);

(sol = FindRoot(eqns, {{x, 346/100}, {y, 1}},
WorkingPrecision -> 50)) // N

(* {x -> 3.46573, y -> 1.04679} *)
``````

Verifying,

``````Flatten({eqns, D(f(x, y), {x, 2}) > 0, D(f(x, y), {y, 2}) < 0}) /.
sol

(* {True, True, True, True} *)
``````

Zooming in

``````ContourPlot(f(x, y) == 0, {x, 3.4656, 3.4659}, {y, 1.0465, 1.0472},
PlotPoints -> 75, MaxRecursion -> 5, ContourShading -> False)
``````