Solution (source code)

= Solution

Let
$$
\overline h_R=\frac{\int_{-R}^Rh(y)e^{-\Phi(y)}\,dy}{\int_{-R}^Re^{-\Phi(y)}\,dy},
\qquad
q=h-\overline h_R.
$$
Then $q'=h'$ and $q$ has zero weighted mean. Part (b) gives
$$
\|q\|_\infty^2\leq C_R^2\int_{-R}^R|h'|^2e^{-\Phi}.
$$
Therefore, with $Z_R=\int_{-R}^Re^{-\Phi}$,
$$
\int_{-R}^R|h-\overline h_R|^2e^{-\Phi}
\leq Z_RC_R^2\int_{-R}^R|h'|^2e^{-\Phi}.
$$
Thus the compact-interval <Weighted Poincare inequality> holds with
$$
\boxed{\lambda_R=(Z_RC_R^2)^{-1}>0}.
$$