# Question #f27d5

One obvious choice is $g \left(x\right) = 2$, so ${\int}_{0}^{1} {\left(g \left(x\right)\right)}^{2} \mathrm{dx} = 4$
I leave it to the students to find another function $g$ with ${\int}_{0}^{1} g \left(x\right) \mathrm{dx} = 2$ but with ${\int}_{0}^{1} {\left(g \left(x\right)\right)}^{2} \mathrm{dx} \ne 4$.