Awkward spacing for integral in exponent

by ryanyz10   Last Updated January 20, 2018 01:23 AM

I'm trying to put an integral in an exponent with the following LaTeX:

\begin{align*}
    e^{G(t)} &= e^{\int{\frac{t}{1+t^2}dt}} \\
    &= e^{\frac{1}{2}\ln(1+t^2)} \\
    &= \sqrt{1 + t^2}
\end{align*}

however, the result is this:

awkward spacing

the spacing between the integral and the fraction looks very awkward. I looked into display mode, but that just makes the integral abnormally large. Is there anyway to get rid of that spacing?

Tags : spacing integral


Answers 2


Some alternatives:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
e^{G(t)} &= e^{\int\frac{t}{1+t^2}dt} \\ % original
e^{G(t)} &= e^{\int\!\frac{t}{1+t^2}\,dt} \\
e^{G(t)} &= \exp\Bigl(\int\frac{t}{1+t^2}\,dt\Bigr) \\
e^{G(t)} &= \exp\bigl({\textstyle\int\frac{t}{1+t^2}\,dt}\bigr) \\
         &= e^{\frac{1}{2}\ln(1+t^2)} \\
         &= \sqrt{1 + t^2}
\end{align*}

\end{document}

enter image description here

egreg
egreg
January 20, 2018 00:52 AM

Does this befit you?

\documentclass{article}
\usepackage{mathtools, graphicx}

\begin{document}

\begin{align*}
    e^{G(t)} &= e^{\int{\mkern-7mu\frac{t}{1+t^{ \scalebox{0.8}{$ \scriptscriptstyle2 $}}} dt}} \\
    &= e^{\frac{1}{2}\ln(1+t^2)} \\
    &= \sqrt{1 + t^2}
\end{align*}

\end{document} 

enter image description here

Bernard
Bernard
January 20, 2018 01:05 AM

Related Questions


Correct spacing in integrals

Updated September 20, 2017 16:23 PM

What kind of integral is this?

Updated April 07, 2017 11:23 AM


How do we get the integral sign below?

Updated December 06, 2017 05:23 AM

Trapezoidal rule with pgfplots

Updated January 28, 2017 14:09 PM