# displaying fractions in line in equation mode

I am new to latex and am currently preparing a document. I want to write the following equation. I have tried the following in latex. I am not able to get the big 'slash' for the inline fraction. How do I do it?

\phi_{i}=x_{i}+\sum_{k\neq1}x_{k}\left[\frac{5}{3}\frac{1}{A_{ik}^{*}}+\frac{M_{k}}{M_{i}}\right]/\left[1+\frac{M_k}{M_i}\right]{x}\left[F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}}\left(\frac{M_{k}}{M_{i}}\right)^{1/4}\right]^2/\sqrt{8\left(1+\frac{M_i}{M_k}\right)}


If your space constraints are not strict, like two column typesetting, you can use \medmath from the nccmath package: this reduces ambiguities in the formula.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{nccmath}

\begin{document}
\begin{equation*}
\phi_{i} = x_{i}+\sum_{k\neq i}x_{k}
\medmath{
\frac{\displaystyle
\frac{5}{3}\frac{1}{A_{ik}^{*}}+\frac{M_{k}}{M_{i}}
}{\displaystyle
1+\frac{M_k\mathstrut}{M_i}
}
\,
\frac{\displaystyle
\Bigl(
F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}}
\Bigl(\frac{M_{k}}{M_{i}}\Bigr)^{1/4}
\Bigr)^2
}{\displaystyle
\sqrt{8\left(1+\frac{M_i}{M_k}\right)}
}
}% end of \medmath
\end{equation*}

\end{document}


Actually, a comparison with the slashed version shows the space is less with the above version.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{nccmath}

\begin{document}

\begin{equation*}
\begin{split}
\phi_{i} ={}& x_{i}+\sum_{k\neq i}x_{k}
\biggl[
\frac{5}{3}\frac{1}{A_{ik}^{*}}+\frac{M_{k}}{M_{i}}
\biggr]
\bigg/
\biggl[
1+\frac{M_k}{M_i}
\biggr]
\\
&\times
\biggl[
F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}}\left(\frac{M_{k}}{M_{i}}\right)^{\!1/4}
\biggr]^2
\bigg/
\biggl[
\sqrt{8\left(1+\frac{M_i}{M_k}\right)}
\biggr]
\end{split}
\end{equation*}

\begin{equation*}
\phi_{i} = x_{i}+\sum_{k\neq i}x_{k}
\medmath{
\frac{\displaystyle
\frac{5}{3}\frac{1}{A_{ik}^{*}}+\frac{M_{k}}{M_{i}}
}{\displaystyle
1+\frac{M_k\mathstrut}{M_i}
}
\,
\frac{\displaystyle
\Bigl(
F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}}
\Bigl(\frac{M_{k}}{M_{i}}\Bigr)^{1/4}
\Bigr)^2
}{\displaystyle
\sqrt{8\left(1+\frac{M_i}{M_k}\right)}
}
}% end of \medmath
\end{equation*}

\end{document}


You can judge what's the clearer way to display your formula.

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}
$\begin{split} \phi_{i} & = x_{i}+\sum_{k\neq1}x_{k} \left[\frac{5}{3}\frac{1}{A_{ik}^{*}}+\frac{M_{k}}{M_{i}}\middle] \middle/ \middle[1+\frac{M_k}{M_i}\right] \\ & \times \left[F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}} \left(\frac{M_{k}}{M_{i}}\right)^{1/4}\right]^2 \left/ \sqrt{8\left(1+\frac{M_i}{M_k}\right)}\right. \end{split}$
\end{document}


I would indent the second line to the right, so that the opening large square brackets are aligned, and I would add an additional pair of "fences" to make the structure of the equation more immediately obvious to the readers. Use \biggl[, \biggr, and \biggm to size the parentheses, brackets, and division symbols.

\documentclass{article}
\usepackage{amsmath} % for 'align*' env.
\begin{document}
\begin{align*}
\phi_i =x_i+\sum_{k\neq1}x_k \Biggl\{
&\biggl[\frac{5}{3} \frac{1}{A_{ik}^{*}} +\frac{M_k}{M_i}\biggr] \biggm/
\biggl[1+\frac{M_k}{M_i} \biggr]\\
\times&\biggl[F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}} \biggl(\frac{M_k}{M_i}\biggr)^{\!\!1/4}\,\biggr]^2 \!\! \biggm/
\biggl[\sqrt{8}\biggl(1+\frac{M_i}{M_k}\biggr)^{\!\!1/2}\,\biggr] \Biggr\}
\end{align*}
\end{document}


\phi_{i}=x_{i}+\sum_{k\neq1}x_{k}\left[\frac{5}{3}\frac{1}{A_{ik}^{*}}+\frac{M_{k}}{M_{i}}\right]\Bigg/\left[1+\frac{M_k}{M_i}\right]{x}\left[F_{ik}+B_{ik}\sqrt{\frac{\eta_i}{\eta_k}}\left(\frac{M_{k}}{M_{i}}\right)^{1/4}\right]^2\Bigg/\sqrt{8\left(1+\frac{M_i}{M_k}\right)}