Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was just wondering, how do I plot a single variable inequality in Mathematica?

For example, we could use Wolfram Alpha for plotting an inequality like $x^3+4x+9 > 0$ and see something like this. How could we do the same thing in Mathematica?

share|cite|improve this question
up vote 4 down vote accepted

How about this?

Plot[x^3+4x+9, {x,-2,2}, Filling->{1->{Axis, {White, LightBlue}}}]

Or, if you have two functions, and want where first curve is above the second, use

Plot[{x^3+4x+9,6x^2}, {x,-2,2}, Filling->{1->{{2}, {White, LightBlue}}}]

for example.

share|cite|improve this answer
Could you explain the plot?Especially the filling side,I haven't did anything using filling before. – Quixotic Oct 16 '11 at 14:31
Well, I suggest you read about the Filling option in the excellent help that accompanies Mathematica. Press F1, search for Filling. – Per Alexandersson Oct 16 '11 at 16:03

There is also RegionPlot[]:

RegionPlot[x^3 + 4 x + 9 > y, {x, -2, 2}, {y, 0, 25}]

plots the part in blue.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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