I would like to plot two functions and shade in the area between them to illustrate an integration example.

I have this into mathematica:

Plot[{4 - x^2, 8 - 2 x^2}, {x, -2, 2}]

with this result:

enter image description here

I tried using the drawing tools to no avail. Is there a simple way to shade in the contained region between the two plots?

Thanks in advance!

  • 3
    $\begingroup$ Plot[{4 - x^2, 8 - 2 x^2}, {x, -2, 2}, Filling -> {1 -> {2}}] $\endgroup$ – eldo Jan 11 '16 at 2:20
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Jan 11 '16 at 2:56


Plot[{4 - x^2, 8 - 2 x^2}, {x, -2, 2}, Filling -> {1 -> {2}}]






Filling between curves


@Jason B

|improve this answer|||||

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