# Calculus of variation

This is probably simple but I'm stuck somewhere. I am trying to solve the calculus of variation problem that arise in an applied field: $$\min_{f \in C^1} \int^1_0 \int^1_0 (x-y)^2f(x,y)dxdy$$ $$\text{s.th: } f\geq 0 \text{, } \int^1_0 f(x,y)dy=1 \text{ and } \int^1_0 y \partial_x f(x,y) dy=0 \text{ }\forall\text{ } x.$$

I tried standard techniques - perturbations with test functions - but because of the bidimensionality I'm missing something.

• Would $1$-dimensional variants help? – Włodzimierz Holsztyński Dec 26 '14 at 22:16
• I know how to handle the one dimensional variant but this problem (the constraint on $\partial_x f$ in particular) that I have trouble with. – skillfeedback Dec 26 '14 at 22:23
• Is that constraint not simply $\int_0^1 y f(x,y) dy = \textrm{constant}$? And if so, one thing to notice is that in that case the functional to minimise can be simplified to $\int_0^1 \int_0^1 y^2 f(x,y) dx dy$. – José Figueroa-O'Farrill Dec 26 '14 at 22:30
• Observation made but then it seems to me that it would be $$\min_{f,c} \int^1_0 \int^1_0(x^2+y^2)f(x,y)dxdy - c$$ and other constraints. It doesn't seem like c is free. – skillfeedback Dec 26 '14 at 22:45
• Ah, indeed. $c$ is not free and needs to be varied as well. But why the $x^2$? That's just a constant term, surely. – José Figueroa-O'Farrill Dec 27 '14 at 3:01

For the moment, fix $$c=\int_0^1 yf(x,y)\,dy.$$ It is clear that we must have $0\le c\le 1$ to satisfy the constraints on $f$. We can write the integral to be minimized as $$\int_0^1\Bigl(x^2-2cx+\int_0^1 y^2f(x,y)\,dy\Bigr)\,dx.$$ Now we fix $x$ and minimize the inner integral. Since by Cauchy-Schwarz we have $$c^2\le \int_0^1 f(x,y)\,dy\int_0^1 y^2f(x,y)\,dy=\int_0^1 y^2f(x,y),$$with equality only if $f(x,y)=\delta(y-c)$, we find that the minimum is achieved when $f(x,y)=\delta(y-c)$. It remains to find $c$. With $f(x,y)=\delta(y-c)$, the outer integral becomes $\int_0^1 (x-c)^2\,dx$, which is minimized when $c=1/2$.
• Wasn't the OP asking for $f \in C^1$? – José Figueroa-O'Farrill Dec 27 '14 at 13:09
• $C^1$ was the best I could hope for but a distribution is fine. I'm surprised that it could be solved with simple tricks like Cauchy-Schwarz. Thank you. – skillfeedback Dec 27 '14 at 17:22
• @Figueroa: Since distributions can only be approximated by $C^1$ functions, the minimum on $C^1$ functions does not exist; it is only an infimum. – Michael Renardy Dec 27 '14 at 17:27