How can a derivative function be integrable? I would like to state integration by parts as a theorem (not prove it, just state it).
From the text I am working from, the domain of an integrable function must be a closed interval while the domain of a differentiable function must be an open interval. Further, the derivative function of a differentiable function $f : (a,b) \to \mathbb{R}$ is the function $f' : (a,b) \to \mathbb{R}$ given by the image of each $c$ of $(a,b)$ is the derivative of $f$ at $c$. $\mathbb{R}$ is the set of real numbers.
The conditions for the theorem of interest in the same text read essentially as:

If the continuous functions $f : [a,b] \to \mathbb{R}$ and $g : [a,b]\to \mathbb{R}$ are differentiable at each point of the open interval $(a,b)$ and the derivative functions $f' : (a,b) \to \mathbb{R}$ and $g' : (a,b) \to \mathbb{R}$ are integrable, then blah blah blah.

How is this possible? The functions $f$ and $g$ have no derivatives at the end points $a$ and $b$, so the derivative functions $f'$ and $g'$ are not defined at $a$ and $b$ either. So how can $f'$ and $g'$ be integrable?
What am I missing? I don't see how improper integration applies here.
I took calculus back in the 19th century and did well it in, but I am now digging into analysis in retirement as a hobby.
 A: Technically, for a proper Riemann integral to be defined, the integration interval's endpoints are required.
Thus, I would interpret the statement “$f' : (a,b) \to \mathbb{R}$ is integrable” as $f'$ is integrable on every closed subinterval of $(a,b).$
(This does not negate the fact that countably many discontinuties doesn't affect the integral's value.)
It is well-known that a continuous function is necessarily integrable. This would not generally be true if we admit an open-interval domain. For example, the reciprocal function on $(0,5)$ is continuous but not Riemann-integrable.
A: I think that the primary difficulty here is that the presentation is a little bit imprecise.  This is not necessarily a bad thing—introductory calculus texts are often intentionally a bit sloppy, as greater value is placed on intuition and enabling computation.  However, if precision is desired, one needs to start digging into the statements of theorems and definitions.
Suppose that the goal is to prove the Integration by Parts (IBP) Formula.  This is often presented in undergraduate textbooks as follows:

Integration by Parts Formula:  Let $f$ and $g$ be differentiable functions.  Then
$$\int f(x)g'(x)\,\mathrm{d}x = f(x)g(x) - \int f'(x) g(x)\,\mathrm{d}x. $$

This statement is nearly identical in both Thomas' Calculus (13th ed) and Stewart's Single Variable Calculus (2nd ed).  Note that neither text says anything more about continuity, integrability, nor the domains of these functions.
To make this more precise, it is necessary to look at where this formula comes from.  Both of the above cited texts make the following argument (more or less).

If $f$ and $g$ are differentiable functions, then the Product Rule gives
$$ (fg)'(x) = f'(x)g(x) + f(x)g'(x). $$
It follows from the Fundamental Theorem of Calculus I that
$$ (fg)(x) = \int (fg)'(x) \,\mathrm{d}x = \int f'(x)g(x) + f(x)g'(x)\,\mathrm{d}x, $$
which can be rearranged into the IBP Formula.

There are at least two problems with this argument:

*

*The Product Rule is a local theorem:  it describes the derivative of a product at a point—the full statement is something like "if $f$ and $g$ are differentiable at $x$, then $fg$ is differentiable at $x$, and the derivative is given by $(fg)'(x) = f'(x)g(x) + f(x)g'(x)$."  The Product Rule doesn't say anything about differentiability on an interval.
However, this isn't really a problem, as it isn't hard to figure out what is meant:  if $f$ and $g$ are both differentiable on an open interval $(a,b)$, then the Product Rule gives the derivative of $fg$ at each point in that interval.


*It is a little unclear what the Fundamental Theorem of Calculus is actually giving us, here.  The statement in Thomas' Calculus is

If $f$ is continuous on $[a,b]$, then $F(x) = \int_{a}^{x} f(t)\,\mathrm{d}t$ is continuous on $[a,b]$ and differentiable on $(a,b)$ and its derivative is $f(x)$:
$$ F(x) = \frac{\mathrm{d}}{\mathrm{d}x} \int_{a}^{x} f(t)\,\mathrm{d}t = f(x). $$

This is a statement about definite integrals, not about antiderivatives (i.e. indefinite integrals).  But the IBP Formula appears to be a statement about antiderivatives, so there is some confusion.
Again, this isn't really a problem, as $F$ is a function which has the property that $F'(x) = f(x)$ at any point $x \in (a,b)$.  Thus we get the local property (differentiability at a point) for free, and $F$ is an antiderivative of $f$ on the interval $(a,b)$.  The Mean Value Theorem then asserts that any other antiderivative of $f$ can differ from $F$ by (at most) a constant.
Building the theory in this way, it seems that a first approximate theorem of the IBP Formula might be something like the following:

Integration by Parts Formula (version 1):  Let $f$ and $g$ be continuously differentiable on an interval $(a,b)$.  There are functions $H_1$ and $H_2$ such that
$$ H_1'(x) = f'(x)g(x) \qquad\text{and}\qquad H_2'(x) = f(x)g'(x) $$
at each point $x \in (a,b)$,
and
$$ H_1(x) = f(x)g(x) - H_2(x) $$
at each point $x \in (a,b)$.

To prove this, fix some $c \in (a,b)$ and define
$$ H_1(x) = \int_{c}^{x} f'(x)g(x)\,\mathrm{d}x
\qquad\text{and}\qquad
H_2(x) = \int_{c}^{x} f(x)g'(x)\,\mathrm{d}x. $$
The argument at the top then finishes the proof.  Note that this works because we only need continuity of $f'g$ and $fg'$ on an interval of the form $[c, x+\varepsilon]$ or $[x-\varepsilon, c]$ (where $x$ is fixed and $\varepsilon$ is some small positive number chosen so that the entire interval is contained in $(a,b)$) in order to push through the Fundamental Theorem of Calculus, and we are given that continuity by assumption.
With a little more work, it is possible to generalize the theorem a bit.  The version sought in the original question is likely something like the following:

Integration by Parts Formula (version 2):  Let $f$ and $g$ be continuous on $[a,b]$ and differentiable on $(a,b)$.  Define functions $f^*, g^* : [a,b] \to \mathbb{R}$ by
$$ f^*(x)
= \begin{cases} f'(x) & \text{if $x \in (a,b)$, and} \\ 0 & \text{if $x \in \{a,b\}$} \end{cases}
\qquad\text{and}\qquad
g^*(x)
= \begin{cases} g'(x) & \text{if $x \in (a,b)$, and} \\ 0 & \text{if $x \in \{a,b\}$} \end{cases}
$$
If $f^*$ and $g^*$ are integrable on $[a,b]$, then $fg^*$ and $f^*g$ have continuous antiderivatives on $[a,b]$ (that is, there are functions which are continuous on $[a,b]$ and differentiable on $(a,b)$ which have derivatives equal to $fg^*$ and $f^*g$) and
$$ \int f(x)g^*(x)\,\mathrm{d}x = f(x)g(x) - \int f^*(x)g(x)\,\mathrm{d}x. $$

The central intuition here should be that we don't care what happens to these functions at a small number of points.  There are actually a number of ways in which we might extend $f'$ and $g'$ to the endpoints (I extended by zero, above, but we might also set $f^*(a) = \lim_{x\to a^+} f'(x)$, for example, assuming that the limit exists).  The behaviour of a function at a few isolated points doesn't change its integrability, so we can be sloppy in stating the theory, and not sweat the details.  Thus we end up with statements like those in Thomas' Calculus.
A: I know you already made this realization in the comments to your question, but for the sake of completeness, I will clarify anyway: yes, you are correct that the domain of a differentiable function is always an open set, composed of unions of open intervals, while Riemann integrable functions have closed intervals as their domain. As you pointed out, the derivative of $f:(a,b)\rightarrow\mathbb{R},$ is a function $f':(a,b)\rightarrow\mathbb{R}$ if $f$ is everywhere differentiable. However, you can extend $f'$ to a function $(f')^*,$ such that $(f')^*:[a,b]\rightarrow\mathbb{R},$ and $(f')^*(x)=f'(x)$ for all $x\in(a,b).$ Under the appropriate requirements, $(f')^*$ is then Riemann integrable. However, since this is a tedious thing to say, we often abuse language and just say that $f'$ is Riemann integrable, when it is actually the former what was meant.
