# Example of a sequence of continuous function satisfying some properties

Find sequence of continuous functions $f_n : [0,1] \rightarrow \mathbb{R}$ converging pointwise on $[0,1]$ to a continuous function $f$ and such that $\int_ 0^1 f_n(x)dx = 2$ and $\int_0^1 f(x)dx = 1$.

Consider: $f_n$ =\begin{cases} 0 & x =0 \\ n & 0<x\leq \frac{1}{n} \\ 0 & \frac{1}{n}<x \leq 1 \end{cases}

I believe the sequence satisfies all the conditions except $\int_ 0^1 f_n(x)dx = 1$ and not 2. How to fix this?

• Let $f_n(x) = 2n$ on $(0, 1/n]$ – Quoka Feb 5 '18 at 4:02
• $f_n$ 's are supposed to be continuous. Both Dom and MathUser_NotPrime has given discontinuous functions. – Kavi Rama Murthy Feb 5 '18 at 7:43

Let $f_n(0)$ be $2n+1,$ $f_n(1/n)$ be $1$, and let $f_n(x)=1$ on $(1/n,1]$. On $(0,/1n)$ linearly interpolate the values.