(sina/2+cosa/2)^2+2sin^2(π/4-a/2)