When your book refers to the norm of the Legendre polynomials it is using the $L^2$ norm, because the orthogonality relationship is
$$ \int_{-1}^{1} P_m(x) P_n(x) dx = \frac{2}{(2 m+1)} \delta_{mn} $$
So,
f[x_] := x^3 - 4 x^2 + 4 x + 2
a[m_, f_] := a[m, f] = (2 m + 1)/2 Integrate[LegendreP[m, x] f[x], {x, -1, 1}]
Manipulate[
k = Sum[a[m, f] LegendreP[m, #], {m, 0, i}] &;
Plot[{k[t], f[t]}, {t, -1, 1}, PlotLabel -> "Order: " <> ToString@i],
{i, 0, 5, 1}]

Another example:
f[x_] := UnitStep[x]
a[m_, f_] := a[m, f] = (2 m + 1)/2 Integrate[LegendreP[m, x] f[x], {x, -1, 1}]
k = Sum[a[m, f] LegendreP[m, #], {m, 0, i}] &;
Plot[Evaluate@Join[{f[t]}, Table[k[t], {i, 1, 9, 2}]], {t, -1, 1}, PlotRange -> All]
