We deal with the gap function and the thermodynamical potential in the BCS-Bogoliubov theory of superconductivity, where the gap function is a function of the temperature $T$ only. We show that the squared gap function is of class $C^2$ on the closed interval $[ 0, T_c ]$ and point out some more properties of the gap function. Here, $T_c$ stands for the transition temperature. On the basis of this study we then give, examining the thermodynamical potential, a mathematical proof that the transition to a superconducting state is a second-order phase transition. Furthermore, we obtain a new and more precise form of the gap in the specific heat at constant volume from a mathematical point of view.