Differentiability of sum of eigenvalues. Let $A(x)=(a_{ij}(x))_{i,j}$ be a smooth map of symmetric matrices for $x\in\Omega\subseteq\mathbb R^n$. (i.e., every $a_{ij}(x)=a_{ji}(x)$ is smooth.) Let $k_1\le\cdots\le k_n$ be its eigenvalues. If we know that at a point $p,$ $k_1=k_2<0$ and $k_1=k_2<k_3,$ can we derive that $k_1+k_2$ is also smooth?
When $n=3,$ since $k_3$ has multiplicity $1$ and $k_1+k_2=\text{tr} A-k_3,$ we know this statement is correct. However, in general, I am not sure how to see this.
Any ideas or comments are appreciated!
 A: Assume as in your question that $p\in\Omega$ is a point such that the eigenvalues of $A(x=p)$ are $k:=k_1=k_2<k_3\leq \cdots \leq k_n$.
Let us write the characteristic polynomial of $A(x)$ in a neighborhood of $x=p$ as follows
$$
\det(y-A(x))=(y^2-u(x)y+v(x))(y^{n-2}+c_{n-3}(x)y^{n-3}+\cdots+c_1(x) y+c_0(x)),
$$
where: (1) $u,v,c_0,...,c_{n-3}$ are smooth functions of $x$ in a neighborhood of $x=p$, (2) the values of $u,v,c_0,...,c_{n-3}$ at $x=p$ are uniquely determined by $u(x=p)=2k_1$ and $v(x=p)=k_1^2$.
We want to do this by the inverse function theorem. Consider the usual expansion
$$
\det(y-A(x))=y^n+d_{n-1}(x)y^{n-1}+\dots+d_1(x)y+d_0(x).
$$
Since $d_i(x)$ are by assumption smooth in $x\in\Omega$, so we only need to invert the map
$$
(u,v,c_0,...,c_{n-3})\mapsto(d_0,\dots,d_{n-1})
$$
defined by $d_k=c_{k-2}-uc_{k-1}+c_kv$ with the conventions: $c_{-1}=c_{-2}=0=c_{n-1}$ and $c_{n-2}=1$. The Jacobian matrix of such transformation is
$$
J=\begin{pmatrix}
0 & -c_0 & -c_1 & -c_2 &\cdots &-c_{n-3} & -1
\\
c_0 & c_1 & c_2 & c_3 &\cdots & 1 & 0
\\
v & -u & 1 & 0 & \cdots & 0 & 0
\\
0 & v & -u & 1 & \cdots & 0 & 0
\\
0 & 0 &v & -u &  \cdots & 0 & 0
\\
\vdots & \ddots & \ddots & \ddots & \ddots & \ddots &\vdots
\\
0 & 0 &0 &\cdots & v & -u & 1
\end{pmatrix}
$$
It is a known fact about Sylvester matrices (https://en.wikipedia.org/wiki/Sylvester_matrix) that this matrix has zero determinant if and only if the polynomials $y^2-uy+v$ and $y^{n-2}+c_{n-3}y^{n-3}+\dots+c_1y+c_0$ share a common nontrivial factor. Thus whenever they do not share a common factor, the map can be inverted obtaining $u(\vec d),v(\vec d),c(\vec d)$ as smooth functions of $\vec d=(d_0,...,d_{n-1})$ and we may express in particular $u$ as a smooth function of $x$ in a neighborhood of $x=p$.
A: The smoothness of the "eigenvalue group" is a standard fact which can be found in
T. Kato's perturbation theory of linear operators (first chapter, I think page 71).
