# Extending a 2d plot to 3d

So having trouble making a plot of this potential in 3D

$$\ U(x) = \frac{k^2}{4g} - \frac{k}{2}x^2 + \frac{k}{2}x^4$$

This is what I have for 2D

setting k = 1 and g = 1

U[x_] := .25 - .5 x^2 + .5 x^4

Plot[U[x], {x, -1.5, 1.5}]


How do I extend this to 3D with mathematica ?

• What's the second variable besides $x$? – corey979 Sep 11 '19 at 22:27
• Not sure I need one as just extending the a simplified version of the higgs potential. The RevolutionPlot3D function does the job . – iggy002 Sep 11 '19 at 22:39
• @corey979 forgot to tag you, do you know of another way to solve this problem? – iggy002 Sep 12 '19 at 21:20

RevolutionPlot3D[1/4 - x^2/2 + x^4/4, {x, 0, 1.5}]

• You're welcome. Note that you have a difference in a factor of $1/2$ in your $x^4$ term.... – David G. Stork Sep 11 '19 at 22:34