Consider the symmetric matrix $$A=\begin{pmatrix} 2 & t & \cos t-1 \\ t & 2 & 0 \\ \cos t-1 & 0 & 2 \end{pmatrix}. $$ The (real) eigenvalues of $A$ can be found easily using the quadratic formula: they are $$\lambda_1,\lambda_2,\lambda_3=2,\frac{1}{2} \left(4-\sqrt{2} \sqrt{2 t^2-4 \cos (t)+\cos (2 t)+3}\right),\frac{1}{2} \left(4+\sqrt{2} \sqrt{2 t^2-4 \cos (t)+\cos (2 t)+3}\right) $$
Plotting them as functions of the real parameter $t$, I obtain this graph

What bothers me, is that we could have defined the eigenvalues differently as $$\lambda_1,\lambda_2,\lambda_3=2,\frac{1}{2} \left(4-\text{sgn } t\sqrt{2} \sqrt{2 t^2-4 \cos (t)+\cos (2 t)+3}\right),\frac{1}{2} \left(4+ \text{sgn } t\sqrt{2} \sqrt{2 t^2-4 \cos (t)+\cos (2 t)+3}\right), $$ so that the graph would look like this:

This way, the functions $\lambda_1(t),\lambda_2(t),\lambda_3(t)$ are of class $C^\infty$ (smooth).
I have a few questions regarding this:
- Given a symmetric matrix which depends (smoothly) on a real parameter $t$, is it possible to define its eigenvalues $\lambda_1(t), \dots, \lambda_n(t)$ is such a way that they will be smooth functions of $t$?
- Is there a natural way of finding these "smooth branches"? (The quadratic formula has failed me.)
- A little more generally, given the equation $f(x,t)=0$, under what conditions is there a choice for all solutions $x(t)$, so that they are as regular as $f$ is WRT $t$?
Thank you
See a related thread in MO. To quote the answer of Denis Serre,
This should answer your first question. The answers by the others are also informative.