[Tex/LaTex] Breaking the equation inside a fraction

equationsfractions

I am trying to write this equation using the help provided in the link below

How to break a long expression in the denominator of a fraction?

Still the equation goes outside the margin. I using \documentclass[a4paper,10pt]{article}.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
%opening
\title{}
\author{}

\begin{document}    
\maketitle

\begin{abstract}   
\end{abstract}

\section{}    

\begin{equation*}
-\dfrac{1}{128\pi^{2}}\left[\dfrac{\splitdfrac{4(m_1 + m_3)\cos~\delta~\sin\theta_{12}~\sin\theta_{13}(\cos~\delta~\cos~\theta_{12}(2~y_e^{2} 
- y_\mu^{2} - y_\tau^{2} +(y_\mu^{2} - y_\tau^{2})\cos~2\theta_{23})\sin~\theta_{13}}{+ (-y_\mu^{2} + y_\tau^{2})\sin~
\theta_{12}~\sin~2\theta_{23}}}{m_1 - m_3}\right] + 
\end{equation*}    
\end{document}

Best Answer

enter image description here

\documentclass[a4paper]{article}
\usepackage{mathtools}

\begin{document}
\begin{equation}
\dfrac{1}{128\pi^{2}}
\left[\dfrac{\splitdfrac{
4(m_1 + m_3)\cos \delta \sin\theta_{12} \sin\theta_{13}(
\cos \delta \cos \theta_{12}(2 y_e^{2} - y_\mu^{2} - y_\tau^{2}}{ +(y_\mu^{2} -y_\tau^{2})\cos 2\theta_{23})\sin \theta_{13} + 
(-y_\mu^{2} + y_\tau^{2})\sin 
\theta_{12} \sin 2\theta_{23})}}
{m_1 - m_3}\right]
\end{equation}

\end{document}