I have the following task, which I do not know how to solve properly.
(a) For continuous function $f(x)$ find: $$ \frac{d}{da} \iint\limits_{-a\leqslant x,y \leqslant a} f \left( \frac{x+y}{2} \right) dx dy. $$ (b) Describe all continuous functions $f(x)$ such that for all $a \in \mathbb{R}$ holds: $$\iint\limits_{-a \leqslant x,y \leqslant a} f \left( \frac{x+y}{2} \right) dx dy = \int\limits_{-a}^{a} f(x) dx.$$
One can note, that our integration bounds is a square centred at 0 and $f(\frac{x+y}{2})$ is constant on every line of the form $y = -x + C$. So I tried to rotate the axes by $\frac{\pi}{4}$ so later I could integrate along the diagonals, but this didn't work out, because integration bounds also changed.
Then I decided to change the variables "manually". In outer integral we should run from $(-a,-a)$ to $(a,a)$ along the $y=x$ axis and along $y=-x+C$ with dynamically changing bounds in the inner integral. I geometrically found integration bounds and split the square on two triangles (because I couldn't find bounds for inner integral that would work in both cases). What I got was this:
\begin{equation} \begin{split} \iint\limits_{-\leqslant x,y \leqslant a} f \left( \frac{x+y}{2} \right) dx dy & = \int\limits_{-a}^a \int\limits_{-a}^a f \left( \frac{x+y}{2} \right) dx dy \\ & = \int\limits_{-a\sqrt{2}}^0\ \int\limits_{a\sqrt{2}+t}^{a\sqrt{2}-t} f \Big( \frac{t\sqrt{2}}{2} \Big) ds dt + \int\limits_{0}^{a\sqrt{2}}\ \int\limits_{a\sqrt{2}-t}^{a\sqrt{2}+t} f \Big( \frac{t\sqrt{2}}{2} \Big) ds dt \end{split} \end{equation}
After that I got rid of the inner integral and took the derivative. The result was $4a(f(a) + f(-a))$. As you can guess all these manipulations are rather handwavy and not well justified, so how one should attack this problem in a good systematic way?
As to part (b), I reasoned as follows. As our functions are equal, their derivatives should be equal. So let's just differentiate both sides. We get:
\begin{equation} \iint\limits_{-a \leqslant x,y \leqslant a} f \left( \frac{x+y}{2} \right) dx dy = \int\limits_{-a}^{a} f(x) dx \\ \frac{d}{da}\iint\limits_{-a \leqslant x,y \leqslant a} f \left( \frac{x+y}{2} \right) dx dy \equiv \frac{d}{da}\int\limits_{-a}^{a} f(x) dx \\ 4a\big(f(a) + f(-a)\big) = f(a) + f(-a) \\ \big(f(a) + f(-a)\big) \cdot \big(4a - 1\big) = 0 \\ f(a) = -f(-a) \end{equation} So the equation holds for all odd functions. Is it true?