Let's inspect the function $f: [0,1] \rightarrow \mathbb{R}$, where $$f(x) = \begin{cases} (-1)^{k}, & \mbox{if } x \in (\frac{k-1}{k},\frac{k}{k+1}]\mbox{ for some k} \in \mathbb{N} \\ 0, & \mbox{if } x=0 \end{cases}$$
Is $f$ integrable in $[0,1]$?
My idea is to use the basic knowledge of integration such as:
If bounded function $f:[a,b]\rightarrow \mathbb{R}$ has only finite number of points of discontinuity, then $f$ is integrable.
Still I am not sure how to use that fact of basic knowledge to solve the task. I have an exam in three days so any explanations and help will be greatly appreciated.
Hopefully it helps me to understand basic pirinciples better and return the favour for the community in the future :).
EDIT: Here is the full argument without using Lebesgue Criterion
I am using following theorem to show your function is integrable.Following theorem is easy to prove.
proof :
1)pick arbitrary $x<1$ we know that there is $k \in \mathbb{N}$ s.t $x <\frac{k+1}{k} <1$ because $\lim_{k \rightarrow \infty} \frac{k+1}{k} =1$
2)Now we know that there atmost finite number of discontinuities on $[0, \frac{k}{k+1}]$ hence your function is integrable on $[0, \frac{k}{k+1}]$
3)Since this holds for arbitrary $x$ we can say that function is integrable on interval $[0,x]$ for any $x<1$
4)use above theorem to conclude that function is integrable on $[0,1]$
Moreover, Since you have that function is integrable, We can now calculate it's value.Specifically we can show that
$$\int_{0}^1 f = \lim_{n \rightarrow \infty} \sum_{k=1}^{n} \int_{\frac{k-1}{k}}^{\frac{k}{k+1}} f $$
Function can be discontinuous atmost at each interval point. So,Your function has atmost countably infinite number of discontinuities.
In your case set of discontinuities has measure $0$. Hence your function is Riemann Integrable