  The ferroelectric to paraelectric phase transition in LiTaO$_3$ and in pure
as well as Mg doped LiNbO$_3$ is investigated theoretically by atomistic
calculations in the framework of the density functional theory, as well as
experimentally by calorimetry and electrical conductivity measurements. First
principles models within the stochastic self-consistent harmonic approximation
(SSCHA) allow to consider anharmonic effects and thus to obtain a realistic
estimate of the Curie temperature $T_C$ of both ferroelectrics. \textit{Ab
initio} molecular dynamics (AIMD) calculations performed on large supercells
confirm the Curie temperatures estimated with the SSCHA approach. Moreover,
they also suggest that the structural phase transition is a continuous process
beginning at temperatures well below $T_C$. According to AIMD, significant
ionic displacements occurr already at temperatures of about 100\,K and 300\,K
below $T_C$ in LiTaO$_3$ and LiNbO$_3$, respectively. To asses whether and how
far the ionic displacements affect the materials properties, the AIMD results
are compared with measurements of the electrical conductivity and of the heat
capacity across the phase transition. Our first principles calculations
moreover show that Mg ions, a frequently employed dopant, raise the Curie
temperature in LiNbO$_3$.
