LaTex数学之积分、求和和极限
积分
可以使用\int_{lower}^{upper}
命令添加积分表达式。
请注意,积分表达式在内联和显示数学模式中可能看起来有些不同。
\usepackage{amsmath}
\begin{document}
Integral \(\int_{a}^{b} x^2 \,dx\) inside text
\\
\\
\\
\[ \int_{a}^{b} x^2 \,dx \]
\end{document}
多重积分
要获得双/三/多积分和循环积分,您必须使用amsmath
和esint
(对于循环积分)包。
\usepackage{amsmath}
\begin{document}
\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
\end{gather*}
\[
\oint_V f(s) \,ds
\]
\end{document}
总和和产品
与积分一样,可以使用\sum_{lower}^{upper}
命令添加求和表达式。
\usepackage{amsmath}
\begin{document}
Sum $\sum_{n=1}^{\infty} 2^{-n} = 1$ inside text
\\
\\
\\
\\
\[ \sum_{n=1}^{\infty} 2^{-n} = 1 \]
\end{document}
以类似的方式,您可以使用命令获得一系列因子的乘积表达式\prod_{lower}^{upper}
。
\usepackage{amsmath}
\begin{document}
Product $\prod_{i=a}^{b} f(i)$ inside text
\\
\\
\\
\\
\[ \prod_{i=a}^{b} f(i) \]
\end{document}
极限
可以使用\lim_{lower}
命令添加极限表达式。
\usepackage{amsmath}
\begin{document}
Limit $\lim_{x\to\infty} f(x)$ inside text
\\
\\
\\
\\
\[ \lim_{x\to\infty} f(x) \]
\end{document}
代码整合
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section{Integrals}
Integral \(\int_{a}^{b} x^2 dx\) inside text.
\medskip
The same integral on display:
\[
\int_{a}^{b} x^2 \,dx
\]
and multiple integrals:
\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{Sums and products}
Sum \(\sum_{n=1}^{\infty} 2^{-n} = 1\) inside text.
The same sum on display:
\[
\sum_{n=1}^{\infty} 2^{-n} = 1
\]
Product \(\prod_{i=a}^{b} f(i)\) inside text.
The same product on display:
\[
\prod_{i=a}^{b} f(i)
\]
\section{Limits}
Limit \(\lim_{x\to\infty} f(x)\) inside text.
The same limit on display:
\[
\lim_{x\to\infty} f(x)
\]
\end{document}