If | x | is less than or equal to π / 4, find the minimum value of function f (x) = sin square x + cosx

If | x | is less than or equal to π / 4, find the minimum value of function f (x) = sin square x + cosx

f(x)=(sinx)^2+cosx
=1-(cosx)^2+cosx
=-(cosx)^2+cosx+1
Let t = cosx | x | ≤ π / 4 √ 2 / 2 ≤ t ≤ 1
y=-t^2+t+1
=-(t-1/2)^2+5/4
Monotonically decreasing in [√ 2 / 2,1]
When the minimum value is taken, t = 1, y = 1