7

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?

10

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

  • The \! seems to move it enough to not annoy me, thank you! Unrelated, is \exp an acceptable alternative to e^n? I've never seen that notation before. – ryanyz10 Jan 20 '18 at 0:59
  • 6
    @ryanyz10: \exp(...) for e^{...} is quite standard. – GuM Jan 20 '18 at 1:19
8

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

  • 2
    @Mico: thanks. Still I hope my proposition is not totally unworthy :–) – Bernard Jan 20 '18 at 2:24
  • I like either anwers of Bernard and egreg. I vote always your answer. Too for Mico and marmot. +1. – Sebastiano Jan 20 '18 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.