y=f(x)=a^2+(根号2)(cosxcosπ/4+sinxsinπ/4)+sinxcosx
=a^2+cosx+sinx+sinxcosx
令t=cosx+sinx=(根号2)cos(x+π/4) -根号2≤t≤根号2
y=a^2+t+(t^2-1)/2
=1/2(t+1)^2-1+a^2
t=根号2时ymax=根号2+1/2+a^2=25/2
a^2=12-根号2
a≥0
a=根号(12-根号2)
y=f(x)=a^2+(根号2)(cosxcosπ/4+sinxsinπ/4)+sinxcosx
=a^2+cosx+sinx+sinxcosx
令t=cosx+sinx=(根号2)cos(x+π/4) -根号2≤t≤根号2
y=a^2+t+(t^2-1)/2
=1/2(t+1)^2-1+a^2
t=根号2时ymax=根号2+1/2+a^2=25/2
a^2=12-根号2
a≥0
a=根号(12-根号2)