Solution (source code)

= Solution

Bilinearity and symmetry follow from the corresponding properties of the <integral>. Since $w(x)>0$,
$$
\langle f,f\rangle=\int_a^b f(x)^2w(x)\,dx\geq0.
$$
If this integral is zero, the nonnegative continuous integrand must vanish everywhere, so $f=0$. Therefore the displayed formula is a real <inner product> on $C[a,b]$.