Solution (source code)

= Solution

Multiplication by a positive weight puts the <differential equation> into <Sturm-Liouville form> if $(xw)'=(1-x)w$. Thus $xw'=-xw$, and the constant factor can be chosen so that
$$
\boxed{w(x)=e^{-x}},\qquad -(xe^{-x}y')'=n e^{-x}y.
$$
This fixes the otherwise arbitrary normalization of the weight consistently with the requested unit norms.

Write the <polynomial> as $p_n(x)=\sum_{j=0}^n c_jx^j$. Comparing coefficients gives
$$
(j+1)^2c_{j+1}+(n-j)c_j=0,\qquad c_0=1.
$$
Consequently $c_j=(-1)^j\binom nj/j!$, identifying the solutions as <Laguerre polynomials>. In particular,
$$
\boxed{p_0=1,\qquad p_1=1-x,\qquad p_2=1-2x+\frac{x^2}{2}}.
$$
Repeated <integration by parts> gives the moments $\int_0^\infty e^{-x}x^j\,dx=j!$. Therefore
$$
\begin{aligned}
\|p_0\|_w^2&=1,\\
\|p_1\|_w^2&=1-2(1!)+2!=1,\\
\|p_2\|_w^2&=1-4(1!)+5(2!)-2(3!)+\tfrac14(4!)=1.
\end{aligned}
$$
For later use, <integration by parts> in the weighted <eigenvalue equations> also gives
$$
(n-m)\langle p_n,p_m\rangle_w
=\left[xe^{-x}(p_np_m'-p_n'p_m)\right]_0^\infty=0.
$$
The endpoint expression vanishes because of the factor $x$ at zero and exponential decay at infinity. Hence distinct <Laguerre polynomials> are orthogonal, an instance of <orthogonality of Sturm-Liouville eigenfunctions>.