How can I plot implicit equations?

39

10

If you enter the following into Wolfram | Alpha, you get nice graphs:

graph 4 x^4 + y^2 = 2 

enter image description here

How do you do this in Mathmatica? I realize that these are not functions, because the graphs do not pass the straight line test. But what does Wolfram Alpha do to put these things into something that Mathematica can understand?

Rollie

Posted 2013-10-24T13:31:51.130

Reputation: 461

5Welcome, Rollie, to Mathematica SE. Please don't be put off by the down votes you received. I realize that you just joined the web site today. When you examine the posted questions, you'll quickly get a sense of the sorts of issues typically raised. Generally speaking, you'll be expected to post a question that you have researched about on this site and in the Mathematica documentation. Furthermore, it's a good idea to show what you've already tried (including Mathematica code) and the results you got. – DavidC – 2013-10-24T13:50:56.567

There's a great example here: http://forums.wolfram.com/mathgroup/archive/2008/May/msg00021.html

– Chris Degnen – 2018-04-23T17:48:35.390

Answers

40

In v8, you can type input

= graph 4 x^4 + y^2 = 2

The first equal sign tells Mathematica to query WolframAlpha. The result is the command

ContourPlot[4*x^4 + y^2 == 2, {x, -1.1, 1.1}, {y, -1.8, 1.8}]

followed by the plot.

Timothy Wofford

Posted 2013-10-24T13:31:51.130

Reputation: 3 713

5This answer is especially useful in pointing to how one can get WolframAlpha to show the corresponding Mathematica input. – murray – 2014-03-17T22:01:52.473

In recent years, Wolfram|Alpha will have a "Show Code" option under many of its outputs. – Max Coplan – 2018-04-23T19:10:50.377

27

The forms you wish to plot are called implicit equations. Type "implicit equation" into the search input field of the Mathematica Documentation Center. The second hit will be ContourPlot. On that documentation page, under Applications, you will find the following, which tells you everything you need to know about making the kind of plots you want.

ContourPlot.png

m_goldberg

Posted 2013-10-24T13:31:51.130

Reputation: 104 223

5

I had a similar cuestion so I am going to post my cuestion and the answer that I got to complete this post. Here is the link Projection on the xy–plane of the curve of intersection of both surfaces

Quiestion

REspuesta

Damian Muciño

Posted 2013-10-24T13:31:51.130

Reputation: 81

a) attribution to the author would be on point. b) as well as a copyable code. c) wouldn't it be better to give an example using the equation from this question? – Kuba – 2018-04-23T19:30:05.813