  We give an analytical derivation of the confinement/deconfinement phase
transition at finite temperature in the $SU(N)$ Yang-Mills theory in the
$D$-dimensional space time for $D>2$. For this purpose, we use a novel
reformulation of the Yang-Mills theory which allows the gauge-invariant gluonic
mass term, and calculate analytically the effective potential of the Polyakov
loop average concretely for the $SU(2)$ and $SU(3)$ Yang-Mills theories by
including the gauge-invariant dynamical gluonic mass $M$. For $D=4$, we give an
estimate on the transition temperature $T_d$ as the ratio $T_d/M$ to the mass
$M$ which has been measured on the lattice at zero temperature and is
calculable also at finite temperature. We show that the order of the phase
transition at $T_d$ is the second order for $SU(2)$ and weakly first order for
$SU(3)$ Yang-Mills theory. We elucidate what is the mechanism for quark
confinement and deconfinement at finite temperature and why the phase
transition occurs at a certain temperature. These initial results are obtained
easily based on the analytical calculations of the "one-loop type" in the first
approximation. We discuss also how these results are improved to eliminate the
artifacts obtained for some thermodynamic observables.
