Can a discontinuous function be integrable? In the chapter on integration in Micheal spivak's book Calculus, when he was proving theorem 8 he showed a figure of the integral of a discontinuous function (available at the end of this question). My question is, how can a discontinuous function be integrable? If the integral of a function is the area under the curve, how can we calculate an area which is not fully closed from it's beginning to it's end?

 A: The word "area" doesn't exist unless you assign a meaning to that word. In Calculus, one generally refers to a bounded real valued function $f$ on the real numbers being integrable on an interval $[a,b]$ iff
$$\begin{align}\sup\left\{\sum_{i=1}^nm_i(t_i-t_{i-1})\colon \{t_1,\dots,t_n\}\text{ partition of }[a,b]\right\}\\=\inf\left\{\sum_{i=1}^nM_i(t_i-t_{i-1})\colon\{t_1,\dots,t_n\}\text{ partition of }[a,b]\right\}\end{align}$$
Where $m_i=\inf\{f(x)\colon t_{i-1}\leq x\leq t_i\}$ and $M_i=\sup\{f(x)\colon t_{i-1}\leq x\leq t_i\}$, the integral of an integrable $f$ is defined as any of this two equal values (That's the exact definition from Spivaik, Calculus). Generaly (in calculus), by area under the graph of a non-negative function on the interval $[a,b]$, we mean the integral of said function on the interval $[a,b]$ (if it exists). That's it. Thats a definition, no argument needed.
Note that the function $f(x)=0$ for $x\neq 0$ and $f(0)=1$ is integrable on $[-1,1]$ with $\int_{-1}^1f=0$ (you can check this directly from the definition, it's a good exercise), that is, the area under this discontinuous function is $0$ (despite it not being $0$ everywhere). A more extravagant function with this same pathology (also present in Spivak's) is the Thomae's function.
For a more intuitive discontinuous function (on infinitely many points) whose integral probably fits your intuitive notion of "area", are the floor and ceiling functions.
In general, concepts mean nothing in math until defined. On spivak you will find continuous functions on a point where it "doesn't look continuous". It doesn't matter if it "looks continuous" or not, all that matters is if it fits the definition or not.
