0
$\begingroup$

I have this second-order polynom:

$$ 6xy+8y^2-12x-26y+11=0 $$

And I need to reduce it to a canonical form of a second-order curve. I solved this, but is it possible to draw a plot of the original equation to check whether my solution is correct? Something like

Plot[6 x*y + 8 y^2 - 12 x - 26 y + 11, {x, -20, 20}, PlotRange -> {-20, 20}]

Now this draws an empty plot.

Thank you.

$\endgroup$
2
  • 2
    $\begingroup$ Look up ContourPlot. Also, you need a space between x and y, otherwise it denotes a different variable named xy. $\endgroup$
    – user484
    Commented Jul 29, 2014 at 8:13
  • $\begingroup$ @RahulNarain thank you for spotting xy. $\endgroup$
    – d.k
    Commented Jul 29, 2014 at 8:15

1 Answer 1

2
$\begingroup$

As @Rahul said in a comment (beat me to it!), have a look at ContourPlot:

ContourPlot[
  6 x y + 8 y^2 - 12 x - 26 y + 11 == 0, 
  {x, -20, 20},
  {y, -20, 20}
]

Mathematica graphics

$\endgroup$
4
  • $\begingroup$ could you suggest how can I draw the x and y axes on this plot, please? $\endgroup$
    – d.k
    Commented Jul 29, 2014 at 8:23
  • $\begingroup$ @user5693 Then you can give the option FrameLabel: ContourPlot[...., FrameLabel -> Automatic]. This is actually given in the documentation (admittedly buried a bit, but still). $\endgroup$ Commented Jul 29, 2014 at 8:31
  • $\begingroup$ sorry, my question was incorrect to some point. I meant to set axes origin at 0,0, is it possible? Google says nothing $\endgroup$
    – d.k
    Commented Jul 29, 2014 at 8:32
  • 1
    $\begingroup$ @user5693 Ah sorry I misunderstood; that's ContourPlot[..., Axes -> True, Frame -> False]. (Can also be found in the documentation of ContourPlot!). $\endgroup$ Commented Jul 29, 2014 at 8:36

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