Derivative in LaTeX (\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.
\documentclass{article}
\begin{document}
Derivative: $\frac{d}{dx}$
\[ \frac{d}{dx} e^{3x} = 3e^{3x} \]
\end{document}Related symbols
- Partial derivative operator
\frac{\partial}{\partial x} - Contour Integral
\oint - Limit
\lim_{x \to a} - Triple Integral
\iiint - Limit
\lim_{x \to \infty} - Double Integral
\iint
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.
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