令t=sinθ+cosθ=√2sin(θ+π/4),∵θ∈[0,π/2]∴θ+π/4∈[π/4,3π/4],∴t∈[1,√2]
又2sinθcosθ=(sinθ+cosθ)²-1=t²-1
∴t∈[1,√2],y=(2t²-2-1)/(t+1) =(2t²-3)/(t+1)
令t+1=m,m∈[2,√2+1],y=[2(m-1)²-3]/m=2m-(1/m)-4
∵y=2m,y=-1/m在[1,√2]上均为增函数,∴y=2m-(1/m)-4在[2,√2+1]上也为增,
∴当m=2是,y最小值为-1/2;当m=√2+1时,y最大值为√2-1