Math Mode Symbols – Use Underbrace Under Sqrt Content

amsmathmath-modesymbols

I am trying to use underbrace to clarify the arguments to a sqrt. However this causes the square root sign to reach all the way down to the bottom of the text under the brace(s), which is not what I want.

MWE:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

$\sqrt{\underbrace{\frac{1}{\tau}\underbrace{\int_{\text{-}\infty}^{t}\underbrace{p_{X}^{\,2}\left(\xi\right)\cdot e^{\frac{\text{-}\left(t\text{-}\xi\right)}{\tau}}}_{\substack{\text{Expontial}\\\text{time-weighting}\\\text{of $p_{X}^{\,2}\left(\xi\right)$}}} \,\mathrm{d}\xi}_{\text{Exponential integration}}}_{\substack{\text{Exponential averaging}\\\text{= “Quasi mean-square”}}}}$

\end{document}

This results in something like this:

sqrt pulled down by underbracing

Does anyone know how I can force sqrt to reach only as low as its actual (mathematically speaking) argument?

Best Answer

I would recommend Mico's way; if you really want the surd, then here is a solution that takes all the vertical space it needs (not like in wh1t3's answer):

\documentclass{article}
\usepackage{mathtools}

\def\sqrtexplained#1{%
  \begingroup
    \sbox0{$#1$}
    \def\underbrace##1_##2{##1}
    \sbox2{$#1$}
    \dimen0=\wd0 \advance\dimen0-\wd2
    \mathrlap{\sqrt{\phantom{\displaystyle#1}\kern\dimen0 }}
    \hphantom{\sqrt{\vphantom{\displaystyle#1}}}
  \endgroup
  #1}


\begin{document}

\[
\sqrtexplained{%
\underbrace{\frac{1}{\tau}
  \underbrace{\int_{-\infty}^{t}
    \underbrace{p_{X}^{2}(\xi)\cdot e^{\frac{-(t-\xi)}{\tau}}}
    _{\substack{\text{Exponential}\\
                \text{time-weighting}\\
                \text{of $p_{X}^{2}(\xi)$}}
     }
   \,\mathrm{d}\xi}
   _{\text{Exponential integration}}}
_{\substack{\text{Exponential averaging}\\
            =\text{Quasi mean-square}}
 }
}
\]

\end{document}

enter image description here

I've also corrected the input errors you are making: \text{-} for a minus sign is wrong; \left and \right should be used only when they are really needed.