Solution (source code)

= Solution

Choose the real leading <eigenfunction> $y_1=C\sin x$, keeping its amplitude $C\ne0$ fixed. At first order in the <regular perturbation> expansion, the equation becomes
$$
y_{11}''+y_{11}=-\lambda_{11}y_1-y_1^2,\qquad y_{11}(0)=y_{11}(\pi)=0.
$$
The operator $L=D^2+1$ with these homogeneous <Dirichlet boundary conditions> is <self-adjoint>, as allowed in the question, and its <null space> is spanned by $y_1$. The <Fredholm solvability condition> requires the forcing to be <orthogonal> to that <null space>:
$$
0=\int_0^\pi y_1\bigl(-\lambda_{11}y_1-y_1^2\bigr)\,dx.
$$
The same condition follows directly by integrating $y_1Ly_{11}$ by parts: the endpoint term $[y_1y_{11}'-y_1'y_{11}]_0^\pi$ vanishes, and $Ly_1=0$. Since a nonzero real $y_1$ has a positive squared <integral>,
$$
\boxed{\lambda_{11}=-\frac{\displaystyle\int_0^\pi y_1(x)^3\,dx}{\displaystyle\int_0^\pi y_1(x)^2\,dx}.}
$$
This is the requested expression and is an instance of the <leading nonlinear eigenvalue shift in a Sturm-Liouville problem>. In the amplitude convention above, $\int_0^\pi\sin^2x\,dx=\pi/2$ and $\int_0^\pi\sin^3x\,dx=4/3$, so $\lambda_{11}=-8C/(3\pi)$. For the particular choice $C=1$, it is $-8/(3\pi)$.

The <amplitude dependence of a nonlinear eigenvalue correction> follows here from the quadratic term: rescaling the <eigenfunction> changes the <eigenvalue> shift. There is no single numerical correction independent of the chosen leading amplitude. Once the <solvability condition> is met, $y_{11}$ is determined up to addition of a multiple of $y_1$; a normalization such as $\int_0^\pi y_1y_{11}\,dx=0$ can fix that remaining freedom.