# How to show critical points of function?

I have the following code:

ContourPlot3D[2x*z + 2y*z - y^3 - x^2 - 3z^2, {x, -3, 3}, {y, -3, 3}, {z, -3,3}]


which correctly produces a 3D plot of the function specified.

I was wondering if there was a way to demonstrate the critical points of the function on this plot? There are two:

• (1/6,1/3,1/6) - local max

One way to do this is to use Show, to combine two graphics:

Show[
ContourPlot3D[
2 x*z + 2 y*z - y^3 - x^2 - 3 z^2, {x, -3, 3}, {y, -3, 3}, {z, -3,
3}],
Graphics3D[{PointSize[Large], Red, Point[{0, 0, 0}],
Point[{1/6, 1/3, 1/6}]}]
]

• Not possible in 3D with Epilog, as anything in the Epilog is taken to be 2D and rendered on top. – Szabolcs Oct 1 '19 at 11:32
• It is better to add ContourStyle -> Opacity[0.5] or another appropriate value to ContourPlot3D to show points behind the surface. And probably Mesh -> None, but I'm not sure what picture OP want. – Alx Oct 1 '19 at 11:34
• @Szabolcs Indeed, I read the documentation after writing the answer :) It seems strange to me that there's nothing like Epilog3D. – Carl Lange Oct 1 '19 at 12:16
• I think it might be because in 3D it doesn't make sense to have a layer behind (Prolog) and a layer in front of (Epilog) of the main graphics, like it does in 2D. (Of course, even if it doesn't make physical sense, it can certainly be rendered that way on a computer.) – Szabolcs Oct 1 '19 at 14:15

1. Show with ContourStyle:

Show[
ContourPlot3D[2 x*z + 2 y*z - y^3 - x^2 - 3 z^2, {x, -3, 3}, {y, -3, 3}, {z, -3, 3},
ContourStyle -> Opacity[0.5]],
Graphics3D[{PointSize[Large], Red, Point[{0, 0, 0}], Point[{1/6, 1/3, 1/6}]}]]


2. Graphics objects merging:

gr = ContourPlot3D[2 x*z + 2 y*z - y^3 - x^2 - 3 z^2, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}];
Graphics3D[{Opacity[0.5], gr[], Opacity, {PointSize[Large], Red, Point[{0, 0, 0}], Point[{1/6, 1/3, 1/6}]}}, Axes -> True] 