# Wrong vertical spacing under roots

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}

-

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 :

-
Or use {\textstyle\sqrt{...}} to make the first root smaller. –  Ian Thompson Sep 26 '12 at 14:46
@IanThompson : Thanks, editted to include that. –  T. Verron Sep 26 '12 at 14:53
The \textstyle is the simplest solution and does what I want. THX! –  Petoetje59 Sep 26 '12 at 15:00
@Petoetje59 : For inline formulas (as in your example), \textstyle is the default style, there is nothing you need to add. Just remove \displaystyle from the first formula, or add it in braces enclosing the fraction if you want the fraction to be in displaystyle, this is the most logical way of coding it. –  T. Verron Sep 26 '12 at 15:02