Derivative in LaTeX (\frac{d}{dx})

ddx\frac{d}{dx}
LaTeX command
\frac{d}{dx}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Leibniz notation for the derivative operator with respect to x, built from a fraction.

Writing \frac{d}{dx} gives the operator form used in rules like \frac{d}{dx}\sin x = \cos x, while \frac{dy}{dx} names the derivative of a dependent variable. Many style guides set the differential d upright, as \mathrm{d}, to separate it from a variable named d; a macro such as \newcommand{\diff}{\mathrm{d}} keeps this consistent. In running text, \frac shrinks to tiny script size, so prefer \tfrac or the slash form dy/dx there. For higher orders write \frac{d^2y}{dx^2}, with the exponent on d in the numerator but on x in the denominator.

Minimal compilable example

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

ddxe3x=3e3x\frac{d}{dx} e^{3x} = 3e^{3x}
\documentclass{article}
\begin{document}
Derivative: $\frac{d}{dx}$

\[ \frac{d}{dx} e^{3x} = 3e^{3x} \]
\end{document}

Related symbols

All التفاضل والتكامل والتحليل →

Frequently asked questions

How do I write Derivative in LaTeX?
Type \frac{d}{dx} in math mode, for example $\frac{d}{dx} e^{3x} = 3e^{3x}$. It works in plain LaTeX without loading any package.
Which package do I need for \frac{d}{dx}?
None. \frac{d}{dx} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \frac{d}{dx} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\frac{d}{dx}$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

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

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

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