
\[a_{n}=\left(n+\tfrac{1}{2}\right)\int_{-1}^{1}f(x)P_{n}\left(x\right)\,\mathrm%
{d}x.\]