# weird behavior of Plot3D [closed]

I am just trying to plot a very simple function:

Plot3D[Abs[(2 Sqrt[n (1 + n)]Cos[4 Pi q])/((1 + 2 n) (-1 - 2 n - 2 n^2 + 2 n (1 + n) Cos[2 (4 Pi q)]))] - (2 n (1 + n) Sin[4 Pi q]^2)/(-1 - 2 n - 2 n^2 + 2 n (1 + n) Cos[2 (4 Pi q)]), {q, 0, 3}, {n, 0, 3}, PlotRange -> {0, 1}]


and I get a weird plot:(BTW, I cannot save this plot, it says "The specified setting for the option WindowSize cannot be used.") Now I just change the range of q from 0~3 to 0~1:

Plot3D[Abs[(2 Sqrt[n (1 + n)]Cos[4 Pi q])/((1 + 2 n) (-1 - 2 n - 2 n^2 + 2 n (1 + n) Cos[2 (4 Pi q)]))] - (2 n (1 + n) Sin[4 Pi q]^2)/(-1 - 2 n - 2 n^2 + 2 n (1 + n) Cos[2 (4 Pi q)]), {q, 0, 1}, {n, 0, 3}, PlotRange -> {0, 1}]


Now I get a reasonable result: Can anyone tell me what is going on here? Thanks!

• What do you think is "weird" about it? You can use PlotPoints->100 to get better resolution, but until we know what "weird" means, we can't help you. Mar 3 '17 at 19:03

PlotPoints -> 100 fixes everything.