# Added whitespace when putting brackets around fractions with splitfrac

I'm using splitfrac from mathtools to break up a particularly long line in the numerator of a fraction. When I put brackets around the fraction, however, they leave a line of whitespace in the denominator, presumably to keep the fraction centred. Is there a way to get rid of this?

\begin{align*}
(Qg)'(x) &= \left( \E \left[
\frac{\sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x)}
{\abs{f'(\psi_I(x, \xi)}}
\right] \right)'
= \E \left[ \left(
\frac{\sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x)}
{\abs{f'(\psi_I(x, \xi)}}
\right)' \right] \\
&= \E \left[
\frac{ \splitfrac{ \left( \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \right)' \abs{f'(\psi_I(x, \xi))} }
{-\left( \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \right)  \abs{f'(\psi_I(x, \xi))}'}
} {\abs{f'(\psi_I(x, \xi)}^2}
\right]
\end{align*}


• delimiters are vertically centred on the math axis (the fraction bar) so are as deep as they are tall. Commented Jan 16, 2021 at 19:13
• Welcome to TeX.SE.
– Mico
Commented Jan 16, 2021 at 20:22

To my (mathematically) untrained eye, the tall square brackets in the second row of your screenshot seem redundant and could be omitted without loss. However, just in case they're not redundant, I suggest you replace \left[ ... \right] with \begin{bmatrix} ... \end{bmatrix} and use \dfrac rather than "just" \frac. That said, I think the "look" of the third row is better, as it (a) aligns the expectations operator symbol with the horizontal bar of the fraction term and (b) uses delimiters to enclose the contents of the two-line numerator term.

The following screenshot shows four possible solutions: Your original form, a solution that uses a bmatrix environment, a solution that encases the two-line numerator term in parentheses, and finally a solution that simply does away with "outer" fences entirely.

\documentclass{article}
\usepackage{mathtools,amssymb}
\DeclareMathOperator{\E}{\mathbb{E}}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\begin{document}
\begin{align*}
(Qg)'(x)
&= \E \left[
\frac{ \splitfrac{ \left( \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \right)' \abs{f'(\psi_I(x, \xi))} }
{-\left( \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \right)  \abs{f'(\psi_I(x, \xi))}'}
} {\abs{f'(\psi_I(x, \xi)}^2}
\right] \tag*{awful!}\\
&= \E \begin{bmatrix} \dfrac{
\splitfrac{ \bigl( \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \bigr)'
\, \abs[\big]{f'(\psi_I(x, \xi))} }
{-\bigl( \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \bigr)
\abs{f'(\psi_I(x, \xi))}'}
} {\abs[\big]{f'(\psi_I(x, \xi)}^2}
\end{bmatrix} \tag*{not awful} \\
&= \E \frac{ \left(
\splitfrac{ \bigl[ \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \bigr]'
\, \abs[\big]{f'(\psi_I(x, \xi))} }
{-\bigl[ \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \bigr]
\abs[\big]{f'(\psi_I(x, \xi))}' }
\right)} {\abs[\big]{f'(\psi_I(x, \xi)}^{2\mathstrut}} \tag*{better}  \\
&= \E \frac{
\splitfrac{ \bigl[ \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \bigr]'
\, \abs[\big]{f'(\psi_I(x, \xi))} }
{-\bigl[ \sum_{I \in A_\xi} g(\psi_I (x, \xi)) \chi_{f_\xi(I)}(x) \bigr]
\abs[\big]{f'(\psi_I(x, \xi))}' }
} {\abs[\big]{f'(\psi_I(x, \xi)}^{2\mathstrut}} \tag*{best(?)}
\end{align*}
\end{document}

• Thanks for your answer. I appreciate it's a matter of taste but I'm quite keen on keeping the square brackets around the expectation. Your second ("not awful") expression, though, is exactly the sort of thing I was looking for. Thanks! Commented Jan 16, 2021 at 20:22