Question: How to Create a Better Plot for Shaded Area Under an Integral?

Hi everyone,

I am trying to visualize the integral of x3 over the interval x=−1 to x=1. I tried using:

with(plots):
display(
   plot(x^3, x = -1 .. 1, color = black, thickness = 2),
   shadebetween(x^3, 0, x = -1 .. 1, color = cyan)
);

This works, but I wondered if there’s a better or more elegant way to visualize definite integrals. For example:

  • Can I add transparency to the shaded region?
  • Is there a built-in function that directly plots definite integrals with shading?
  • Any tips for improving the aesthetics of such plots?

Thanks in advance for any help!

Download εμβαδόν_χωρίου.mw

Please Wait...