f(x)=2sinx(sinX+cosX)
=2sinxsinx+2sinxcosx
=1-cos2x+sin2x
=√2sin(2x-π/4)+1
所以f(x)的最小正周期=2π/2=π
最大值=1+√2