9.4. INTEGRATION BY PARTS 203
Example 9.3.20 Here is an example of a function which is not integrable. Let
f (t)≡{
1 if x is rational0 if x is not rational (9.6)
and let g be an increasing continuous function, g(b) > g(a). Then in reference to [a,b],U ( f ,g) = g(b)−g(a) and L( f ,g) = 0 so
∫ ba f dg does not exist. This follows from Theorem
9.3.10.
There is a fundamental relationship between f ∈ R([a,b] ,g) and g ∈ R([a,b] , f ). Itturns out that if you have one, then you have the other also and in addition to this, there isa fundamental integration by parts formula. This is a very remarkable formula.
9.4 Integration by PartsTheorem 9.4.1 Let f ,g be two functions defined on [a,b]. Suppose f ∈ R([a,b] ,g) .Then g ∈ R([a,b] , f ) and the following integration by parts formula holds.∫ b
af dg+
∫ b
agd f = f g(b)− f g(a) .
Proof: By definition there exists δ > 0 such that if ∥P∥ < δ then whenever zi ∈[xi−1,xi] , ∣∣∣∣∣ n
∑i=1
f (zi)(g(xi)−g(xi−1))−∫ b
af dg
∣∣∣∣∣< ε
Pick such a partition. Notice f g(b)− f g(a) =∑ni=1 f g(xi)− f g(xi−1) .Therefore, subtract-
ing ∑ni=1 g(ti)( f (xi)− f (xi−1)) from both sides where ti ∈ [xi−1,xi] ,
f g(b)− f g(a)−n
∑i=1
g(ti)( f (xi)− f (xi−1))
=n
∑i=1
( f g(xi)− f g(xi−1))−n
∑i=1
g(ti)( f (xi)− f (xi−1))
=n
∑i=1
f (xi)(g(xi)−g(ti))+ f (xi−1)(g(ti)−g(xi−1))
But this is just a Riemann Stieltjes sum for∫ b
a f dg corresponding to the partition whichconsists of all the xi along with all the ti and if P′ is this partition, ∥P′∥< δ because it hasat least as many points in it as P. Therefore,∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣
Riemann sum for∫ b
a f dg︷ ︸︸ ︷ f g(b)− f g(a)−n
∑i=1
g(ti)( f (xi)− f (xi−1))︸ ︷︷ ︸Riemann sum for
∫ ba gd f
−∫ b
af dg
∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣< ε