# Delimiter size in fraction produces unwanted blank space

I am using amsmath in a two-column IEEEtran document class and at a certain point I typed this equation:

$$A = \sum_{j=1}^{J} \frac{\left[ e^{-\left( \frac{x_1^a}{2\sigma^2} \right)^2} - e^{-\left( \frac{x_2^a}{2\sigma^2} \right)^2} \right]^2}{\Phi\left( \frac{x_1^a}{\sigma} \right) - \Phi\left( \frac{x_2^a}{\sigma} \right)}$$


The issue is that this code produces the following result:

As you see, as the exponential is centralized in the brackets of the fraction numerator, there is a strange blank space above the fraction bar. Is there a way to vertically move the content inside the brackets, so I can make this blank space disappear?

Considerations: 1- I cannot use \exp instead of e^{}, as the former makes the equation longer and it does not fit the linewidth. 2- If I use manually sized delimiter \Big, etc, I can adjust this space, but the result does not look good either.

• Jul 27 '18 at 17:28

You can correct that by lowering that part:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
A = \sum_{j=1}^{J}
\frac{\left[ \raisebox{-1ex}{$e^{-\left( \frac{x_1^a}{2\sigma^2} \right)^2} - e^{-\left( \frac{x_2^a}{2\sigma^2} \right)^2}$} \right]^2}
{\Phi\left( \frac{x_1^a}{\sigma} \right) - \Phi\left( \frac{x_2^a}{\sigma} \right)}
\end{equation*}

\end{document}


\documentclass[11pt]{book}
\usepackage{nccmath}

\begin{document}
$$A = \sum_{j=1}^{J} \frac{\begin{bmatrix} \mathrm{e}^{-\Bigl(\mfrac{x_1^a}{2\sigma^2}\Bigr)^2} - \mathrm{e}^{-\Bigl(\mfrac{x_2^a}{2\sigma^2}\Bigr)^2} \end{bmatrix}^2} {\Phi\Bigl(\mfrac{x_1^a}{\sigma}\Bigr) - \Phi\Bigl(\mfrac{x_2^a}{\sigma}\Bigr)}$$
or better
$$A = \sum_{j=1}^{J} \frac{\biggl[\exp\Bigl(-\Bigl(\mfrac{x_1^a}{2\sigma^2}\Bigr)^2\Bigr) - \exp\Bigl(-\Bigl(\mfrac{x_2^a}{2\sigma^2} \Bigr)^2\Bigr)\biggr]^2} {\Phi\Bigl(\mfrac{x_1^a}{\sigma}\Bigr) - \Phi\Bigl(\mfrac{x_2^a}{\sigma}\Bigr)}$$
\end{document}

• (+1) The first is exactly what I was working on, but you were faster :-) Jul 27 '18 at 19:04

How about using (a) inline-fraction notation instead of \frac{..} for the "inner" fraction expression and (b) \exp notation instead of e^{...} notation? Observe that, contrary to the concern you expressed in the posting, the \exp notation does not make the math expression exceed the available width.

A side benefit of these notational choices is that the summation symbol to the left of the single remaining \frac{}{} term doesn't look all puny and forlorn.

By the way, the summation expression looks odd: the summation is supposed to run over items indexed by the letter j, yet there seem to be no terms in the equation that are indexed by j.

\documentclass{IEEEtran}

\begin{document}
$$A = \sum_{j=1}^{J} \frac{\bigl\{ \exp[-( x_1^a/(2\sigma^2))^2] -\exp[-(x_2^a/(2\sigma^2))^2] \bigr\}^2}{% \Phi(x_1^a/\sigma) - \Phi( x_2^a/\sigma)}$$
\end{document}

• My apologies, sir, you are so right! It just fits nicely with 10pt.
– nox
Jul 27 '18 at 18:58