  In this paper we study the joint convexity/concavity of the trace functions
\[
\Psi_{p,q,s}(A,B)=\text{Tr}(B^{\frac{q}{2}}K^*A^{p}KB^{\frac{q}{2}})^s,~~p,q,s\in
\mathbb{R}, \] where $A$ and $B$ are positive definite matrices and $K$ is any
fixed invertible matrix. We will give full range of $(p,q,s)\in\mathbb{R}^3$
for $\Psi_{p,q,s}$ to be jointly convex/concave for all $K$. As a consequence,
we confirm a conjecture of Carlen, Frank and Lieb. In particular, we confirm a
weaker conjecture of Audenaert and Datta and obtain the full range of
$(\alpha,z)$ for $\alpha$-$z$ R\'enyi relative entropies to be monotone under
completely positive trace preserving maps. We also give simpler proofs of many
known results, including the concavity of $\Psi_{p,0,1/p}$ for $0<p<1$ which
was first proved by Epstein using complex analysis. The key is to reduce the
problem to the joint convexity/concavity of the trace functions \[
\Psi_{p,1-p,1}(A,B)=\text{Tr} K^*A^{p}KB^{1-p},~~-1\le p\le 1, \] using a
variational method.
