f(x)=sinx+cosx=√2(sinxcosπ/4+sinπ/4cosx)=√2sin(x+π/4)
当x=π/4时,函数取得最大值
f(x)max=√2sin(π/2)=√2
当x=-π/2时,函数取得最小值
f(x)min=√2sin(-π/4)=-1
f(x)=sinx+cosx=√2(sinxcosπ/4+sinπ/4cosx)=√2sin(x+π/4)
当x=π/4时,函数取得最大值
f(x)max=√2sin(π/2)=√2
当x=-π/2时,函数取得最小值
f(x)min=√2sin(-π/4)=-1