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

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣< ε

9.4. INTEGRATION BY PARTS 203Example 9.3.20 Here is an example of a function which is not integrable. Letf(y= { 1 if x is rational (9.6)~~ | O ifx is not rationaland let g be an increasing continuous function, g(b) > g(a). Then in reference to {a,b},U (f,g) =8(b) —g (a) and L(f,g) =0s0 f? fdg does not exist. This follows from Theorem9.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 b[ tas+ | gdf = fg (b)—fg(a).Proof: By definition there exists 6 > 0 such that if ||P|| < 6 then whenever z; €[xi-1,%i] ,nbYP e)(e)—e(v-1))— [fagi=1Pick such a partition. Notice fg (b) — fg (a) =Y, fg (xi) — fg (xi-1) Therefore, subtract-ing Y7_, 2 (ti) (f (x) — f @i_1)) from both sides where t; € [xi-1,.i] ,<_Efg (b)—fa(a)— dig (ti) Fi) — fi)il ver(f¢ (xi) — fe (x1) — Ye (ti) (F (xi) —f (i)i=lFf (xi) (g i) — 8 (i) + F (i-1) (8 (4) — 8 (i-1))MslllmnMs:llMnBut this is just a Riemann Stieltjes sum for p? fdg corresponding to the partition whichconsists of all the x; along with all the ¢; and if P’ is this partition, ||P’|| < 6 because it hasat least as many points in it as P. Therefore,. bRiemann sum for {7° fdgFe(0)— fala) Yate) f(s) —F lor) | ~ [fas] <eLRiemann sum for pe gdf