3

This code produces an ankward vertical alignment which involves the integral symbol and the fraction with the square root at the denominator. Why? How can I fix this?

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}

\begin{document}
 \[
 \int_{x_0}^{x(t)} \! \! \! \frac{1}{\sqrt{\frac{2}{m}\bigl
 (E_0-V(x)\bigr)}} \, dx = t-t_0
 \]
\end{document}
Lele99_DD
  • 588

3 Answers3

7

That's how it's supposed to be typeset.

Growing the integral symbol is out of the question, in my opinion. Moving it down is similarly disgraceful.

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}

\begin{document}

\noindent
No square root
 \[
 \int_{x_0}^{x(t)}
   \biggl(\frac{2}{m}\bigl(E_0-V(x)\bigr)\biggr)^{\!-1/2}\, dx = t-t_0
 \]
Smashed square root
 \[
 \int_{x_0}^{x(t)}
   \frac{1}{\sqrt{\smash[b]{\frac{2}{m}}(E_0-V(x))}} \, dx = t-t_0
 \]
Normal
 \[
 \int_{x_0}^{x(t)}
   \frac{1}{\sqrt{\frac{2}{m}\bigl(E_0-V(x)\bigr)}} \, dx = t-t_0
 \]
\end{document}

enter image description here

egreg
  • 1,121,712
2

I probably would do

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}
 \[
 \int\limits_{x_0}^{x(t)}  \frac{1}{\sqrt{\frac{2}{m}\bigl
 (E_0-V(\xi)\bigr)}} \, \mathrm{d}\xi = t-t_0
 \]
\end{document}

enter image description here

to avoid confusion between the upper limit of the integral, x(t), and the integration variable as well between some quantity d (like a diameter, say) and the differential d. \int\limits makes the integral symbol look higher.

1

As marmot suggested, I tried using the scalerel package and I like the outcome. It's not perfect, but I think it's acceptable. The integral symbol is finally aligned with the bottom of the fraction.

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}

\usepackage{scalerel}

\begin{document}
 \def\x{\frac{1}{\sqrt{\frac{2}{m}\bigl(E_0-V
 (\xi)\bigr)}}}
 \[
 {\scalerel*[2.2ex]{\int}{\x}}_{\!\!\!x_0}^{\,x(t)}\x\,\,
 d\xi \, = \, t-t_0
 \]
\end{document}

enter image description here

Lele99_DD
  • 588