<s>[INST] Expressing $\cos(\frac{\pi}{2}+i)$ and $\sin(\frac{\pi}{2} +i)$ in the exponential function 
Is $\cos(\frac{\pi}{2}+i)$ equal to $i\frac{-1+e^2}{2e}$ and $\sin(\frac{\pi}{2} +i)$ to $\frac{1+e^2}{2e}$?

Trying to answer a test online. Apparently the answer in the question is incorrect or I am not expressing it correctly. Is there a different way to express it with the exponential function?
 [/INST] You can use the formulas
$$
\cos x = \frac 1 2 (e^{ix}+e^{-ix}) \qquad \sin x = \frac{1}{2i}(e^{ix}-e^{-ix})
$$
After inserting the values $\frac \pi 2 + i$ into both equations you get the results
$$
\cos \left(\frac \pi 2 + i\right) = \frac 1 2(e^{i\pi/2 + i^2}+e^{-i\pi/2-i^2} ) \\
=\frac 1 2\left(\frac i e + \frac{e}{i}\right) = \frac{i}{2e} - \frac{ie}{2}= i\frac{1-e^2}{2e}
$$
and
$$
\sin\left(\frac \pi 2 + i\right) = \frac{1}{2i}(e^{i\pi/2 + i^2}-e^{-i\pi/2-i^2} ) \\
=\frac{1}{2i}\left(\frac i e - \frac{e}{i}\right) = \frac{1}{2e} + \frac{e}{2}= \frac{e^2+1}{2e}
$$
using the fact that $e^{i\pi/2}=i$ and $i^2=-1$, thus $1/i=-i$
</s>