4

I would like to know how to write half integrals and generally integrals of nth order in LaTeX, for example in Cauchy's formula for repeated integration, because I didn't find how to do that on the whole internet. Also I attached how I write this on paper.enter image description here

Taras
  • 49
  • 3

3 Answers3

6

Maybe you're looking for some specific notation that I don't know about, but in LaTeX, Cauchy's formula for repeated integration can for example be written as:

I^nf(x) = \int_0^x \int_0^{x_1} \cdots \int_0^{x_{n-1}} f(x_{n}) \, \mathrm{d}x_{n} \cdots \, \mathrm{d}x_2 \, \mathrm{d}x_1 = \frac{1}{(n-1)!} \int_0^x\left(x-t\right)^{n-1} f(t)\,\mathrm{d}t
Dimitri
  • 61
  • 3
6

Add a phantom integral, so the subscript is at the right place.

\documentclass{article}
\usepackage{amsmath}

\NewDocumentCommand{\INT}{m}{\mathop{{\vphantom{\int}}}\nolimits_{#1}!\int}

\begin{document}

A displayed integral [ \INT{n}_a^b f(x),dx ] A text style integral $\INT{n}_a^b f(x),dx$

\end{document}

enter image description here

egreg
  • 1,121,712
  • Of course codepoint 0x222B in any unicode font, can give you integrals at any size. Do you think unicode-math is mature enough? – yannisl Jan 03 '24 at 18:19
  • I'm not sure about unicode-math, but your answer was extremely helpful. Thank you a lot! – Taras Jan 03 '24 at 19:12
  • And one extra question: where do I put this code: in LaTeX environment or in post when I create a new one or edit an existing one? – Taras Jan 03 '24 at 19:52
  • @Taras You just copy the definition in the preamble of your document. – egreg Jan 03 '24 at 20:39
1

It is possible to use also tensor package with \mathclap.

\documentclass{article}
\usepackage{tensor}
\usepackage{mathtools}

\begin{document}

[ \tensor[_{\mathclap{c}}]{\int}{_a^b} f(x) \ dx ] $\tensor[_{\mathclap{c}}]{\int}{_a^b} f(x) \ dx$ \end{document}

enter image description here

Sebastiano
  • 54,118