<s>[INST] If $a,b>0$ and $a+b=2$ , prove that $a^{2b}+b^{2a}+(\frac{a-b}2)^2\leqslant2$ If $a,b>0$ and $a+b=2$ , prove that
$$
a^{2b}+b^{2a}+(\frac{a-b}2)^2\leqslant2
$$
The equality occurs if and only if $(a,b)\sim(1,1)$ or $(a,b)\sim(2,0)$ or its cyclic permutations.
My attempt:
By symmetry and the constraint, we may let $x=a-1=1-b$ , the inequality converts to
$$
(1+x)^{2(1-x)}+(1-x)^{2(1+x)}+x^2\leqslant2
$$
I tried to let $f(x):=(1+x)^{2(1-x)}+(1-x)^{2(1+x)}+x^2$ , but its derrivative is too complicated. I also tried to write $(1+x)^{1-x}$ as $e^{2(1-x)\ln(1+x)}$ and apply inequalities like $\ln x\leqslant x-1$ , $e^x\leqslant\dfrac{1}{1-x}$ and such, but it would be either too complicated or too crude.
How to solve it?
 [/INST] Following your approach, WLOG, let $a=1-x, b=1+x$ for some non-negative real $x \in [0, 1)$.  Then we have to show: $f = (1-x)^{2+2x}+(1+x)^{2-2x}+x^2 \leqslant 2$
Using the case of Bernoulli's inequality where exponent is in $(0,1)$, we have $(1-x)^{1+x} \leqslant (1-x)(1-x^2)$.
Again by Bernoulli's inequality, $(1+ x)^{1-x} \leqslant 1+ x(1-x) = (1+x-x^2)$
Hence $f \leqslant (1-x)^2(1-x^2)^2+(1+x-x^2)^2+x^2 = 2-x^2(1+x)(1-x)^3\leqslant 2$, with maximum when $x=0 \implies (a,b)=(1,1)$.
--
Of course, if $x=1$ is possible, then that is a maximum as well, but then one among $a, b \not >0$.
</s>