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 التفاضل والتكامل والتحليل →

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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث