f(x)=2sinx(sinx+cosx)
=2sin²x+2sinxcosx
=1-cos(2x)+sin(2x)
=√2sin(2x-π/4)+1
当2kπ-π/2≤2x-π/4≤2kπ+π/2,k∈Z
即kπ-π/8≤x≤kπ+3π/8,k∈Z时,f(x)为增函数;
当2kπ+π/2<2x-π/4<2kπ+3π/2,k∈Z
即kπ+3π/8<x<kπ+7π/8,k∈Z时,f(x)为减函数,
∴函数的增区间为[kπ-π/8,kπ+3π/8],减区间为(kπ+3π/8,kπ+7π/8),k∈Z.