  We use first principles density functional theory to calculate electronic and
magnetic properties of TiF3 using the full potential linearized augmented plane
wave method. The LDA approximation predicts a fully saturated ferromagnetic
metal and finds degenerate energy minima for high and low symmetry structures.
The experimentally observed Jahn-Teller phase transition at Tc=370K can not be
driven by the electron-phonon interaction alone, which is usually described
accurately by LDA.
  Electron correlations beyond LDA are essential to lift the degeneracy of the
singly occupied Ti t2g orbital. Although the on-site Coulomb correlations are
important, the direction of the t2g-level splitting is determined by the
dipole-dipole interactions. The LDA+U functional predicts an aniferromagnetic
insulator with an orbitally ordered ground state. The input parameters U=8.1 eV
and J=0.9 eV for the Ti 3d orbital were found by varying the total charge on
the TiF$_6^{2-}$ ion using the molecular NRLMOL code. We estimate the
Heisenberg exchange constant for spin-1/2 on a cubic lattice to be
approximately 24 K. The symmetry lowering energy in LDA+U is about 900 K per
TiF3 formula unit.
