= Solution
Choose homogeneous <Dirichlet boundary conditions>, $y(a)=y(b)=0$, and nonzero admissible <functions> with finite $F$ and positive $G$. Variations obey the same zero endpoint values. At a stationary <Rayleigh quotient>, set $\lambda=F[y]/G[y]$. Then
$$
0=G\,\delta\Lambda=\delta F-\lambda\delta G=2[py'\eta]_a^b+2\int_a^b\left[-(py')'+qy-\lambda wy\right]\eta\,dx.
$$
The boundary term vanishes, and the <fundamental lemma of the calculus of variations> gives the <Sturm-Liouville equation> $-(py')'+qy=\lambda wy$. Thus stationary <functions> are <eigenfunctions>. Conversely, multiply that equation by $y$ and integrate by parts to obtain $F=\lambda G$; its first <variation> then vanishes by the same calculation. This proves that stationary values are the corresponding <eigenvalues>. Homogeneous <Neumann boundary conditions> also make the displayed boundary terms vanish; general <Robin boundary conditions> can require a boundary contribution to the quadratic form.
For $p=1$, $q=0$, $w=x$ on $(0,\pi)$, the <polynomial> <trial function> $y=x(\pi-x)$ satisfies the endpoint conditions. Its <Rayleigh quotient> uses
$$
F=\int_0^\pi(\pi-2x)^2dx=\frac{\pi^3}3,\qquad G=\int_0^\pi x^3(\pi-x)^2dx=\frac{\pi^6}{60},
$$
so the <polynomial> estimate is $\boxed{\lambda_{\rm poly}=20/\pi^3\simeq0.64503}$. The trigonometric <trial function> $y=\sin x$ gives
$$
F=\frac\pi2,\qquad G=\int_0^\pi x\sin^2x\,dx=\frac{\pi^2}4,
$$
and hence $\boxed{\lambda_{\rm trig}=2/\pi\simeq0.63662}$. Both are \b[upper bounds] on the lowest <eigenvalue>, by the <Rayleigh-Ritz method>; neither trial is an exact <eigenfunction>, so the inequalities are strict.
Their closeness has a useful explanation beyond their similar single-arch shapes. Both <trial functions> are symmetric under $x\mapsto\pi-x$, forcing $\int_0^\pi xy^2dx=(\pi/2)\int_0^\pi y^2dx$. The <reflection-symmetric trials for a linearly weighted Rayleigh quotient> therefore reduce this problem to a constant multiple of the ordinary Dirichlet energy quotient. The <sine> is the best trial within this symmetric class, and the <polynomial>'s value is only a factor $10/\pi^2\simeq1.0132$ larger. The unrestricted lowest <eigenfunction> can be asymmetric because the weight $x$ is asymmetric.
Back to article page