Is $\int_0^2 f(x) dx$ defined for $f(x)=x,x \ne 1$? Let $f(x)=x,x \ne 1$.
Is $$\int_0^2 f(x) dx$$ defined?
I'm currently a high school student, and we learn that the integral is the area under the graph. But in calculus textbooks and websites, I see some stuff about "continuity" and things being "integrable". So I was wondering if this simple case is considered "integrable" (because $\lim_{x\to1} f(x)$ is defined) or not (because it has a value "missing" altogether, rather than being discontinuous but still integrable like a step function).
Thanks!
 A: To integrate a function over an interval $A=[a,b]$, the function must be defined on all $A$.
If $f$ is not defined on a finite number of points $x_1, \dots, x_n \in A$, you can still try to give the integral a well-defined value using the Cauchy principal value, which simply means we integrate around all the discontinuities: 
If $x_1 < x_2 < \dots < x_n$, we define
$$I=P.V.\int_a^b f(x)\,dx := \\
\lim_{\epsilon\to0} \left(\int_a^{x_1-\epsilon}f(x)\,dx+\int_{x_1+\epsilon}^{x_2-\epsilon}f(x)\,dx+\cdots+\int_{x_n+\epsilon}^{b}f(x)\,dx\right)$$
In this case, we have 
$$P.V. \int_0^2 f(x)\,dx = \\
\lim_{\epsilon\to0} \left(\int_0^{1-\epsilon} x\,dx+\int_{1+\epsilon}^{2} x\,dx\right) =\\
 \lim_{\epsilon\to0}\left(\frac{(1-\epsilon)^2}{2}+\frac{2^2}{2}-\frac{(1+\epsilon)^2}{2}\right) = 2$$

Incidentally, you can alternatively define $f(1)=c$ to be any value so that the integral is then well-defined. Then the integral would equal
$$\int_a^bf(x)\,dx = \int_0^1 x\,dx + \int_1^1 c\,dx + \int_1^2 x\,dx = 2$$
which is the same value as before. You can further generalize this principle, and say that if
$$f(x) =
  \begin{cases}
    x       & \quad \text{if } x \neq x_i \text{ for all }i=1\dots n\\
    c_i  & \quad \text{if } x = x_i\text{ for some }i=1\dots n\\
  \end{cases}$$
the value of the integral remains unchanged:
$$\int_0^2 f(x)\,dx=2$$
A: Technically speaking, no, it isn't, since the function needs to be defined on the entire interval $[0,2]$ for the integral over $[0,2]$ to be well-defined. That said, you can define $f(1)$ however you want so that you have a function defined on $[0,2]$; if you do this, the integral is defined and its value is $2$.  
A: To integrate a function over a region, say $[a,b]$, $f(x)$ must be well-defined on that region. Here $f(x)$ is not defined at $x=1$. So you can not integrate. Given the question you ask, this is enough to answer your question. But if you want to know more, note that you can assign any real value at $x=1$ to make the function well-defined, and then  you can do the following:
$f(x)=x$, $x\neq 1$. Then $f(x)$ may not be continuous at $x=1$.
Then take $f(1)=a$, here $a$ may not be $1$.
But note this: For any $\epsilon>0$,
$$\int_{0}^{2}f(x)dx=\int_{0}^{1-\epsilon}f(x)dx+\int_{1-\epsilon}^{1+\epsilon}f(x)dx+\int_{1+\epsilon}^{2}f(x)dx$$
So what is going on here?
(1) You know that $\int_{c}^{c}g(x)=0$, for any function $g(x)$, since integration over a single point is $0$, and it does not depends on continuity.
Now $$\int_{0}^{1-\epsilon}f(x)dx=\Big[\dfrac{x^2}{2}\Big]_{0}^{1-\epsilon}=\dfrac{(1-\epsilon)^2}{2}\space\text{and}\space\int_{1+\epsilon}^{2}f(x)dx=\Big[\dfrac{x^2}{2}\Big]_{1+\epsilon}^{2}=\dfrac{4-(1+\epsilon)^2}{2}$$
But using (1), $$\lim_{\epsilon\to 0}\int_{1-\epsilon}^{1+\epsilon}f(x)dx=\int_{1}^{1}adx=0$$
Hence the answer is $$\int_{0}^{2}f(x)dx=\lim_{\epsilon\to 0}\Big(\dfrac{(1-\epsilon)^2}{2}+\dfrac{4-(1+\epsilon)^2}{2}\Big)=2$$
A: The Riemann integral over [0,2] is not define at all since f is not defined at 1, and hence not defined on the interval as a whole. This is not just a technicality. The integral is no more defined on [1,1] than the value of the function is at x=1. It is not a technicality - but it is a removable problem.
If a well behaved f is extended to [0,2] by stating any finite real value at 1, then the integral is defined and the value is independent of the choice of finite value at 1. But, if distributions are accepted to extend f, then an impulse at x=1 would produce a different value for the integral depending on the height chosen for the impulse. 
If the integration is taken with respect to a measure, then the choice of measure on the singleton interval [1,1] will affect the integral as well.
The Cauchy principle value approach is to take limits near a singularity. The Cauchy principle value specifies the manner of taking that limit. But, the exact way in which that limit is taken can change the value obtained for the integral, or make it undefined. So, one can only say that the Cauchy principle value integral is such and such. In this case if f was continuous to begin with the value is independent of the limit. But if it f is not continuous then the integral might vary.
Perhaps counter-intuitively, what makes a function more seriously non integrable is strong enough failure to be continuous. Although an occasional jump discontinuity is no problem. If there is an infinite number of discontinuities in a finite region, then the failure of the existence of a representative value for the function on any finite interval leads to failure of the attempt to integrate.
That is - all the above was a discussion of removable problems in integration, but functions that take on one value at rationals and others at irrationals can be much more seriously non integrable due to their inherent nature - not just their context.
Lebesgue integral, Henstock, Kurzweil, etc - there are many ideas for what an integral is, just like there are many ideas for the sum of an infinite series (eg the Cesaro sum). Hardy wrote a book on the manipulation of classically non convergent series, for example. See also - Pfeffer, the Riemann approach to integration. It discusses a number of the issues of integrability from a fairly concrete perspective.
A: A single bad point in the interval that is integrated has zero Lesbegue measure, so it has zero impact on the integral.   However, study of Lesbegue theory of measure and integration is normally done in a graduate level class on analysis of functions of real variables and you may not have been there yet.
If you limit yourself to the Riemann method of integration, you cannot define the upper and lower sums for that bad point, so the integral cannot be defined.
