Find the minimum value of the function y = cos ^ 2x + 2asinx-1, X ∈ [0,2 π), a ∈ R =

Find the minimum value of the function y = cos ^ 2x + 2asinx-1, X ∈ [0,2 π), a ∈ R =

y=cos^2x+2asinx-1
=1-sin^2x+2asinx-1
=a^2-a^2+2asinx-sin^2x
=a^2-(a-sinx)^2
When (a-SiNx) ^ 2 is the maximum, y is the minimum
We need to judge the maximum value of (a-SiNx) ^ 2 according to the value of A