当 sinx>cosx时, π/2<x<3π/2 , 此时 -1 ≤ cosx<√2/2
当 sinx ≤ cosx时, 3π/2 ≤ x ≤ π/2 , 此时 -1 ≤ sinx ≤ √2/2
所以 值域为 [-1 ,√2/2]