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?

  • 4
    $\begingroup$ Then there are infinitely many as $f\big|_{[0,1]}\equiv \frac{1}{2}$. $\endgroup$
    – Sumanta
    Jun 28, 2020 at 18:22
  • 4
    $\begingroup$ Your argument is correct. $\endgroup$ Jun 28, 2020 at 18:22
  • 1
    $\begingroup$ Your work is correct $\endgroup$ Jun 28, 2020 at 18:23
  • 1
    $\begingroup$ 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 $\endgroup$ Jun 28, 2020 at 18:24
  • 3
    $\begingroup$ This is a trick question, more about legal nitpicking than mathematics. $\endgroup$
    – copper.hat
    Jun 28, 2020 at 19:01

2 Answers 2


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.

  • $\begingroup$ 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}$ $\endgroup$ Jun 28, 2020 at 18:32
  • 1
    $\begingroup$ 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]$. $\endgroup$ Jun 28, 2020 at 18:36
  • $\begingroup$ True, but we can write $f(x)(1-f(x))=\frac{1}{4}-(f(x)-\frac{1}{2})^2$ for all x in R. $\endgroup$ Jun 28, 2020 at 18:38
  • $\begingroup$ Got it now. Thanks!!! $\endgroup$ Jun 28, 2020 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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .