Minimizing $\int_{0}^{1} (1+x^2)f^2(x)dx$ What is 
$$\min_{f\in D} \int_{0}^{1} (1+x^2)f^2(x)\mathrm dx,$$
where $D$ is the collection of all continuous real functions from $[0,1]$ such that $\int_{0}^{1} f(x)$ = 1.
My attempt
Note that $\int_{0}^{1} (1+x^2)f^2(x)dx$ = $\int_{0}^{1} f^2(x)dx$ + $\int_{0}^{1} x^2f^2(x)dx$. 
Now, by Schwarz inequality, $\int_{0}^{1} f^2(x)dx$ $\geq (\int_{0}^{1} f(x)dx)^2$ and
$\int_{0}^{1} (xf(x))^2dx$ $\geq (\int_{0}^{1} xf(x)dx)^2$.
$\int_{0}^{1} xf(x)dx$ = ?. What I tried what follows:
Let F(x) = $\int_{0}^{x}f(t)dt$. Then, $\int_{0}^{1} xf(x)dx$ = $xF(x)\vert_0^1 - \int_{0}^{1} F(x)dx$ \. I am stuck at this point. However, even if I somehow compute this integral, still I don't believe that ($\int_{0}^{1} xf(x)dx$)^2 + ($\int_{0}^{1} f(x)dx$)^2  is the required minimum. Please suggest.
P.S: Obvious, however for clarification, f^2 is not composition, but pointwise multiplication.
 A: By Cauchy Schwarz,
$$\begin{split}
1 &= \int_0^1 f(x) \mathrm dx \\
&= \int_0^1 f(x) \sqrt{1+x^2} \frac{1}{\sqrt{1+x^2}} \mathrm dx \\
&\le \sqrt{\int_0^1 (1+x^2) f^2(x) \mathrm dx}\sqrt{ \int_0^1 \frac{1}{1+x^2} \mathrm dx} \\
&= \sqrt{\frac{\pi}{4}} \sqrt{\int_0^1 (1+x^2) f^2(x) \mathrm dx}.
\end{split}$$
Thus 
$$\int_0^1 (1+x^2) f^2(x) \mathrm dx \ge \frac{4}{\pi}$$
for all $f\in D$, and equality holds if and only if
$$f(x) \sqrt{1+x^2}  = C\frac{1}{\sqrt{1+x^2}} \Rightarrow f(x) = \frac{C}{1+x^2}.$$
Using $\int_0^1 f(x)\mathrm dx = 1$ again, we found $C = \frac{4}{\pi}$. So 
$$f(x) = \frac{4}{\pi(1+x^2)}$$
is the minimizer. 
A: This kind of problems is usually best solved using calculus of variations. Consider the functional
$$\mathcal{L}[f] = \int_0^1(1+x^2)f(x)^2dx$$
on your space of functions integrating to $1$. Let $g:[0,1]\to\mathbb{R}$ be a function which integrates to $0$, then we have
$$\left.\frac{d}{d\varepsilon}\right|_{\varepsilon=0}\mathcal{L}[f+\varepsilon g] = \int_0^12(1+x^2)f(x)g(x)dx.$$
In order to find the critical points of the functional (and thus the minimum we are looking for), we want this expression to equal zero for all possible $g$. As we ask that $g$ integrates to $0$, this implies that we must have
$$2(1+x^2)f(x)\equiv\text{const.},$$
so that
$$f(x) = \frac{k}{1+x^2}.$$
By direct inspection, we get that in order for $f$ to integrate to $1$, $k=\tfrac{4}{\pi}$.
(Thanks to @JohnMa for pointing out my errors!)

WHAT FOLLOWS BELOW IS WRONG. I'M TRYING TO UNDERSTAND WHY.
Another way to see this is the following: let $f(x)$ be any function integrating to $1$, let $\xi_{I,J}:\mathbb{R}\to\mathbb{R}$ be the bump function with support on the closed interval $I$ and which is $1$ on the closed interval $J\subset I^\circ$. Consider
$$\tilde{f}(x) = f(x) + \xi_{[0,\tfrac{1}{2}],[\tfrac{1}{8},\tfrac{3}{8}]}(x) - \xi_{[\tfrac{1}{2},1],[\tfrac{5}{8},\tfrac{7}{8}]}(x)$$
(sorry for the ugly notation). You can easily show that $\tilde{f}$ integrates to $1$ and that $\mathcal{L}[\tilde{f}]<\mathcal{L}[f]$. As $f$ was arbitrary, this proves that there is no minimizer.
