Show that the function is not Lebesgue Integrable Related to this question:
How do I show that $f(x)=\frac{(−1)^{n}}{n}$ for every $n⩽x<n+$ and $n\geq 1$ is not Lebesgue Integrable? I'm extremely confused by the notation.
What I need to show is the following: Given that $a_{n} = \int_{n}^{n+1}f$ $\forall n$, show that even though $\sum_{n=1}^{\infty}a_{n}$ converges, $f$ is not integrable over $[1,\infty)$.
It seems to me like $\frac{(-1)^{n}}{n}$ is more of an $a_{n}$, which adds to my confusion even more.
Please help! A full solution is preferred; remember that you are talking to an extremely confused and clueless person here.
 A: $f$ is Lebesgue integrable if $\int_1^\infty|f|<\infty$. Here are the graphs of $f$ and $|f|$. Can you see what's happening?
Graph of $f$

Graph of $|f|$

$a_n=\displaystyle\int_n^{n+1}f=\frac{(-1)^n}{n}$ and $\sum a_n$ converges. But $\displaystyle\int_n^{n+1}|f|=|a_n|$ and $\sum|a_n|$ diverges.
A: Seems you are talking about a family of functions dependent on a parameter:
$f_1\left(x\right)=\frac{\left(-1\right)^1}1,\;f_2\left(x\right)=\frac{\left(-2\right)^1}2,\cdots,\;f_n\left(x\right)=\frac{\left(-1\right)^n}n,\dots$
but all this functions are integrable, I think your problem is not about a family of functions, but a one function, 
$f\left(x\right)=\frac{\left(-1\right)^1}1+\frac{\left(-2\right)^1}2+\cdots\;+\frac{\left(-1\right)^n}n+\dots$
The series converges, but the function ... not sure. 
A: The theory of integration by Lebesgue is done in several steps. Start with a general measure space $(X,\cal{B},\mu)$:


*

*We define integration of simple positive functions: If $s$ is simple and positive, it can be uniquely written as $s=\sum a_i\chi_{A_i}$, where $a_i>0$ are distinct and the $A_i$ are disjoint (here, $\chi_A$ denotes the characteristic function of a set $A$). Define $\int sd\mu=\sum_i a_i\mu(A_i)$, which can be infinite.

*Then we prove linearity and monotonicity of integration for positive simple functions.

*After this, consider any positive measurable map $f:X\to\mathbb{R}$. Then there exists a sequence $(s_n)$ of simple functions such that $s_n(x)$ is increasing for all $x$ and converges to $f(x)$. Define $\int fd\mu=\sup_n\int s_nd\mu$. Again, this can be infinite.

*Then we need to show that the definition of $\int fd\mu$ does not depend on the given sequence $(s_n)$, and prove the usual properties of integration. ****We are still only considering positive maps**.

*Finally, we define integration for general maps. Given $f:X\to\mathbb{R}$ any measurable map, we consider it's positive and negative parts $f^+=\max(f,0)$ and $f^-=\max(-f,0)$, so that $f=f^+-f^-$.


Definition: A function $f$ is integrable iff $\int f^+d\mu<\infty$ and $\int f^-d\mu<\infty$. In this case we put $\int fd\mu=\int f^+d\mu-\int f^-d\mu$.


*

*After this, we can finally prove the usual properties of integration (linearity, monotonicity,...)


Then we can prove the following proposition.
Proposition: $f$ is integrable iff $|f|$ is integrable.
All of this is basically the definition of what it means for a function to be (Lebesgue) integrable. Try to use the proposition above for your given function. In this case, $|f|(x)=1/n$ when $n\leq x<n+1$.
More details: Let $\lambda$ be the Lebesgue measure. We will use monotone convergence. Define $g_n$ to be the restriction of $f$ to $[1,n+1)$. In this case, $g_n$ is a simple function: $g_n=\sum_{i=1}^n\frac{1}{n}\chi_{[i,i+1)}$. By definition of integration for simple functions,
$$\int g_nd\lambda=\sum_{i=1}^n\frac{1}{n}\lambda([i,i+1))=\sum_{i=1}^n\frac{1}{n}$$.
Then $g_n$ is increasing and converges pointwise to $|f|$. By monotone convergence,
$$\int |f|d\lambda=\lim_n\int g_nd\lambda=\lim_n\sum_{i=1}^n\frac{1}{n}=\sum_{i=1}^\infty\frac{1}{n}=\infty$$
so $f$ is not integrable.
A: I now understand the function definition.  It would less misleading if it were written using the floor function, specifically,
$$
f(x)=\frac{(-1)^{\lfloor x\rfloor}}{\lfloor x\rfloor}.
$$
If you look at the response given with the graph, you'll notice that the harmonic series is involved, which should give you the non-integrability.
