  Computing the temperature and stress dependence of the full elastic constant
tensor from first-principles in non-cubic materials remains a challenging
problem. Here we circumvent the aforementioned challenge via the generalized
quasiharmonic approximation in conjunction with the irreducible derivative
approach for computing strain dependent phonons using finite difference,
explicitly including dipole-quadrupole contributions. We showcase this approach
in ferroelectric PbTiO$_3$ using density functional theory, computing all
independent elastic constants and piezoelectric strain coefficients at finite
temperature and stress. There is good agreement between the quasiharmonic
approximation and the experimental lattice parameters close to 0 K. However,
the quasiharmonic approximation overestimates the temperature dependence of the
lattice parameters and elastic constant tensor, demonstrating that a higher
level of strain dependent anharmonic vibrational theory is needed.
