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}]

enter image description here

How do I extend this to 3D with mathematica ?

  • 2
    $\begingroup$ What's the second variable besides $x$? $\endgroup$ – corey979 Sep 11 at 22:27
  • $\begingroup$ Not sure I need one as just extending the a simplified version of the higgs potential. The RevolutionPlot3D function does the job . $\endgroup$ – iggy002 Sep 11 at 22:39
  • $\begingroup$ @corey979 forgot to tag you, do you know of another way to solve this problem? $\endgroup$ – iggy002 Sep 12 at 21:20
RevolutionPlot3D[1/4 - x^2/2 + x^4/4, {x, 0, 1.5}]

enter image description here

  • $\begingroup$ Thank you , that is exactly what I was looking for. I was not aware of RevoultionPlot3D . $\endgroup$ – iggy002 Sep 11 at 22:33
  • $\begingroup$ You're welcome. Note that you have a difference in a factor of $1/2$ in your $x^4$ term.... $\endgroup$ – David G. Stork Sep 11 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.