[Tex/LaTex] Wrong vertical spacing under roots

math-modespacing

I have no clue why the left root is way too high compared to the right one, whilst they are identical. Is there a way to set the vertical spacing under the root ?
Tried \vphantom, but this didn't do anything.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
$\displaystyle\mathcal{E}(x_{0},\frac{b}{a}\cdot\sqrt{a^2-x_{0}^2})$ en $\mathcal{C}
(x_{0},\sqrt{a^2-x_{0}^2})$.
\end{document}

Best Answer

They are different because that's what \displaystyle does. It tells the compiler that it should act as if there were no text around the equation, and so it can take as much (vertical, in this case) space as it wants. The second equation is in the default style for inline formulas (achievable with the command \textstyle if needed), and as such it is typeset in a smaller way.

If you want both square roots to be the same size, you'll have to add \displaystyle at the beginning of the second $...$ block as well.

For setting the space below the root sign, provided you are using the display style (whether it is because you inserted \displaystyle or because you are in a display environment, such as equation), \vphantom has the desired effect.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}

In display style :
$\displaystyle\mathcal{E}(x_{0},\frac{b}{a}\cdot\sqrt{a^2-x_{0}^2})$ en $\displaystyle \mathcal{C}(x_{0},\sqrt{a^2-x_{0}^2})$.

In text style :
$\mathcal{E}(x_{0},\frac{b}{a}\cdot\sqrt{a^2-x_{0}^2})$ en $\mathcal{C}(x_{0},\sqrt{a^2-x_{0}^2})$.

Only the fraction is in display style here :
$\mathcal{E}(x_{0},{\displaystyle\frac{b}{a}}\cdot\sqrt{a^2-x_{0}^2})$ en $\mathcal{C}(x_{0},\sqrt{a^2-x_{0}^2})$.

And with \textasciibackslash vphantom :                                                     
$\displaystyle\sqrt{a^{2}-x_{{0}}^{2}}$
compared to                                                                          
$\displaystyle\sqrt{\vphantom{\frac{a}{b}}a\^{2}-x_{{0}}^{2}}$

\end{document}

And an illustration of the effect of \vphantom :

Illustration of the \vphantom

Related Question