# Reason of variation in sizes of fractions?

\sqrt{1 + \left( \tfrac{\partial z}{\partial x} \right)^2 + \left(\tfrac{\partial z}{\partial y} \right)^2}


The code above resulted in the second fraction being bigger than the first.

Why?

Your fractions are different sizes simply because "x" and "y" are not the same size: "y" is taller. Because you use \left and \right, the size of the parentheses adapt to their content, so the second pair gets bigger than the first one. This can be confirmed by \smashing the "y" and adding a \vphantom{x} to use the height of "x" in both fractions, which I did in the second example here.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\sqrt{1 + \left( \tfrac{\partial z}{\partial x} \right)^2 + \left(\tfrac{\partial z}{\partial y} \right)^2} \qquad \sqrt{1 + \left( \tfrac{\partial z}{\partial x} \right)^2 + \left(\tfrac{\partial z}{\partial \smash{y}\vphantom{x}} \right)^2}$
\end{document}


As @Sebastiano recommended, the best solution is probably to use \bigl( ... \bigr) (or similar commands) rather than \left( ... \right).

• +1. Instead of \smash{y}\vphantom{x}, though, you might write \smash[b]{y}.
– Mico
Commented Dec 16, 2020 at 22:01
• Thank you very much to have cited my name :-)....Vincent you're better at explaining than to me :-) and I'm happy about that. Greetings. Commented Dec 16, 2020 at 22:13
• @Mico True, it would indeed be simpler, thanks for pointing it out. I just thought it would be good to add the height of "x" explicitly. Commented Dec 16, 2020 at 22:30

I am not an expert but in my humble opinion the problem will be \left(... \right) which does not give a right size, sometimes, to the formula into the rounded brackets. I have used instead \bigl( and \bigr).

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}

$\sqrt{1 + \bigl(\tfrac{\partial z}{\partial x} \bigr)^2 + \bigl(\tfrac{\partial z}{\partial y} \bigr)^2}$
\end{document}