# Align square root symbols in equation

I have the following equation in my tex document:

\documentclass{article}
\begin{document}
$$x_{ij} = \frac{ \sum_{t}{e_i(t)e_j(t)} } { \sqrt{\sum_t{e_i^2(t)}} \sqrt{\sum_t{e_j^2(t)}} }$$
\end{document}


The equation is printed like this:

The problem is that despite having almost the same content, the two square root symbols are rendered with a different size.

Is it possible to equalize the size of the two square root symbols?

\documentclass{article}
\begin{document}
$$x_{ij} = \frac{ \sum_{t}{e_i(t)e_j(t)} } { \sqrt{\strut\sum_t{e_i^2(t)}} \sqrt{\strut\sum_t{e_j^2(t)}} }$$
\end{document}


Square roots are very sensitive to ascenders and descenders. Just look at the two of them and you'll realize that the culprit is the j in the second one:

\documentclass{article}
\begin{document}

$$x_{ij} = \frac{ \sum_{t}{e_i(t)e_j(t)} } { \sqrt{\sum_t{e_{i\vphantom{j}}^2(t)}} \sqrt{\sum_t{e_j^2(t)}} }$$

\end{document}


However, it may be a good idea to have \mathstrut in the exponents, so they don't risk touching the vinculum.

\documentclass{article}
\begin{document}

$$x_{ij} = \frac{ \sum_{t}{e_i(t)e_j(t)} } { \sqrt{\sum_t{e_{i}^{\mathstrut 2}(t)}} \sqrt{\sum_t{e_{j}^{\mathstrut 2}(t)}} }$$

\end{document}


The output is the same.

More of a workaround than a regular answer to your question: using \limits.

\documentclass{article}
\begin{document}
$$x_{ij} = \frac{ \sum\limits_{t}{e_i(t)e_j(t)} } { \sqrt{\sum\limits_t{e_i^2(t)}} \sqrt{\sum\limits_t{e_j^2(t)}} }$$
\end{document}


• the radical signs are really too large, and the use of \limits spaces the numerator farther from the fraction line than desirable. a publisher's copyeditor would probably reject this formulation. May 12, 2015 at 16:24