f(x)=(1+cotx)sinx^2-2sin(x+π/4)sin(x-π/4)
=(1+cosx/sinx)*sinx ^2-(sinx ^2-cosx ^2)
=cosx ^2+sinxcosx
1、若tana=2,1/(cosa ^2)=seca ^2=1+2*2=5
f(a)=cosa ^2+sinacosa=cosa ^2(1+tana)=1/5*(1+2)=3/5
2、f(x)=cosx ^2+sinxcosx
=cosx(cosx+sinx)
=√2sin(x+∏/4)cosx
=√2/2 〔sin(x+∏/4+x)+sin(x+∏/4-x)〕
=√2/2 sin(2x+∏/4)+1/2
x∈[π/12,π/2],则5π/12≤2x+π/4≤5π/4
当x=π/2,f(x)min=√2/2 sin(5∏/4)+1/2=√2/2 *(-√2/2)+1/2=0
当2x+π/4=π/2,即x=π/8,时f(x)max=√2/2 +1/2
所以f(x)的取值范围是〔0,√2/2 +1/2〕