# Computing Two-Norm for interpolation of functions

$$f(x) = x^3, p(x) = (3/2)x^2 − (1/2)x$$

The two-norm of f(x) - p(x) is: $$( \int_0^1 (f(x) - p(x))^2 dx )^{1/2}$$

p(x) interpolates f(x) at $$x=0, x=1/2, x=1$$

The result of the two-norm computation should be $$\sqrt{210}/420$$

I can't seem to calculate the numerator $\sqrt{210}$ correctly. What would be the proper way?

If $$f(x)=x^3 \quad , \quad p(x)=\frac{3 }{2}x^2-\frac{1}{2}x$$ then $$f(x)-p(x)=x^3-\frac{3 }{2}x^2+\frac{1}{2}x$$ Now square carefuly and group terms for same powers of $x$ to get $$\big(f(x)-p(x)\big)^2=x^6-3 x^5+\frac{13 }{4}x^4-\frac{3 }{2}x^3+\frac{1}{4}x^2$$ Integrate each term $$\int \big(f(x)-p(x)\big)^2\,dx=\frac{1}{7}x^7-\frac{1}{2}x^6+\frac{13 }{20}x^5-\frac{3 }{8}x^4+\frac{1}{12}x^3$$
• For $x=0$, the result of the integral is $0$; for $x=1$, it is $\frac{1}{840}$ the square of which being $???$ – Claude Leibovici Nov 5 '15 at 16:56