# [✓] CountourPlot of (Cos(2x))^2 ==0 ?

GROUPS:
 Hello,I am trying to plot the countour curve of (cos(2x))^2 ==0 on the xy-plane for {x, -pi/2, pi/2} and {y,0,2pi}, but the results is an empty plot in mathemaitca. However, I obtained the correct plot for cos(2x)==0.I used the following command lines: ContourPlot[Cos[2x]^2 ==0, {x, -Pi/2, Pi/2}, {y, 0, 2Pi}] How can I get the correct graph for this?Thank you,Bhagya
1 year ago
7 Replies
 Valeriu Ungureanu 2 Votes It's interesting that the graph may be obtain if the right part is not exactly $0$: ContourPlot[ Cos[2 x]^2 == 0.000000000000000001, {x, -\[Pi]/2, \[Pi]/2}, {y, 0, 2 \[Pi]}] 
1 year ago
 Gianluca Gorni 2 Votes The numerical algorithms of ContourPlot assume nonzero derivative, or transversality, otherwise they may fail spectacularly: ContourPlot[x^2 == 0, {x, -1, 1}, {y, 0, 1}] In your case you get a correct plot by symbolic pre-processing: ContourPlot[ Evaluate[List @@ Reduce[Cos[2*x]^2 == 0 && -Pi/2 < x < Pi/2, x, Reals]], {x, -Pi/2, Pi/2}, {y, 0, 2 Pi}] 
1 year ago
 Apropos, dear Gianluca,How to interpret the following? ContourPlot[x^2 == .0001, {x, -1, 1}, {y, -1, 1}]  ContourPlot[x^2 == .0001, {x, -1, 1}, {y, -1, 1}, PlotRange -> All] 
1 year ago
 Apropos, dear Gianluca,How to interpret the following? ContourPlot[x^2 == .0001, {x, -1, 1}, {y, -1, 1}]  ContourPlot[x^2 == .0001, {x, -1, 1}, {y, -1, 1}, PlotRange -> All] 
1 year ago
 There are curious discretization artifacts: ContourPlot[x^2 == 1/10000, {x, -1, 1}, {y, -1, 1}, PlotRange -> {{.0022, .01}, {-.3, .3}}] ContourPlot[10000 x^2 == 1, {x, -1, 1}, {y, -1, 1}, PlotRange -> {{.0022, .01}, {-.3, .3}}] Also, in the current Mathematica version the tooltip looks like a job left incomplete.
1 year ago
 Really curious... You are right!
1 year ago
 And one more additional curiosity: ContourPlot[x^2 == 1/10000, {x, -1, 1}, {y, -1, 1}, PlotRange -> {{.0022, .01}, {-.3, .3}}, PlotPoints -> 30] ContourPlot[10000 x^2 == 1, {x, -1, 1}, {y, -1, 1}, PlotRange -> {{.0022, .01}, {-.3, .3}}, PlotPoints -> 30] Why are not identical the results?