# Calculate $\int_0^2f(x)dx$ and $\int_0^2f_n(x)dx$.

Consider $f_n:[0,2]\longrightarrow\mathbb{R}$ given by $$f_n(x)=\left\{ \begin{array}{l l 1} n^3x^2, & \quad 0<x<1/n;\\ n^3\left( x-\frac{2}{n}\right)^2, & \quad 1/n \leq x < 2/n;\\ 0, & \quad \text{otherwise}. \end{array} \right.$$

I am interested in computing $\int_0^2f_n(x)\ dx$ and $\int_0^2 f(x)\ dx$, where $f(x)=\lim_{n\to\infty} f_n(x)$

Now I know how to calculate the definite integral of a function, but in this case $f_n(x)$ has three parts, so would I integrate each part and thus obtain three answers?

And would $\int_0^2f(x)dx$ be $f_n(x)$ when $n=1$?

-
Yes, you would integrate each part and add the answers. The first is pretty easy, the second is the same as the first(let $u=\frac 2n-x$) and the third is very easy. I would guess $f(x)=\lim_{n \to \infty} f_n(x)$ – Ross Millikan Feb 21 '13 at 23:00
Sorry forgot to mention, $f(x)=lim_{n\longrightarrow\infty}f_n(x)$. – Levi Feb 21 '13 at 23:04
Oh, good you tell, @Levi . Please do edit your question in order to add this important information... – DonAntonio Feb 21 '13 at 23:14

## 4 Answers

\begin{align} \int_0^2 f_n(x) dx & = \int_0^{1/n} f_n(x) dx + \int_{1/n}^{2/n} f_n(x) dx + \int_{2/n}^1 f_n(x) dx\\ & = \int_0^{1/n} n^3 x^2 dx + \int_{1/n}^{2/n} n^3 \left( x- \dfrac2n\right)^2 dx + \int_{2/n}^2 0 \, dx\\ & = \int_0^{1/n} n^3 x^2 dx + \int_{1/n}^{2/n} n^3 \left( x- \dfrac2n\right)^2 dx \end{align} And you need to tell us what $f(x)$ is.

-

For the purpose of building a very basic geometrical intuition, the integral can be seen as "the area under the curve". If the equation of the curve changes at some point, then that region is added up with the new equation. Say $$f(x)=\left\{ \begin{array}{l l 1} 1, & \quad 0<x<1;\\ 2, & \quad 1 \leq x < 2;\\ 3, & \quad \text{otherwise}. \end{array} \right.$$ Then $\int_0^3f(x)dx = 1.1+2.1+3.1 = 6$. Same idea when the formula is more complicated. More formally in the above case, $$\int_0^3f(x)dx = \int_0^1 1 dx + \int_1^2 2 dx + \int_2^3 3 dx = 1.(1-0) + 2.(2-1) + 3.(3-2) = 6$$

-
Yes... I tried to make this clearer now. – Gene Arboit Feb 21 '13 at 23:17

$\displaystyle \int_0^2 f_n(x) dx = \int_0^{\frac{1}{n}}n^3 x^2 dx \int_{\frac{1}{n}}^\frac{2}{n} n^3(x - \frac{2}{n})^2 dx$.

I'm assuming that $f(x) = \lim_{n\to\infty} f_n(x)$

-
I assume you wanted to add those two integrals. – Gerry Myerson Feb 21 '13 at 22:56

For example:

$$\int\limits_0^2f_n(x)\,dx=\int\limits_0^{1/n}n^3x^2dx+\int\limits_{1/n}^{2/n}n^3\left(x-\frac{2}{n}\right)^2dx=$$

$$=\left.\frac{n^3}{3}\left[x^3\right|_0^{1/n}+\left(x-\left.\frac{2}{n}\right)^3\right|_{1/n}^{2/n}\right]=\;\;\ldots$$

-