# Minimum value of integral [closed]

If $$A = \int_0^1 x^2f(x)\,\mathrm dx$$ and $$B = \int_0^1 x(f(x))^2\,\mathrm dx,$$ then find the minimum value of $$(B-A)$$.

Edit: Also deduce $$f(x)$$.

• Welcome to MSE! What have you tried? Jun 3, 2019 at 16:30
• I couldn't figure out where to even start so i tried substituting values for f(x) like polynomials. I also tried Euler-Lagrange-equation to simplify it but i reached nowhere. Jun 3, 2019 at 16:32
• By completing the square, we get $$B - A = \int_{0}^{1} \left( x \left( f(x) - \frac{x}{2}\right)^2 - \frac{x^3}{4} \right) \, \mathrm{d}x.$$ We see that this difference is minimized when $f(x) - \frac{x}{2}$ is identically zero, and so, $$B - A \geq -\int_{0}^{1} \frac{x^3}{4}\,\mathrm{d}x = -\frac{1}{16}$$ the equality if and only if $f(x) = \frac{x}{2}$ almost everywhere (or everywhere, if you are looking for continuous functions only). Jun 3, 2019 at 16:46

Here is an elementary way to do it. Write $$y=f(x)$$, then $$B-A = \int _0^1 (x(y^2-xy+{x^2\over 4}) - {x^3\over 4})\; dx$$

$$= \int _0^1 (x\cdot \underbrace{(y-{x\over 2})^2 }_{\geq 0} - {x^3\over 4})\; dx$$

$$\geq \int _0^1 ( - {x^3\over 4})\; dx =-{1\over 16}$$

and the minimu is attaned at $$f(x)={x\over 2}$$

$$B-A = \int_{0}^{1} xf^2-x^2f dx = \int_{0}^{1} L(x,f) dx,$$ $$L(x,f) = xf^2-x^2f.$$ $$\frac{\partial L}{\partial f} = 0 \hspace{0.2in}\text{(Euler-Lagrange equation)}$$ $$\implies 2xf(x)-x^2 = 0 \implies f(x) = \frac{1}{2}x.$$ So, $$B-A = \int_{0}^{1} \frac{1}{4}x^3 - \frac{1}{2}x^3 dx = -\frac{1}{16}.$$

In order to minimize the integrand, we want to minize the function that is being integrated.

So in our case we want to find a $$f:[0,1]\to\Bbb R$$ such that the integrand $$xf(x)^2-x^2f(x)$$ is as small as possible for every $$x\in[0,1]$$.

For every $$x\in[0,1]$$, define $$F_x:\Bbb R\to\Bbb R: y\mapsto xy^2-x^2y$$. We want to minimize $$F_x$$ for every $$x\in[0,1]$$. Note that $$F_x'(y)=2xy-x^2$$. So $$F_x'(y)=0\iff y=\frac x2$$. Mini-exercise for you: Check that this $$y=\frac x2$$ minimizes every $$F_x$$.

Thus, we conclude that $$f(x)=\frac x2$$ minimizes our integral. For this $$f$$, we have

$$B-A=-\int_0^1 \frac{x^3}4\,\mathrm dx = -\frac1{16}.$$

• Please desist from making "cosmetic" edits to my posts. I prefer my style and do not appreciate your editing. Jun 4, 2019 at 2:00
• @MarkViola I suppose you are referring to this answer of yours? All I did was change $dx$ to $\mathrm dx$. Sorry if you prefer $dx$, it was not my intention to bother you. Jun 4, 2019 at 7:49
• Yes, I prefer $dx$. Jun 4, 2019 at 14:12