Norms on continuous function

Let $$f(x)=x^2-x$$, $$x\in[-1,1]$$. Find $$\lVert f\rVert_2$$.

Some other norms on $$C[a,b]$$:
$$\lVert f\rVert_1=\int_a^b \lvert f(x)\rvert~\mathrm{d}x$$.
$$\lVert f\rVert_2=\left(\int_a^b \lvert f(x)\rvert^2~\mathrm{d}x\right)^{1/2}$$.

I know the answer to this problem is $$\sqrt{\frac{2}{3}}$$, but am unable to solve it; the only way I get the answer is if I ignore the square. Can I get some help please?

• Hint: $(x^2-x)^2=x^4-2x^3+x^2$. Commented Jan 1, 2023 at 12:59
• Since you are only interested in $\|f\|_2$, what's the point of defining $\|f\|_1$? Commented Jan 1, 2023 at 13:12
• How positive are you that the correct solution is $\sqrt{\frac{2}{3}}$? Commented Jan 1, 2023 at 13:20
• 100% correct, that’s the answer given. Commented Jan 1, 2023 at 19:26
• @Lorago already done this, it was first method does not provide the answer Commented Jan 1, 2023 at 19:28

Following your definition of $$\left\Vert f\right\Vert_2$$ one can simply insert $$f\left(x\right)=x^2-x$$ into the formula and integrate the sum term by term:
\begin{aligned} \left\Vert f \right\Vert_2 &= \sqrt{\int_{-1}^1\left\vert x^2 - x\right\vert^2 dx}\\ &= \sqrt{\int_{-1}^1x^4-2x^3+x^2dx}\\ &= \sqrt{\left. \frac{1}{5}x^5 - \frac{1}{2}x^4 + \frac{1}{3}x^3 \right\rvert_{-1}^1}\\ &= \sqrt{\frac{1}{5}-\frac{1}{2}+\frac{1}{3}-\left(-\frac{1}{5}-\frac{1}{2}-\frac{1}{3}\right)}\\ &= \sqrt{\frac{2}{5}+\frac{2}{3}} = \sqrt{\frac{16}{15}} = \frac{4}{\sqrt{15}} \end{aligned}