When is a function of the largest eigenvalue continuous and/or differentiable? I want to understand why the following function, the largest eigenvalue of a symmetric linear operator, is continuous and Gâteaux differentiable.
\begin{equation*}
\lambda(V)=\sup_{f \in \ell^2(I):\ \rVert f \lVert_2} \langle (A+V)f, f \rangle, \qquad V \in \ell^2(I)
\end{equation*}
where


*

*$I$ is a finite index set (subset of $\mathbb Z^d$ in fact)

*$A: \ell^2(I) \rightarrow \ell^2(I)$ is a symmetric linear operator that is nonnegative outside its diagonal, so $-A$ is positive definite

*$V \in \ell^2(I)$ multiplies like the diagonal matrix $\mathrm{diag}(V_1, \dots, V_n)$.


I encountered this statement in a probability theory proof where it simply states that this follows easily from the Perron-Frobenius theorem and basic linear algebra.
So we should have

(1) \begin{equation*}
\lim_{n\rightarrow\infty} \sup_{\lVert f \rVert_2=1} \langle(A+V_n)f,f\rangle
=\sup_{\lVert f \rVert_2=1} \langle(Af,f\rangle, \qquad \mathrm{\ where\ } V_n \rightarrow 0 \mathrm{\ pointwise}
\end{equation*}

and the existence of

(2)\begin{equation*}
\lim_{t \rightarrow 0}\frac{1}{t} \left( \lambda(V+hg)-\lambda(V) \right)
=\lim_{t \rightarrow 0}\frac{1}{t} \left( \sup_{\lVert f \rVert_2=1} \langle(A+V+hg)f,f\rangle - \sup_{\lVert f \rVert_2=1} \langle(A+V)f,f\rangle \right).
\end{equation*}

In (1) the problem is that it's not obvious to me that we may swap the limit and the supremum and I don't see any good reason for this to be true. For (2) I'm simply puzzled. The Perron-Frobenius theorem says that the largest eigenvalue of $A+V$ is simple and that it has a positive eigenfunction. But I don't see how to conclude the existence of the Gâteaux derivative from there. I guess there must be some theorem from linear algebra, but so far my research didn't give me an answer either.

Some more context on how I encountered this problem
The operator $A$ is the generator $\Delta$ of a symmetric random walk $(X_t)_{t\geq0}$ on $\mathbb{Z}^d$, restricted to a finite, connected subset:
\begin{equation*}
\Delta_I f(x) = \sum_{y\in\mathbb{Z}^d:\ |x-y|=1} \omega_{xy} [f(y)-f(x)], \qquad x\in I,\ f: \mathbb{Z}^d \rightarrow \mathbb{R},\ \mathrm{supp}(f)\subset I
\end{equation*}
where $\omega_{xy}=\omega_{yx}\in(0,\infty)$ are symmetric weights.
Then I need $\Lambda(V):=\lambda(V)-\lambda(0)$ to be Gâteaux differentiable and continuous with respect to pointwise convergence in order to apply a large deviations principle with rate function $\Lambda$.
 A: Proposition. Let $P(x,t)=\sum_{i=0}^na_i(t)x^i$ where the $(a_i(t))$ are $C^k$. We assume that $P(x_0,t_0)=0$ where $x_0$ is a simple root of $P(x,t_0)=0$. Then, in a neighborhood of $(x_0,t_0)$, there is $\phi\in C^k$ s.t. $x_0=\phi(t_0),P(\phi(t),t)=0$.
Proof. Since $x_0$ is a simple root, $\dfrac{\partial P}{\partial x}(x_0,t_0)\not= 0$. According to the implicit function theorem, we are done. 
Application. Let $A(t)$ be a non-negative irreducible matrix that $C^k$ depends on $t$. Then $\rho(A(t))$ is a simple positive  eigenvalue of $A(t)$ and, consequently, is a $C^k$ function of $t$ (put $P(x,t)=\det(A(t)-xI_n)$).
Now, when the eigenvalues of $A(t)$ are not simple, it is more complicated. One can prove that there are CONTINUOUS functions $(x_i(t))_{i\leq n}$ (eventually complex) s.t. for every $t$, $spectrum(A(t))=(x_i(t))_{i\leq n}$. Thus, if $A(t)$ is symmetric, then the greatest eigenvalue of $A(t)$ is $\sup_ix_i(t)$, that is clearly a continuous function of $t$.
EDIT. Answer to @ Amarus . Your question is essentially about the continuity (or diff.) of the roots of a polynomial. The question of continuity is treated here: 
http://www.ams.org/journals/proc/1965-016-01/S0002-9939-1965-0171902-8/S0002-9939-1965-0171902-8.pdf
Note that all proofs of the previous result use the Rouché's theorem.
There is an intermediate result: if the polynomial has real $C^{\infty}$ coefficients with only real roots (hyperbolic polynomial), then each root is Lipschitz (due to Bronshtein) -one can soften the condition $C^{\infty}$-
Beware. The eigenvectors cannot necessarily be written as continuous functions.
