> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/zh-cn/shu-xue/09-integrals-sums-and-limits.md).

# 积分、求和与极限

## 积分

可以使用以下方式添加积分表达式： `\int_{lower}^{upper}` 命令。

注意，积分表达式在行内数学模式和显示数学模式下看起来可能会有些不同。

| LaTeX 代码                           | 输出                                                                                     |
| ---------------------------------- | -------------------------------------------------------------------------------------- |
| `文本中的积分 \(\int_{a}^{b} x^2 \,dx\)` | ![Example of an integral inside text](/files/138c9c1c24debac844ec782f05dfdd038d85f228) |
| `\[ \int_{a}^{b} x^2 \,dx \]`      | ![Example of an integral](/files/d42c02fdf3709555867b410be13a31da3e9d9a77)             |

## 多重积分

要获得双重/三重/多重积分和闭合积分，你必须使用 `amsmath` 和 `esint` （用于闭合积分）宏包。

| LaTeX 代码                                                                                                                                                                                                                              | 输出                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `latex<br>\begin{gather*}<br> \iint_V \mu(u,v) \,du\,dv<br>\\<br> \iiint_V \mu(u,v,w) \,du\,dv\,dw<br>\\<br> \iiiint_V \mu(t,u,v,w) \,dt\,du\,dv\,dw<br>\\<br> \idotsint_V \mu(u_1,\dots,u_k) \,du_1 \dots du_k<br>\end{gather*}<br>` | ![Example of multiple integrals](/files/dd1edb6dc2fba1e7609544d9c91f34c1438f62a7) |
| `latex<br>\[<br> \oint_V f(s) \,ds<br>\]<br>`                                                                                                                                                                                         | ![Example of integrals](/files/0bde6306e2f658fc52942b3adfa7003c13337a7f)          |

## 求和与乘积

与积分类似，可以使用以下方式添加求和表达式： `\sum_{lower}^{upper}` 命令。

| LaTeX 代码                                  | 输出                                                                                        |
| ----------------------------------------- | ----------------------------------------------------------------------------------------- |
| `文本中的求和 $\sum_{n=1}^{\infty} 2^{-n} = 1$` | ![Example of sum expression inside text](/files/6c187530d2038c11b8a577944452351076c7d0db) |
| `\[ \sum_{n=1}^{\infty} 2^{-n} = 1 \]`    | ![Example of sum expression](/files/2c5653bfa3cba67971aa82679969fb8d87502a5b)             |

类似地，你可以使用以下方式获得由一系列因子组成的乘积表达式： `\prod_{lower}^{upper}` 命令。

| LaTeX 代码                        | 输出                                                                                          |
| ------------------------------- | ------------------------------------------------------------------------------------------- |
| `文本中的乘积 $\prod_{i=a}^{b} f(i)$` | ![Example of limit expression inside text](/files/731f8e3778c520d83a17eff98936246e6ce51eb3) |
| `\[ \prod_{i=a}^{b} f(i) \]`    | ![Example of limit expression](/files/8c7b093552f0ad5f2ed7ca5a9c18b05f1ae98720)             |

## 极限

可以使用以下方式添加极限表达式： `\lim_{lower}` 命令。

| LaTeX 代码                          | 输出                                                                                |
| --------------------------------- | --------------------------------------------------------------------------------- |
| `文本中的极限 $\lim_{x\to\infty} f(x)$` | ![Example of limits inside text](/files/7cec8d75a594932e40104af1ced545741af12291) |
| `\[ \lim_{x\to\infty} f(x) \]`    | ![Example of limits](/files/88454b58ebb929500b6d607ed3c704a3ceb7695b)             |

## 示例

下面是一个 LaTeX 示例文档：

```latex
\documentclass{article}
\title{积分、求和与极限}
\author{Overleaf}
\date{}
\usepackage{amsmath}

\begin{document}

\maketitle

\section{积分}

文本中的积分 \(\int_{a}^{b} x^2 dx\)。

\\medskip

显示形式下的同一积分：
\[
    \int_{a}^{b} x^2 \,dx
\]
以及多重积分：
\begin{gather*}
    \iint_V \mu(u,v) \,du\,dv
\\
    \iiint_V \mu(u,v,w) \,du\,dv\,dw
\\
    \iiiint_V \mu(t,u,v,w) \,dt\,du\,dv\,dw
\\
    \idotsint_V \mu(u_1,\dots,u_k) \,du_1 \dots du_k
\\
    \oint_V f(s) \,ds
\end{gather*}

\section{求和与乘积}

文本中的求和 \(\sum_{n=1}^{\infty} 2^{-n} = 1\)。

显示形式下的同一求和：
\[
    \sum_{n=1}^{\infty} 2^{-n} = 1
\]

文本中的乘积 \(\prod_{i=a}^{b} f(i)\)。

显示形式下的同一乘积：
\[
    \prod_{i=a}^{b} f(i)
\]

\section{极限}

文本中的极限 \(\lim_{x\to\infty} f(x)\)。

显示形式下的同一极限：
\[
    \lim_{x\to\infty} f(x)
\]

\end{document}
```

[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Integrals%2C+Sums+and+Limits\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Ctitle%7BIntegrals%2C+Sums+and+Limits%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%7D%0A%5Cusepackage%7Bamsmath%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cmaketitle%0A%0A%5Csection%7BIntegrals%7D%0A%0AIntegral+%5C%28%5Cint_%7Ba%7D%5E%7Bb%7D+x%5E2+dx%5C%29+inside+text.%0A%0A%5Cmedskip%0A%0AThe+same+integral+on+display%3A%0A%5C%5B%0A++++%5Cint_%7Ba%7D%5E%7Bb%7D+x%5E2+%5C%2Cdx%0A%5C%5D%0Aand+multiple+integrals%3A%0A%5Cbegin%7Bgather%2A%7D%0A++++%5Ciint_V+%5Cmu%28u%2Cv%29+%5C%2Cdu%5C%2Cdv%0A%5C%5C%0A++++%5Ciiint_V+%5Cmu%28u%2Cv%2Cw%29+%5C%2Cdu%5C%2Cdv%5C%2Cdw%0A%5C%5C%0A++++%5Ciiiint_V+%5Cmu%28t%2Cu%2Cv%2Cw%29+%5C%2Cdt%5C%2Cdu%5C%2Cdv%5C%2Cdw%0A%5C%5C%0A++++%5Cidotsint_V+%5Cmu%28u_1%2C%5Cdots%2Cu_k%29+%5C%2Cdu_1+%5Cdots+du_k%0A%5C%5C%0A++++%5Coint_V+f%28s%29+%5C%2Cds%0A%5Cend%7Bgather%2A%7D%0A%0A%5Csection%7BSums+and+products%7D%0A%0ASum+%5C%28%5Csum_%7Bn%3D1%7D%5E%7B%5Cinfty%7D+2%5E%7B-n%7D+%3D+1%5C%29+inside+text.%0A%0AThe+same+sum+on+display%3A%0A%5C%5B%0A++++%5Csum_%7Bn%3D1%7D%5E%7B%5Cinfty%7D+2%5E%7B-n%7D+%3D+1%0A%5C%5D%0A%0AProduct+%5C%28%5Cprod_%7Bi%3Da%7D%5E%7Bb%7D+f%28i%29%5C%29+inside+text.%0A%0AThe+same+product+on+display%3A%0A%5C%5B%0A++++%5Cprod_%7Bi%3Da%7D%5E%7Bb%7D+f%28i%29%0A%5C%5D%0A%0A%5Csection%7BLimits%7D%0A%0ALimit+%5C%28%5Clim_%7Bx%5Cto%5Cinfty%7D+f%28x%29%5C%29+inside+text.%0A%0AThe+same+limit+on+display%3A%0A%5C%5B%0A++++%5Clim_%7Bx%5Cto%5Cinfty%7D+f%28x%29%0A%5C%5D%0A%0A%5Cend%7Bdocument%7D)

## 进一步阅读

更多信息请参见

* [数学表达式](/latex/zh-cn/shu-xue/01-mathematical-expressions.md)
* [下标和上标](/latex/zh-cn/shu-xue/02-subscripts-and-superscripts.md)
* [分数和二项式](/latex/zh-cn/shu-xue/05-fractions-and-binomials.md)
* [数学模式中的显示样式](/latex/zh-cn/shu-xue/10-display-style-in-math-mode.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/zh-cn/shu-xue/09-integrals-sums-and-limits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
