The mean value theorem for integrals and Maple

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
Science4ver
Messages
35
Reaction score
0

Homework Statement



I have function f which is defined upon an interval [a,b]. I have calculated the mean value using the theorem

[itex]\frac{1}{b-a} \int_{a}^b f(x) dx[/itex]

What I would like to do is to plot in Maple the mean value rectangle. Where the height of this rectangle represents the mean value of f(x) with respect to the interval [a,b].

Is this possible in Maple? If yes anyone who would like to share the Maple command for it?

Thanks in advance :)
 
Physics news on Phys.org
Science4ver said:

Homework Statement



I have function f which is defined upon an interval [a,b]. I have calculated the mean value using the theorem

[itex]\frac{1}{b-a} \int_{a}^b f(x) dx[/itex]

What I would like to do is to plot in Maple the mean value rectangle. Where the height of this rectangle represents the mean value of f(x) with respect to the interval [a,b].

Is this possible in Maple? If yes anyone who would like to share the Maple command for it?

Thanks in advance :)

If you mean that you want to plot both f(x) and its mean = m over [a,b], just use the command
plot([f(x),m],x=a..b);
Whether you use f(x) or just f in the plot command depends on whether f is a function or a formula. You can also choose the plot colours, such as
plot([f(x),m],x=a..b,color = [red,blue]); being a Canadian product, Maple also let's you say colour = ... if you prefer (which I do).