# True or False?: There are infinitely many continuous functions $f$ for which $\int_0^1f(x)(1-f(x))dx=\frac{1}{4}$

I was going through CMI 2019 paper; I stumbled upon the statement:

For $$f:R\rightarrow R$$, there are infinitely many continuous functions $$f$$ for which $$\int_0^1f(x)(1-f(x))dx=\frac{1}{4}$$.

My approach is, we can write $$f(x)(1-f(x))=\frac{1}{4}-(f(x)-\frac{1}{2})^2$$.

Now, we can write $$\int_0^1f(x)(1-f(x))dx=\frac{1}{4}-\int_0^1(f(x)-\frac{1}{2})^2dx$$

$$\Rightarrow \int_0^1(f(x)-\frac{1}{2})^2dx=0 \Rightarrow f(x)=\frac{1}{2}$$.

So, there must be only one function satisfying the condition. However, the official answer says the statement is true. Am I missing something?

• Then there are infinitely many as $f\big|_{[0,1]}\equiv \frac{1}{2}$. – Sumanta Jun 28 '20 at 18:22
• Your argument is correct. – Robert Israel Jun 28 '20 at 18:22
• Your work is correct – Andrew Shedlock Jun 28 '20 at 18:23
• Even I feel it is correct. It is just that CMI is a reputed institute for mathematics so I want to be sure that I have not ignored some important detail – Mathsmerizing Jun 28 '20 at 18:24
• This is a trick question, more about legal nitpicking than mathematics. – copper.hat Jun 28 '20 at 19:01

Your argument has missed the fact that the domain of $$f$$ is the entire real line, not only the interval $$[0,1]$$. You have correctly shown that the restriction of $$f$$ to $$[0,1]$$ must be $$1/2$$, but there are infinitely many continuous functions on $$\mathbb{R}$$ with this property.

• Domain for f is entire real line, but we are calculating integral from 0 to 1. And in any case $f(x)(1-f(x)) \le \frac{1}{4}$ – Mathsmerizing Jun 28 '20 at 18:32
• yes, but computing the integral over $[0,1]$ instead of $R$ doesn't mean that the domain of $f$ changes from $R$ to $[0,1]$. – user497898 Jun 28 '20 at 18:36
• True, but we can write $f(x)(1-f(x))=\frac{1}{4}-(f(x)-\frac{1}{2})^2$ for all x in R. – Mathsmerizing Jun 28 '20 at 18:38
• Got it now. Thanks!!! – Mathsmerizing Jun 28 '20 at 18:39

Here's an example based off of @Mike_Hawk's answer. Let

$$f(x)=\left\{\begin{matrix} \frac{1}{2} && \text{ for }x\leq 1\\ \left(\frac{1}{2}-b\right)x+b && \text{ for }x>1 \end{matrix}\right.$$

It is clear that $$f(x)$$ is continuous on $$\mathbb{R}\to\mathbb{R}$$ but that

$$\int_0^1 f(x)(1-f(x))dx=\frac{1}{4}$$

Since $$b$$ is a free variable, there are infinitely many continuous functions which satisfy your condition.