Evaluating $\cos (i)$ This is a question out of my own curiousity.
We know that by Euler $$e^{ix}=\cos x+i\sin x$$ $$e^{-ix}=\cos x-i\sin x$$ .Adding $$\cos x=\frac{e^{ix}+e^{-ix}}{2}$$ if $x=i$:$$\cos (i)=\frac{e+\frac{1}{e}}{2} \tag!$$.Now this result is surprising.Indeed by  taking cos of complex number i was expecting something more strange on RHS,but here we get a real number.Is such an operation even defined or is it that euler's formula is applicable only when $x$ is real This result is confusing me a bit as i never expected a real number on RHS.What would be an intuitive explanation on this result
Thank you!(i apologise if this is  a stupid question)
 A: Subtracting you should get $$2i\sin(x)=e^{ix}-e^{-ix}$$
Replace $x$ with $i$
A: Euler's formula is valid even for complex $x$. You have shown that if $x=ia$ is purely imaginary,
$$\cos x=\cosh-ix=\cosh a$$
where $\cosh$ is the hyperbolic cosine. This is the link between trigonometric and hyperbolic functions.
A: Others answered about how $cos(i)$ can be calculated using Euler's formula. But I will elaborate from a different perspective.
We know that cosine function can be defined geometrically for certain real numbers and using further geometric arguments can be extended to entire real numbers.
But how to extend it to complex plane?
One of the natural ways to do is by defining
$$
cos z = \frac{e^{iz} + e^{-iz}}{2}
$$
How this can be justified? Remember that for real $z$ our $cos z$ will match with cosine function for reals.
Similarly $sin z$ can be defined.  Also we see that almost all trignometric identities will hold for $cos z$ and $sin z$ as if our complex domain doesn't effect them. But there is an notable exception here, $sinz $ and $cosz$ are not bounded in complex plane.
Further if you know analysis , you will find that power series expansion for sine and cosine functions in complex case is similar to that of real case.
A: This is too long for a comment. So I will write it as an answer.
Lets assume the definition of $\exp$ function via power series. Then it is well defined on the complex plane as well and Euler's formula gives us its real and imaginary parts. However Euler's formula still valid for any complex number and makes bridges between ordinary trigonometric functions, hyperbolic trigonometric functions, and complex logarithmic function.
The formula $\cos(i)=\dfrac{e^2+1}{2e}=\csc(2\tan^{-1}(e))$ is nothing more surprise than $i^2=-1$ or $e^{2i\pi}=1$ if you think of this for sometime. On the other hand, given any real number $r$ you can solve $\cos(z)=r$ over complex numbers. See here for an example.
Since $\exp, \sin, \cos$ all are well defined in any Banach algebra by means of power series, you can get similar results in much more generally. For example in quaternions. See here for more details on this.
A: Recall the power series for cosine:  $$\cos z=\sum_{n=0}^\infty(-1)^n\frac{z^{2n}}{(2n)!}$$  It turns out that this series converges for all complex numbers $z$, and can be taken as the definition of the complex cosine.  Since it only involves even powers of $2$, substituting $z=i$ will give you a real number.
