Let us start with reading the question.
The given function is
(x^3 y^5 E^(-2*z*n))/(x^2 + y^2)
this is dependent on x, y, z and n. So the function has to reflect this four parameters:
g[x_,y_,z_,n_]:=(x^3 y^5 E^(-2*z*n))/(x^2 + y^2)
The polynomial in the denominator has no zeros on the Reals
. The multinomial in the nominator has a coefficient functions that dominates in the cases n<0 in the positive first quadrant, for n>0 in the third negative quadrant. So it is not sensible to visualize the plot on these quadrants for AbsReal@x >1 && AbsReal@y >>1.
Whether a net is nicer or contours is a matter of taste.
The first answer causes problems in the plot surface:
.
As far as my insight the range {-10,10} addresses this as the main target. Since WorkingPrecision and MaxRecursion do not fix the problem for all parameter combinations the maximum limits are necessary. The borders of the surface can even get very rugged for {0,2}x{0,2}.
Such a realization looks smooth and allows insight:
Manipulate[
Module[{x, func, t, var},
If[plt == 1, var = "z"; func = g @@ Rationalize[{x, y, t, n}],
var = "y"; func = g @@ Rationalize[{x, t, z, n}]];
Plot3D[Table[func /. n -> m, {m, -4, 4, 2}], {x, -1, 1}, {t, -1, 1},
WorkingPrecision -> 20, MaxRecursion -> 5,
AxesLabel -> (Style[#, 14, Italic, Bold] & /@ {"x", var, "g "}),
ClippingStyle -> None,
PlotLabel ->
Style[StringForm["g = ``", g["x", "y", "z", "n"]], Italic, 14],
ImageSize -> 600]], {{y, 1}, -1, 1, 0.2,
Appearance -> "Labeled"}, {{z, 1}, -1, 1, 0.2,
Appearance -> "Labeled"}, {{plt, 2,
"Plot"}, {1 -> "Fixed value of y", 2 -> "Fixed value of z"}},
LabelStyle -> Medium]
It is based on the idea that the whole function set fits into a subregion of the unit cube. And it does bravely.
Plot[Table[g[x, 1, t, -1], {t, -2, 2, 1}], {x, -5, 5},
PlotRange -> {All, {-25, 25}}]
Table[Plot[Table[g[x, y, t, -1], {t, -2, 2, 1}], {x, -5, 5},
PlotRange -> {All, {-25, 25}}], {y, -8, 8, 2}]
This question smoothing 3d contours as post processing has an interesting answer.
To return to normal plotting just use PlotPlots
on the example given by @bob-hanlon and vary n
. That confuses but does not help at all. Forget about the built-in grids on surface and use a personal selection following this ideas: plot a 2d vector path onto a surface. This question is about artefacts in 3d plots. There are more nice ideas.
I will come back later.
y
andz
$\endgroup$n
explicit with e.g.g[x_, y_, z_, n_] := (x^3 y^5 E^(-2*z*n))/(x^2 + y^2); Manipulate[Plot[g[x, 1, 1, n], {x, -10, 10}, PlotRange -> Automatic], {n, -7, 7}]
Please check the linked post for more info. $\endgroup$