# Compute lower and upper sum for Riemann integral

1. Aug 17, 2012

### rayman123

1. The problem statement, all variables and given/known data
let $$f(x)=x^2$$ Calculate upper sum and lower sum on the interval $$[-2,2]$$ when n=2

3. The attempt at a solution
since n=2 I divide the interval into
$$[-2,0]\cup[0,2]$$

then on the interval $$[-2,0]$$ the function $$f(x)=x^2$$ has the highest valute at $$x=-2, f(-2)=4=M_{0}$$ and the lowest value is at $$x=0, f(0)=0=m_{0}$$

on the interval the situation is the same $$x=0, f(0)=0=m_{1}$$(again the lowest value) ,and at $$x=2, f(2)=4=M_{1}$$(the highest value)

thus upper sum will be
$$S_{n}=M_{0}\cdot \Delta x+M_{1}\cdot \Delta x$$ where $$\Delta x=2$$
$$S_{n}=4\cdot 2+4\cdot 2=16$$
lower sum
$$s_{n}=0\cdot 2+0\cdot 2=0$$
and here I am a bit confused cause in my homework it says'' if you calculated correctly then the difference between lower sum and upper sum should be 16'' well here it would not work....where do I make mistake?

any help appreciated

2. Aug 17, 2012

### micromass

Staff Emeritus
This does not look correct...

3. Aug 17, 2012

### rayman123

it should be 16, it was a typo but this still does not show me the error

4. Aug 17, 2012

### micromass

Staff Emeritus
Isn't the difference between the lower sum and the upper sum 16 now??

5. Aug 17, 2012

### rayman123

the difference is $$s_{n}-S_{n}=-16$$

6. Aug 17, 2012

### micromass

Staff Emeritus
Yeah, of course since $S_n$ is always larger than $s_n$.

But with difference, they don't literally mean $s_n-S_n$ here. Rather, they mean something like $|s_n-S_n|$.

7. Aug 17, 2012

### rayman123

thank you :) now I see