[Tex/LaTex] Lower and upper Riemann integrals

math-modemath-operatorssymbols

How can I make an integral symbol with a bar above it or a bar below it?

Best Answer

From what I've seen online, it suffices to use \overline and \underline.

Here is a minimal example that defines

\upRiemannint{<lo>}{<hi>}

which draws the "upper Riemann integral" over the range [<lo>,<hi>]. Analogously,

\loRiemannint{<lo>}{<hi>}

defines the "lower Riemann integral" over the range [<lo>,<hi>].

enter image description here

\documentclass{article}
\newcommand{\upRiemannint}[2]{
  \overline{\int_{#1}^{#2}}
}
\newcommand{\loRiemannint}[2]{
  \underline{\int_{#1}^{#2}}
}
\begin{document}
\[
  \loRiemannint{a}{b} f(x)\,\mathrm{d}x \qquad \textrm{or} \qquad \upRiemannint{a}{b} f(x)\,\mathrm{d}x
\]
\end{document}

These integrals also translate to use in text mode, but vertical alignment is slightly off due to the integral sign by default.