Prove that $a^{\cos(b)^2}-b^{\cos(a)^2}\leq \frac{4}{\pi}(1-\frac{\pi}{2})b+\frac{\pi}{2}-1$ and the reverse inequality . It'a problem of my own :

Let $a\geq b>0$ such that $a+b=\frac{\pi}{2}$ then we have :
  $$a^{\cos(b)^2}-b^{\cos(a)^2}\leq \frac{4}{\pi}(1-\frac{\pi}{2})b+\frac{\pi}{2}-1$$
  Let $b\geq a>0$ such that $a+b=\frac{\pi}{2}$ then we have :
  $$a^{\cos(b)^2}-b^{\cos(a)^2}\geq \frac{4}{\pi}(1-\frac{\pi}{2})b+\frac{\pi}{2}-1$$

For the first the equality case is when $b=0$ or $b=\frac{\pi}{4}$ for the second when $b=\frac{\pi}{4}$ or $b=\frac{\pi}{2}$
The main remark is : the line $f(x)=\frac{4}{\pi}(1-\frac{\pi}{2})x+\frac{\pi}{2}-1$ is a chord of the curve defines by the function $g(x)=\Big(\frac{\pi}{2}-x\Big)^{\cos^2(x)}-\Big(x\Big)^{\sin^2(x)}$
So my idea was to derivate the function $g(x)$ we obtain :
$$g'(x)= (\frac{\pi}{2} - x)^{\cos^2(x)} \Big(-\frac{\cos^2(x)}{(\frac{\pi}{2} - x)} - 2 \log\Big(\frac{\pi}{2} - x\Big) \sin(x) \cos(x)\Big) - x^{\sin^2(x)} \Big(\frac{\sin^2(x)}{x} + 2 \log(x) \sin(x) \cos(x)\Big)$$
See that $g'(x)<0$ on the interval $[0,\frac{\pi}{2}]$ and apply the mean value theorem but I'm stuck after this.
If you have nice idea it would be cool.
Ps: Is there a symmetry with respect to the line ($f(x)$)?If yes we can cut in two the problem.
Thanks for sharing your time and knowledge .

put $x=\dfrac{\pi}{4}+a$
$h(a)=(\frac{\pi}{4}-a)^{\frac{1}{4}(\cos{a}-\sin{a})}+(\frac{\pi}{4}+a)^{\frac{1}{4}(\sin{a}+\cos{a})}$
$=i(a)+i(-a)$ 
$i''(x)$ is increasing  in the area $(-\frac{\pi}{4},0)$ and $i'(0)\geq-1$,  h(x) is the shape like which add two parabola.  
