7 Integrals, Sums, Products and Limits
Integrals, Sums, Products and Limits
Writing integrals, sums, products and limits is done with subscript and superscript operators.
Integrals
Integral expression can be added using the \int_{lower}^{upper} command.
Example: Integrals
Inline looks like [latex]\int_{1}^{7}\!\frac{4}{3}\pi x^3\,dx[/latex], while display looks like \[\int_{1}^{7} \!\frac{4}{3}\pi x^3\,dx\]
Inline: [latex]\int_{1}^{7}\!\frac{4}{3}\pi x^3\,dx[/latex] Display: \[\int_{1}^{7}\!\frac{4}{3}\pi x^3\,dx\]
Note that \!
narrows the space between the integral sign and the function, and \,
increases the space between the function and dx.
Sums and Products
Like integral, sum expression can be added using the \sum_{lower}^{upper} command.
In similar way you can obtain expression with product of a sequence of factors using the \prod_{lower}^{upper} command.
Example: Sums
Inline looks like [latex]\sum_{k=1}^3 \left(-\frac{1}{k}\right)[/latex], while display looks like \[\sum_{k=1}^3 \left(-\frac{1}{k}\right)\]
Inline: [latex]\sum_{k=1}^3 \left(-\frac{1}{k}\right)[/latex]
Display: \[\sum_{k=1}^3 \left(-\frac{1}{k}\right)\]
Example: Products
Inline looks like [latex]\prod_{i=a}^{b} f(i)[/latex], while display looks like
\[\prod_{i=a}^{b} f(i)\]
Inline: [latex]\prod_{i=a}^{b} f(i)[/latex]
Display: \[\prod_{i=a}^{b} f(i)\]
Limits
Limit expression can be added using the \lim_{lower} command.
Example:
Inline looks like [latex]\lim_{x\to\infty}a_nx^n[/latex], while display looks like \[\lim_{x\to\infty} a_nx^n\]
Inline: [latex]\lim_{x\to\infty}a_nx^n[/latex] Display: \[\lim_{x\to\infty}a_nx^n\]
Exercises
Typeset the following formula (use display style):
\[\int_{0}^{1} f(x) \,dx = \lim_{t\to \infty}t^{-1}\sum_{t=1}^{t} f\left(\frac{i}{t}\right)\]