# Show that $f(x) = 1$ for all the interval

Let $f(x)$ a continuous function over $[a,b]$

Suppose that

$$\frac{1}{b-a} \int_a^b (f(x))^2 \, dx = 1$$ And

$$\frac{1}{b-a} \int_a^b f(x) \, dx = 1$$

Show that $f(x) = 1$ for all $x \in [a,b]$.

I've tried to use the Mean Value Theorem for integrals and I've just got that exist $c \in [a,b]$ such that $f(c) = 1$ , I am not sure how to introduce the first assumption.

Outline:

Show that if $g$ is continuous and non-negative in $[a,b]$ and $\int_a^b g(x) \, dx = 0$ then $g(x)=0$.

Then prove this condition is true for $g(x)=(f(x)-1)^2$.

• It is an elegant idea, thank you. – JulianP Jan 18 '15 at 2:55
• That's not a hint; that's sketch of the solution. It remains only to fill in details. ${}\qquad{}$ – Michael Hardy Jan 18 '15 at 3:05
• Yeah, I wa originally gonna make it a hint about computing $\int (f(x)-1)^2dx$ then changed my plan. @MichaelHardy – Thomas Andrews Jan 18 '15 at 3:08
• ok.... ${}\qquad{}$ – Michael Hardy Jan 18 '15 at 3:08

Alternate approach use the identity:

$$\int_a^b f^2(x)\,dx\int_a^b g^2(x)\,dx - \left(\int_a^b f(x).g(x)\,dx\right)^2 \\= \frac{1}{2}\int_a^b\int_a^b (f(x)g(y) - g(x)f(y))^2\,dx\,dy$$

with $g(x) = 1$, the $LHS = 0$ by the given conditions, which imply $f(x) =f(y)$

since, $(f(x) - f(y))^2 \ge 0$ and $$\displaystyle \int_a^b\int_a^b (f(x) - f(y))^2\,dx\,dy = 0 \implies f(x) - f(y) = 0$$

i.e., $f$ is a constant function.

Note: This is a proof of Cauchy-Schwarz Inequality and you equations are dealing with the equality case of this inequality.

• You probably need a double integral if you have $dx\,dy$ in the right side of the equality. – Thomas Andrews Jan 18 '15 at 3:19
• @ThomasAndrews thanks! – sciona Jan 18 '15 at 3:37

Let's assume $a=0,b=1$ (just to make it simpler). So, the givens are $\newcommand{\d}{\operatorname{d}\!}\int_0^1(f(x))^2\d x=1$ and $\int_0^1f(x)\d x=1$.

Now, consider the value $\int_0^1(f(x)-1)^2\d x$. Note that $\int_0^1(f(x)-1)^2\d x=0$ iff $f(x)=1$. (Do you see why?)

Now: \begin{align} \int_0^1(f(x)-1)^2\d x&=\int_0^1\left((f(x))^2-2f(x)+1\right)\d x\\ &=\int_0^1(f(x))^2\d x-2\int_0^1f(x)\d x+\int_0^11\d x\\ &=1-2+1\\ &=0 \end{align} Thus, $\int_0^1(f(x)-1)^2\d x=0$, and therefore $f(x)=1$.

• The same idea works for a general $a,b$. I chose $(a,b)=(0,1)$ just to make the algebra simpler. – Akiva Weinberger Jan 18 '15 at 2:38

Hint:

First, suppose $a=0$ and $b=1$, it will make things easier. Now, suppose $f$ is not $1$ all the time. Hence you could pick a small interval $I\subset [0,1]$ such that $f(x)>1+\epsilon$ for all $x\in I$, where $\epsilon>0$ is a constant. Can you make a contradiction from here? (Note that if $f(x)>1+\epsilon$, then $f^2>f$)

• Why would that matter, since there might also be an interval where $f^2<f$? – Thomas Andrews Jan 18 '15 at 2:47
• I agree with @ThomasAndrews, this hint doesn't seem to lead anywhere. – JLA Jan 18 '15 at 3:17