# An Integral Estimate

### Solution 1

For all $x,$ $a\le f(x)\le b.$ It follows hat

\begin{align} b(f(x)-a)(f(x)-b)&\le f(x)(f(x)-a)(f(x)-b)\\ &\le a(f(x)-a)(f(x)-b).\end{align}

Thus,

(1)

\displaystyle\begin{align}\int_0^1b(f(x)-a)(f(x)-b)dx&\le \int_0^1f(x)(f(x)-a)(f(x)-b)dx\\ &\le \int_0^1a(f(x)-a)(f(x)-b)dx.\end{align}

Observe that

(2)

$\displaystyle \int_0^1f(x)(f(x)-a)(f(x)-b)dx=\int_0^1f^3(x)dx-(a+b).$

(3)

$\displaystyle \int_0^1a(f(x)-a)(f(x)-b)dx=a+a^2b.$

(4)

$\displaystyle \int_0^1b(f(x)-a)(f(x)-b)dx=b+ab^2.$

From (1)-(4),

$\displaystyle ab^2+2b+a\le\int_0^1f^3(x)dx\le a^2b+2a+b.$

More than what has been asked for.

### Solution 2

\displaystyle \begin{align} &a\le f(x)\le b\;\Rightarrow\;(f(x)-a)^2(f(x)-b)\le 0\\ &(f^2(x)-2af(x)+a^2)(f(x)-b)\le 0\\ &f^3(x)-bf^2(x)-2af^2(x)+2abf(x)+a^2f(x)-a^2b\le 0\\ &\int_0^1f^3(x)dx-(b+2a)\int_0^1f^2(x)dx\\ &\qquad\qquad\qquad\qquad+(2ab+a^2)\int_0^1f(x)dx-a^2b\le 0\\ &\int_0^1f^3(x)dx-(b+2a)\le a^2b\\ &\int_0^1f^3(x)dx\le a^2b+b+2a. \end{align}

Similarly, $(f(x)-a)(f(x)-b)^2\ge 0$ implies

$\displaystyle \int_0^1f^3(x)dx\ge ab^2+2b+a.$

Again, getting more than was asked for.

### Remark

The two estimates together result, by transitivity, in

$ab^2+2b+a\le a^2b+b+2a$

which is equivalent to $(ab+1)(a-b)\ge 0.$ Since $a\lt b,$ we need to have $ab+1\le 0.$ On the other hand, it follows from $\displaystyle \int_0^1f(x)dx=0$ that $a\lt 0\lt b.$

We may conclude that the problem, in its generality, may not make sense. Unless additional conditions are imposed on $a$ and $b$ there may not be a function $f$ that satisfies the two integral constraints. The two conditions, just mentioned, are necessary. Area they sufficient?

For which $a$ and $b$ there exists a function $f:\,[0,1]\to [a,b]$ such that

$\displaystyle \int_0^1f(x)dx=0$ and $\displaystyle \int_0^1f^2(x)dx=1?$

Long Huynh Huu has constructed such a function, thus proving that the conditions $a\lt 0\lt b$ and $ab+1\le 0$ are also sufficent.

Suppose $-ab=C^{-1}\ge 1$ and $\displaystyle \lambda=\frac{Cb}{b-a}.$ Obviously, $0\lt\lambda\lt C.$ Define

$\displaystyle f_{C,\lambda}(x)=\begin{cases} a,&x\in [0,\lambda)\\ b,&x\in [\lambda,C)\\ 0,&x\in [C,a] \end{cases}$

It is easy to check that $\displaystyle \int_0^1f_{C,\lambda}(x)dx=0$ and $\displaystyle \int_0^1f^2_{C,\lambda}(x)dx=1.$

### Acknowledgment

Found on the web that problem with the two solutions above. Something is not right. What is it? Read Remark.