  We consider an inhomogeneous Erd\H{o}s-R\'enyi random graph $G_N$ with vertex
set $[N] = \{1,\dots,N\}$ for which the pair of vertices $i,j \in [N]$, $i\neq
j$, is connected by an edge with probability $r(\tfrac{i}{N},\tfrac{j}{N})$,
independently of other pairs of vertices. Here, $r\colon\,[0,1]^2 \to (0,1)$ is
a symmetric function that plays the role of a reference graphon. Let
$\lambda_N$ be the maximal eigenvalue of the adjacency matrix of $G_N$. It is
known that $\lambda_N/N$ satisfies a large deviation principle as $N \to
\infty$. The associated rate function $\psi_r$ is given by a variational
formula that involves the rate function $I_r$ of a large deviation principle on
graphon space. We analyse this variational formula in order to identify the
properties of $\psi_r$, specially when the reference graphon is of rank 1.
