I am quite bothered by this problem in Royden's 4th ed. Show that $||f||=\int\_{a}^{b} {x^2 |f|}$ is a norm given that $f\in L^1$ on $[a,b]$.

I want to show that $||f||=0$ iff $f=0$.
Am I doing this right?
if suppose $||f||=0$ then $||f||=\int\_{a}^{b} {x^2 |f|}=0$
that is, $0=||f||=|f| \int\_{a}^{b} {x^2 }$
then $|f|=0$ thus $f=0$.
am i right to assume that $|f|$ is a constant?