To rewrite the function \( f(x) = 2\sin\left(x + \frac{\pi}{2}\right) - 1 \) as a cosine function, we can use the sine to cosine relationship. Recall that:
\[ \sin\left(x + \frac{\pi}{2}\right) = \cos(x) \]
Substituting this into the function, we have:
\[ f(x) = 2\cos(x) - 1 \]
Thus, the rewritten form of the function as a cosine is:
\[ f(x) = 2\cos(x) - 1 \]