∫(0->π/2) |sinx-cosx| dx
=-∫(0->π/4) (sinx-cosx) dx + ∫(π/4->π/2) (sinx-cosx) dx
=-[-cosx -sinx]|(0->π/4) + [ -cosx -sinx]|(π/4->π/2)
=2(√2-1)
∫(0->π/2) |sinx-cosx| dx =-∫(0->π/4) (sinx-cosx) dx + ∫(π/4->π/2) (sinx-cosx) dx =-[-cosx -sinx]|(0->π/4) + [ -cosx -sinx]|(π/4->π/2)=2(√2-1)