Let a<ba<b. If f,g:[a,b]Rf,g:[a,b]\to\mathbb R are and at least one is continuous, then both exist and

abfdg  +  abgdf  =  f(b)g(b)f(a)g(a).\int_a^b f\,dg \;+\; \int_a^b g\,df \;=\; f(b)g(b)-f(a)g(a).
Remarks

When ff and gg are continuously differentiable, substituting df=f(x)dxdf=f'(x)\,dx and dg=g(x)dxdg=g'(x)\,dx gives the usual . The stated existence follows from the more general criterion that two bounded-variation functions with no common discontinuity are integrable with respect to one another.