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?
 A: 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$.
A: Variant @Macavity .
We use a form of the Young's inequality wich is a somewhere a generalization of the Bernoulli's inequality :
Let $a,b>0$ and $0<v<1$ then we have :
$$av+b(1-v)\geq a^vb^{1-v}$$
Taking account of this theorem and putting :
$a=(1+x)$$\quad$$b=1$$\quad$$v=(1-x)$ we get $0< x<1$:
$$(1+x)^{2(1-x)}\leq ((1+x)(1-x)+1-(1-x))^2$$
Again :
$a=(1-x)^2,b=1,v=x$
$$(1-x)^{2x}\leq (1-x)^{2}x+1-x$$
Or :
$$(1-x)^{2x+2}\leq (1-x)^2((1-x)^{2}x+1-x)$$
Adding the inequalities we got :
$$(1-x)^3x^2\geq 0$$


We have also :
$$f\left(x\right)=\frac{2^{\left(1-x^{2}\right)}\left(1+x^{\frac{1}{3}}\right)}{2}x^{2+\frac{1}{\ln2}-\ln12}+1-x^{2},h(x)=f(1-x),g\left(x\right)=(1+x)^{2(1-x)}$$
Then for $x\in(0,1)$ :
$$h(x)>g(x)$$
