(1)f(x)=2cos²x+2sinxcosx=1+cos2x+sin2x=1+√2sin(2x+π/4)
(2)f(x)=1/2 sinx + 1/2(1+cosx) -1/2 =1/2 sinx +1/2 cos x=1/2 (sinx+cosx)
① 说明 sina+cosa=√2/2 √2sin(a+π/4)=√2/2 sin(a+π/4)=1/2
a∈(0,π) a+π/4∈ (π/4 5π/4)
那么 a+π/4= 5π/6 a= .
② f(x)=√2 sin(x+π/4) x∈[-π/4 π] x+π/4 ∈[0,5π/4]
所以 maxf(x)=f(π/4)=√2
minf(x)=f(π)=-1