TITLE: About $\cos(\sqrt{-x})$
QUESTION [5 upvotes]: By Euler's Formula $e^{ix}=\cos{x}+i\sin{x}$ we can deduce that:
$\cos{\sqrt{-x}}=\cosh {\sqrt{x}}$
My question is the following true:
$\cos{\sqrt{-x}}=\begin {cases}  
\cos{\sqrt{-x}} &  ,x \text{ is negative real number} \\ 
\cosh {\sqrt{x}} &  ,x \text{ is positive real number}
\end{cases}$
and it is differentiable and continuous at zero.
If this is true...is it useful?
Read the following to know my level in mathematics:
I am second year student of mathematics I know calculus 1+2+3 ,ODES,logic and
writing proofs . at my current semester I am studying Abstract Algebra 01
,Elementary Number Theory ,Introduction to Real Analysis ,PDES 01 and Linear
Algebra 01. This question comes to my mind because I love mathematics and
I am curious about this idea about  $\cos{\sqrt{-x}}$  whether it is true or false ,whether it is useful
or useless.

REPLY [6 votes]: In a word, "yes". In fact, the function you've identified is entire, complex differentiable on the whole complex plane, and given by the power series
$$
C(x) = \sum_{k=0}^{\infty} \frac{x^{k}}{(2k)!} = 1 + \frac{x}{2!} + \frac{x^{2}}{4!} + \frac{x^{3}}{6!} + \cdots.
$$
(So, $C(x^{2}) = \cosh x$ and $C(-x^{2}) = \cos x$, as your piecewise formula says.)
There's a companion,
$$
S(x) = \sum_{k=0}^{\infty} \frac{x^{k}}{(2k+1)!} = 1 + \frac{x}{3!} + \frac{x^{2}}{5!} + \frac{x^{3}}{7!} + \cdots,
$$
satisfying $S(x^{2}) = \dfrac{\sinh x}{x}$ and $S(-x^{2}) = \dfrac{\sin x}{x}$.
Both functions do occur "in the wild", for example when expressing the exponential map for the Lie group $SL(2, \mathbf{R})$. I'm not aware of any name for them.