Since sin∣−x∣=sin∣x∣ and cos∣−x∣=cos∣x∣, the integrand (sin∣x∣+cos∣x∣) is an even function.
For any even function integrated over a symmetric interval [−a,a]:
∫−aaf(x)dx=2∫0af(x)dx
∫−2π2π(sin∣x∣+cos∣x∣)dx=2∫02π(sin∣x∣+cos∣x∣)dx
For x∈[0,π/2], x is non-negative, so ∣x∣=x:
=2∫02π(sinx+cosx)dx
=2[−cosx+sinx]02π
At x=2π:
−cos2π+sin2π=−(0)+(1)=1
At x=0:
−cos0+sin0=−(1)+(0)=−1
=2[(1)−(−1)]
=2×2
=4