Let $f$ be a decreasing function on $[0,1]$ with $f(0) = 7$ and $f(1) = 0$.

Show, using the definition of the Riemann sum, that the error in approximating $\int_{0}^{1}f(x)dx$ with a Riemann sum using right endpoints and n intervals of equal length is bounded above by $\frac{7}{n}$.

I don't seem to have any idea how to solve this question. Can someone please help me?

  • $\begingroup$ What is the max error over one of the intervals? Add them up. $\endgroup$ – almagest Apr 26 '16 at 11:53
  • $\begingroup$ Try to do the case $n = 1$ and $n = 2$ first. $\endgroup$ – levap Apr 26 '16 at 11:54
  • $\begingroup$ I thought of a solution. Is it correct -- We have the Riemann sum as f(1/n).(1/n) + f(2/n).(1/n) + f(3/n).(1/n) + ... . Now, Since f is decreasing between [0,1] and f(0) = 7 and f(1) = 0, f(x) <= 7. Therefore, f(x)/n <= 7/n. Therefore, The Riemann sum is bounded above by 7/n. Is this correct? $\endgroup$ – Anirudh Gangwal Apr 26 '16 at 12:06
  • 1
    $\begingroup$ Not quite. That would give you $49/n$. But the error for $f(\frac{k}{n})\cdot\frac{1}{n}$ is at most $(f(\frac{k-1}{n})-f(\frac{k}{n}))\cdot\frac{1}{n}$. So when you add them up it telescopes to $f(0)\frac{1}{n}$. $\endgroup$ – almagest Apr 26 '16 at 12:21
  • $\begingroup$ @almagest I don't understand. Could you please give a more elaborate solution? $\endgroup$ – Anirudh Gangwal Apr 26 '16 at 12:29

As you say the Riemann sum is $\sum_{k=0}^nf(\frac{k}{n})\frac{1}{n}$. Over the interval $(\frac{k-1}{n},\frac{k}{n})$ the function is decreasing and we picked the value at the right endpoint, which is the smallest value. So the biggest error in $f(x)$ for any point $x\in(\frac{k-1}{n},\frac{k}{n})$ is $f(\frac{k-1}{n})-f(\frac{k}{n})$. Hence the biggest possible error over that interval is $(f(\frac{k-1}{n})-f(\frac{k}{n}))\cdot\frac{1}{n}$.

Hence the max total error is $\frac{1}{n}\sum_{k=1}^n(f(\frac{k-1}{n})-f(\frac{k}{n}))$. The sum is $f(0)-f(\frac{1}{n})+f(\frac{1}{n})-f(\frac{2}{n})+\dots+f(\frac{n-1}{n})-f(1)$ which is just $f(0)-f(1)=7$. So the max total error is $\frac{7}{n}$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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