Sufficient condition for Integration by Parts In his textbook Calculus, Spivak presents integration by parts as follows: 
If $f'$ and $g'$ are continuous then
\begin{align*}
\int fg'&=fg-\int f'g\\
\int f(x)g'(x)\,dx&=f(x)g(x)-\int f'(x)g(x)\,dx\\
\int_a^b f(x)g'(x)\,dx&=f(x)g(x)\bigg|_a^b-\int_a^b f'(x)g(x)\,dx\\
\end{align*}
I understand that without the continuity requirement, $fg'$ and $gf'$ may not be integrable, but why isn't it enough to have $f'$ and $g'$ be integrable functions? Isn't the product of two Riemann-integrable functions necessarily  Riemann-integrable?
 A: 
Spivak's statement for integration-by-parts (in the context of Riemann
  integration) holds when $fg’$ and $gf’$, individually, are
  Riemann integrable, and it is enough just that $f’$ and $g'$ be Riemann
  integrable when $f$ and $g$ are continuous.

The "counterexample" in the linked paper is relevant for improper integrals. 
In the example, $f(x) = x^2 \sin(x^{-4})$ and $g(x) = x^2 \cos(x^{-4})$ on $[0,1]$ with $f(0), g(0) := 0$, and
$$\sin(1)\cos(1) = \int_0^1 (fg’ + gf’) \neq \int_0^1fg’ + \int_0^1 g f’,$$
since the integrals on the RHS do not exist as Riemann integrals (nor as finite Lebesgue integrals).

Rudin's theorem is correct in that $f', \, g' \in \mathcal{R}([a,b])$
  requires $f'$ and $g'$ to be bounded.  This is not the case in the
  counterexample.

For more details, note that $f$ and $g$ are differentiable with $f'(0) = g'(0) = 0.$
On $(0,1]$ we have,
$$f'(x) = 2x \sin(x^{-4}) - 4 x^{-3}\cos(x^{-4}), \\ g'(x) = 2x \cos(x^{-4}) + 4 x^{-3}\sin(x^{-4}),\\ f(x)g(x) = \frac{1}{2}x^4 \sin(2 x^{-4}), \\ (fg)'(x) =   2x^2 \sin(2x^{-4}) - 4 x^{-1}\cos(2x^{-4}) $$
Notice that $f(x)g'(x) = 2x^3\sin(x^{-4})\cos(x^{-4})- 4x^{-1} \sin^2(x^{-4})$ where the second term does not have a convergent improper integral over $[0,1]$.
A: 
why isn't it enough to have $f'$ and $g'$ be integrable functions?
$$\int_a^b f(x)g'(x)\,dx =f(x)g(x)\bigg|_a^b-\int_a^b f'(x)g(x)\,dx$$

Yes, $f′$ and $g′$ being integrable on $[a,b]$ is sufficent.

$$\int fg'=fg-\int f'g$$

For indefinite integration by parts, the only requirement is that on the intersection of their domains, $f$ and $g$ are differentiable and one of them has an antiderivative.
Proof
Without loss of generality suppose that $g$ has an antiderivative. Then $f'g$ has an antiderivative; denote it by $H.$ Then $(fg-H)$ is an antiderivative of $fg'$.
Now, by the product rule, $(fg)'=f'g+fg'.$ So, $fg=\int(f'g+fg').$

*

*Therefore, $fg=\left(\int f'g\right)+\left(\int fg'\right),$ so $$\int fg'=fg-\int f'g.$$

*By the Fundamental Theorem of Calculus, $\int_a^b(f'g+fg')=fg\bigg|_a^b\ ,$ i.e., $$\int_a^b fg'=fg\bigg|_a^b-\int_a^b f'g.$$
