A question on numerical approximation scheme for an integral and functions for which the scheme is exact

24 Views Asked by At

For $f \in C[0,1]$ and $n>1,$ let $T(f)=\frac{1}{n}[\frac{1}{2}f(0)+\frac{1}{2}f(1)+\sum_{j=1}^{n-1}f(\frac{j}{n})]$ be an approximation of the integral $I(f)=\int_{0}^{1}f(x)dx.$ For which of the following functions $f$ is $T(f)=I(f)$ ?

  1. $1+\sin 2\pi nx$
  2. $1+\cos 2\pi nx$
  3. $\sin^2 2\pi nx$
  4. $\cos^2 2\pi (n+1)x$

My attempt: My first observation is that taking the limit as $n \to \infty$ in $T(f)$ gives the identity. So, we are mainly concerned in finding the functions $f$ for which the expression for $T(f)$ is true for all $n>1.$ Setting $n=2,$ I have eliminated the options 2), 3) and 4). So, the answer is 1), which is correct as per the answer key.

But I do not want to solve this problem by eliminating the options. Rather I want a straight-forward solution as to why 1) is true for all $n>1$ and what property does 1) have that 2), 3) and 4) do not. My intuition says that there must be some analytical method or some sort of a condition on $f$ so that $T(f)=I(f)$ is true. I am confused as how to obtain that condition, if at all there exists one. Please help.

Thanks in advance.

1

There are 1 best solutions below

1
On

For any $n>1, f(x)=1+\sin 2 \pi nx, $ we have that $f(0)=f(1)=1$ and that $f(\frac{j}{n})=1+\sin 2 \pi n (\frac{j}{n})=1+ \sin 2 \pi j =1,$ for all $j=1,2,\dots,n-1.$

So, we have that $T(f)=\frac{1}{n}[\frac{1}{2}f(0)+\frac{1}{2}f(1)+\sum_{j=1}^{n-1}f(\frac{j}{n})]=\frac{1}{n}[\frac{1}{2}+\frac{1}{2}+(n-1)\times 1]=\frac{1}{n}[1+n-1]=1.$

Also, we can easily see that $\int_{0}^{1} [1+ \sin (2\pi nx)] dx =1.$

So, we have the equality for 1).