f(x)=sinx

f(x)=cosx

f(x) = If[0 ≤ x ≤ (2 * π), sin(x)]
g(x) = If[0 ≤ x ≤ (2 * π), cos(x)]
A = Intersect(f, g, (0.7853981588430488, 0.7071067779661007))
B = Intersect(f, g, (3.9269908157390905, -0.7071067803039714))
a = IntegralBetween(f, g, π / 4, (5 * π / 4))