How to solve this equation in [0,2pi]? min{sinx,cosx}=pi/4.