If $0<x<\frac{\pi}{4}$ then prove that $\left(\sin x\right)^{\sin x}<\left(\cos x\right)^{\cos x}$. If $0&lt;x&lt;\frac{\pi}{4}$ then prove that $\left(\sin x\right)^{\sin x}&lt;\left(\cos x\right)^{\cos x}$.

My attempt:

If $0&lt;x&lt;\frac{\pi}{4}$ 

then $\sin x &lt;\cos x$

which means  $\left(\sin x\right)^{\sin x}&lt;\left(\cos x\right)^{\sin x}&lt;\left(\cos x\right)^{\cos x}$.

Am I correct. Can a more rigorous proof be given
I saw this solution in a textbook($103$ Problems in Trigonometry by Titu Andreescu) but i wanted a second opinion. The way the solution is it can only be answered by someone who has created the question and the solution.I will quote Titu:

Observe that the logarithmic function is concave down. 

We apply Jensen's inequality to the numbers $\sin x&lt;\cos x&lt;\sin x+\cos x$

with weights $\lambda_{1}=\tan x$ and $\lambda_{2}=1-\tan x$(because for $0&lt;x&lt;\frac{\pi}{4}$ we have $\lambda_{1}=\tan x&gt;0$ and $\lambda_{2}=1-\tan x&gt;0$) to obtain

$\log(\cos x)$

$=\log\left(\tan x\sin x+(1-\tan x)(\sin x+\cos x)\right)$

$&gt;\tan x\log(\sin x)+(1-\tan x)\log(\sin x+\cos x)$

Since $\sin x+\cos x=\sqrt{2}\sin(x+\frac{\pi}{4})&gt;1$ and $\tan x&lt;1$ 

We can say that $\log(\cos x)&gt;\tan x\log(\sin x)$

Multiplying both sides by $\cos x$ and then exponientating we obtain the required result.

Please suggest some other way.
I saw this solution in a textbook($103$ Problems in Trigonometry by Titu Andreescu) but i wanted a second opinion. The way the solution is it can only be answered by someone who has created the question and the solution.I will quote Titu:

Observe that the logarithmic function is concave down. 

We apply Jensen's inequality to the numbers $\sin x&lt;\cos x&lt;\sin x+\cos x$

with weights $\lambda_{1}=\tan x$ and $\lambda_{2}=1-\tan x$(because for $0&lt;x&lt;\frac{\pi}{4}$ we have $\lambda_{1}=\tan x&gt;0$ and $\lambda_{2}=1-\tan x&gt;0$) to obtain

$\log(\cos x)$

$=\log\left(\tan x\sin x+(1-\tan x)(\sin x+\cos x)\right)$

$&gt;\tan x\log(\sin x)+(1-\tan x)\log(\sin x+\cos x)$

Since $\sin x+\cos x=\sqrt{2}\sin(x+\frac{\pi}{4})&gt;1$ and $\tan x&lt;1$ 

We can say that $\log(\cos x)&gt;\tan x\log(\sin x)$

Multiplying both sides by $\cos x$ and then exponientating we obtain the required result.

Please suggest some other way.