# Integrals

The indefinite integral of f(x) is given by \int f(x) \ dx

The definite integral of f(x) from a to b is given by \int_{a}^{b} f(x) \ dx

## Parts of the Integral Expression

To type the integral symbol, use the command \int.

$$\int$$

As was the case with sums, the lower limit of the integral is added in subscript, indicated by an underscore. The upper limit of the integral is added in superscript, indicated by a caret.

For example, the symbol for the integral from a to b is given by

$$\int_{a}^{b}$$

Remember, as always, to use curly braces to group characters in subscript and superscript.

The integral symbol is an elongated S much like the holes on a violin. Leibniz chose this letter to represent "sum." Photo by Gisela Giardino on Flickr.

The function being integrated can be typed next to the integral symbol.

$$\int_{a}^{b} f(x)$$

Finally, we add the differential, dx. We suggest adding a backslash between the function and the differential.

Compare the version without a backslash, $$\int_{a}^{b}f(x)dx$$, to the one with a backslash $$\int_{a}^{b}f(x) \ dx$$.

The backslash adds a space between the function and differential. This makes the integral look neater, so the differential is more clearly a separate object from the function.

Note: remember to use a space between the backslash and dx. If there is no space, LaTeX will interpret \dx as a command, but since it is not a defined command, it will result in an error.

## Exercise 6.4.1

Typeset the definite integral of the function x squared from -1 to 1:

## Solution 6.4.1

The given integral can be typeset with the code

$\int_{-1}^{1} x^{2} \ dx$

Remember to group the limits of integration using curly braces.

## Display style for integrals

Compare integrals in inline and display mode. What differences do you notice between the two?

In display mode, the integral sign is noticeably larger. The display version of the integral can better contain taller expressions like exponentials and fractions. For this reason, consider using \displaystyle with inline integrals.

Inline style integral:

Display style integral:

This concludes our study of calculus typesetting! On the next page, we will learn some commands to group and organize math expressions.