Integrals and Intermediate value theorem I was reading the following article http://davidlowryduda.com/?p=1259 regarding derivatives and integrals. In the first part of the Integrals when the author is explaining the derivative of the Area Function he defined he mentions that the Area from $x$ to $x+h$ is the same as the area of a rectangle with length $h$ and height of some value between the range of $f$ on $[x,x+h]$ The author appeals to the intermidiate value theorem as why this is true. But I am really confused and unable to understand why the area is the same if a select any value for the height that is between that domain. Sorry I can't be more clear I know that to understand my question you have to read that part of the article but I don't know how to put a graph here. 
 A: Suppose $f(z)$ is continuous and non-negative for $z\in [x,x+h]$, with $h>0$.
Let  $S$  be the region bounded by the axis $A=\{(z,0):z\in R\}, $ by the vertical lines $L_1=\{(x,y):y\in R\}$ and $L_2=\{(x+h,y):y\in R\}$, and by the graph of $f$.
Let $S_m$ be  the region  bounded by $A$, by $L_1$ and by $L_2$, and by the horizontal line $\{(z,m):z\in R\}, $ where $m=\inf \{f(z):z\in [x,x+h]\}$.
Let $S_M$ be the region bounded  by $A$, by $L_1$ and by $L_2$, and by the horizontal line $\{(z,M):z\in R\}$, where $M=\sup \{f(z):z\in [x,x+h]$.
Then $S_m\subset S \subset S_M.$ Therefore    $h m=Area(S_m)\leq Area(S)\leq Area(S_M)=h M.$ So we have  $$m\leq \frac {1}{h} Area(S)\leq M.$$ 
Since $f$ is continuous we have $\{f(z):z\in [x,x+h]\}=[m,M]$. (This is the intermediate-value-property of a continuous function.) Now since $\frac {1}{h} Area(S)\in [m,M]$ there must be at least one $c\in [x,x+h]$ with $f(c)=\frac {1}{h} Area(S)$, that is, $$h f(c)=Area(S).$$
Remark: The continuity of $f(z)$ for $z\in [x,x+h]$ also ensures that the real numbers $m$ and $M$ exist. In fact the continuity of $f(z)$ for $z\in [x,x+h]$ implies that $m=\min \{f(z):z\in [x,x+h]\}$ and that $M=\max \{f(z):z\in [x,x+h]\}.$
