f(x)=cos²x-sin²x+2√3sinxcosx+1
=cos2x+√3sin2x+1
=2sin(2x+π/6)+1
f(a)=2
2sin(2x+π/6)+1=2
sin(2x+π/6)=1/2
2x+π/6=π/6+2kπ
x=kπ
2x+π/6=5π/6+2kπ
2x=2π/3+2kπ
x=π/3+kπ
∵α∈[π/4,π/2]
∴a=π/3
f(x)=cos²x-sin²x+2√3sinxcosx+1
=cos2x+√3sin2x+1
=2sin(2x+π/6)+1
f(a)=2
2sin(2x+π/6)+1=2
sin(2x+π/6)=1/2
2x+π/6=π/6+2kπ
x=kπ
2x+π/6=5π/6+2kπ
2x=2π/3+2kπ
x=π/3+kπ
∵α∈[π/4,π/2]
∴a=π/3