f(x) = If[0 < x < (2 * π), sin(x)]
g(x) = If[0 < x < (2 * π), cos(x)]
A = Intersect(f, g, (0.7853981662149677, 0.7071067831788346))
B = Intersect(g, f, (3.9269908169872414, -0.7071067811865477))
a = IntegralBetween(f, g, 0.79, 3.93)