TeX source:
\int_{1}^{3} 3 x^{2}-1 d x=x^{3}-x+\left.7\right|_{1} ^{3}=\left(3^{3}-3+7\right)-\left(1^{3}-1+7\right)=24