f(x)=sinxcosx+cos^2x
=sin2x/2+(1+cos2x)/2
=1/2*(sin2x+cos2x)+1/2
=√2/2*sin(2x+π/4)+1/2
∴f(x)的最小正周期T=2π/2=π
∵f(x)的单调增区间为[-π/4+2kπ,3π/4+2kπ],k∈Z
当k=1时,单调增区间为[-π/4,3π/4],且[-π/6,π/3]在此区间内
∴此时f(x)的最大值为
f(π/3)=√2/2*sin(2*π/3+π/4)+1/2
=√2/2*sin(11π/12)+1/2
=√2/2*(√6-√2)/4+1/2
=(√3-1)/4+1/2
最小值为
f(-π/6)=√2/2*sin(-2*π/6+π/4)+1/2
=√2/2*sin(-π/12)+1/2
=√2/2*[-(√6-√2)/4]+1/2
=-(√3-1)/4+1/2