I'm currently interested in how discontinuous can get the eigenprojections of a continuous function taking values in a particular subspace of symmetric matrices.

I've been searching everywhere for an answer to this problem. I've even looked into T. Kato's book on Perturbation Theory for Linear Differential Operators, and everywhere here on MO. A relatively close question can be found here: http://goo.gl/PlrjpZ. However, most of the results I could find dealt with analytic/holomorphic/continuously differentiable functions or gave counterexamples where the discontinuities happened precisely when the dimension of the eigenspaces changed.

Suppose you have a continuous function $X(t)$ where $t\in\mathbb{R}_+$, taking values in $S_d^+$, the space of $d\times d$ symmetric, positive semidefinite matrices. Let $\lambda_1(X(t))\geq \ldots \geq \lambda_d(X(t))$ denote the ordered eigenvalues of $X(t)$. Suppose that if $\lambda_i(X(0))\neq \lambda_j(X(0))$ or $\lambda_i(X(0))= \lambda_j(X(0))$, then the same relation is true at all times $t\geq0$. With this, for all different eigenvalues, the eigenspaces have constant dimension. Under this context,

1) is there any way to define matrix-valued functions $P(t)$ such that $P(t)^\prime X(t) P(t)=diag(\lambda_1(X(t)), \ldots, \lambda_d(X(t)))$ for all $t\geq 0$ outside of a null set (w.r.t. the Lebesgue measure) in such a way that $P(t)$ is continuous outside of a (possibly different) null set?

2) Can we define a measurable mapping $f:S_d^+\to M_{d,d}$ (where $M_{d,d}$ is the space of $d\times d$ real matrices) such that $f(A)^\prime A f(A)=diag(\lambda_1(A),\ldots,\lambda_d(A))$ for all $A\in S_d^+$?

3) Is any of the two possible if we add more conditions while still allowing for eigenvalues to have multiplicity greater than 1?

I'm more interested in the second question. In fact, I believe I have (at least partially) found the answer to the first question. In Kato's book, p. 569, he describes a way to obtain the eigenprojections as continuous functions of time whenever the our matrix-valued function $X(t)$ has a constant amount, say $s(X(t))=s$, of different eigenvalues, denoted $\{\mu_h(t)\}$ (which is equivalent to what I described before, since the eigenvalues are also continuous functions of time). In fact, different eigenvalues have compact disjoint graphs up to a fixed time $t>0$ on $[0,t]\times\mathbb{R_+^s}$. Hence, we may take $\delta(t)>0$ such that if we draw circles $\Gamma_h(u)$ (on the complex plane) of radii $\delta(t)$ around $\mu_h(u)$ for all $h=1,\ldots, s$ and $0\leq u\leq t$, they never intersect each other. The resolvent $R(X(u),z)=(X(u)-zI_d)^{-1}$ is then a continuous function on the graph of such circles and we may compute the eigenprojections as continuous functions of $u$ through the integrals $$ -\frac{1}{2\pi i}\int_{\Gamma_h(u)}R(X(u),z)dz .$$ I'm not entirely sure if the previous procedure is correct. However, if what I did is completely fine, then we would have found a positive answer to my first question (where we may even set those null sets as the empty sets).

Regarding the second question, I believe that setting $R(A,z)=\Delta$ (the point at infinity in $S_d^+$) whenever $z$ is an eigenvalue of $A$, then the resolvent is jointly continuous in its arguments (w.r.t. the topology of the one-point compactification). The previous paragraph would then imply that we may take $f(A)$ to be (at least locally) continuous whenever $s(A)$ is constant (that is, if $A_n\to A$ and $s(A_n)=s(A)$ for all but finitely many $n$, then $f(A_n)\to f(A)$), then $f$ seems to be fairly well behaved. However, I do not know if this is enough to conclude that $f$ is measurable.

I'm fully aware that I might have made a lot of terrible mistakes in the previous paragraphs. However, I had never dealt with this kind of problems, so I'd be more than grateful if you could let me know if what I did is somewhat reasonable, and if you can give me more insight into this problem. Thanks in advance.