Evaluation of Differentiation and Integration
The \big|
or \Big|
symbols work quite well
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ \int_a^b x^2\;\mathrm{d}x= \tfrac{1}{3} x^3 \Big|_a^b \]
\end{document}
The \left
- \right
construct gives you an expandable evaluation symbol:
\documentclass[12pt]{article}
\usepackage{amsmath}
\DeclareMathOperator{\di}{d\!}
\newcommand*\Eval[3]{\left.#1\right\rvert_{#2}^{#3}}
\begin{document}
\[
\int_{a}^{b}x\di x = \Eval{\dfrac{1}{2}x^{2}}{a}{b}
\]
\[
\int_{a}^{b}\di x = \Eval{x}{a}{b}
\]
\end{document}
EDIT: I modified the code following the comment by Ryan Reich.
The commath
package has the \eval
command for this purpose.