I am fairly new to TeX, and I am currently using TexStudio.
I am wondering how I can exactly replicate the typesetting of the integral below, including the font and the upright integral sign? What packages, what font?

Thank you.
I am fairly new to TeX, and I am currently using TexStudio.
I am wondering how I can exactly replicate the typesetting of the integral below, including the font and the upright integral sign? What packages, what font?

Thank you.
This seems quite similar to newtxmath with the upint option:
\documentclass{article}
\usepackage{newtxtext}
\usepackage[upint]{newtxmath}
\newcommand{\diff}{\mathop{}\!d}
\begin{document}
\[
\int x^n\diff x
\]
\end{document}
Basic math is included in LaTeX without any additional packages. I would write:
\documentclass{article}
\begin{document}
\[ \int x^n\, \mathrm{d}x \]
\end{document}
If you just type dx instead of \mathrm{d}x, the d will be put in italic (like in your example).
\text is completely wrong here. There are so many people misusing \text in this way. Here \mathrm should be used, not \text. \text has one and one use only (except for siunitx which "misuses" it a bit): textual comments in displayed math. This is clearly not such a case.
– daleif
Aug 11 '17 at 07:59
Ok, you are new to \LaTeX. Here is your answer. I am also teaching you how to specify the limits of integration:
$\displaystyle \int_a^b x^n \, dx$
The \, directive inserts a thinspace between the integrand and the variable of integration; this is commonly done in (good) math typography.
If you need an expression without limits of integration:
$\displaystyle \int x^n \, dx$