Differential in LaTeX (dx)

dxdx
LaTeX command
dx
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Differential of x, closing an integral and naming the variable of integration.

Typed as plain dx, the d comes out italic and sits flush against the integrand, so the usual fix is a thin space: \int f(x)\,dx. ISO style and many journals set the d upright with \mathrm{d}x; a macro like \newcommand{\dd}{\mathrm{d}} keeps this consistent throughout a paper. In multiple integrals, separate differentials with thin spaces, dx\,dy, or abbreviate them as dA or dV. The same differential appears in Leibniz derivatives \frac{dy}{dx} and in differential forms, where products are written dx \wedge dy and order matters because the wedge product is antisymmetric.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

∫0πsin⁡x dx=2\int_0^{\pi} \sin x \, dx = 2
\documentclass{article}
\begin{document}
Differential: $dx$

\[ \int_0^{\pi} \sin x \, dx = 2 \]
\end{document}

Related symbols

All Kalkulus & Analisis →

Frequently asked questions

How do I write Differential in LaTeX?
Type dx in math mode, for example $\int_0^{\pi} \sin x \, dx = 2$. It works in plain LaTeX without loading any package.
Which package do I need for dx?
None. dx is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use dx in text mode, or only in math mode?
Both. dx compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI

  • Hasilkan diagram TikZ yang indah menggunakan AI
  • Unggah gambar dan konversi ke LaTeX dengan mulus
  • Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian