How to write partial differential equation (Ex. dQ/dt=ds/dt) with real partial derivative signs?

I would like to make a partial differential equation by using the following notation:

dQ/dt

(without / but with a real numerator and denomenator). Earlier today I got help from this page on how to u_t, but now I also have to write it like dQ/dt. I understand how it can be done by using dollarsigns and fractions, but is it possible to do it using

\begin{equation}
....
\end{equation}


so that it can be on separate lines and using math-style?

• See also cool: "The pack­age (COn­tent Ori­ented LaTeX) gives LaTeX the power to re­tain mathemat­i­cal mean­ing of its ex­pres­sions in ad­di­tion to the typsetting in­struc­tions; es­sen­tially sep­a­rat­ing style from the con­tent of the math." – Mike Renfro Jan 29 '15 at 14:20

You said partial differential equation:

\documentclass{article}
\begin{document}
\begin{equation}
\frac{\partial Q}{\partial t} = \frac{\partial s}{\partial t}
\end{equation}
\end{document} now using physics package, extra goodies (bonus):

\documentclass{article}
\usepackage{physics}
\begin{document}
$\dv{Q}{t} = \dv{s}{t} \quad \dv[n]{Q}{t} = \dv[n]{s}{t} \quad \pdv{Q}{t} = \pdv{s}{t} \quad \pdv[n]{Q}{t} = \pdv[n]{s}{t} \quad \pdv{Q}{x}{t} = \pdv{s}{x}{t} \quad$
$\fdv{F}{g}$
\end{document} • Thank you very much for both answers! Both of them worked perfect. – David Jan 29 '15 at 13:24
• I also tried the second option you gave, but when I had written \usepackage{physics} at the top of the document, I got this as an output: ! LaTeX Error: File physics.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: – David Jan 29 '15 at 13:43
• What should I enter as file name? – David Jan 29 '15 at 13:43
• @David It means you don't have physics package installed. Please install it. – user11232 Jan 29 '15 at 13:57
• Note that we can italicize the d's using \usepackage[italicdiff]{physics}. – Mateen Ulhaq Apr 9 '17 at 5:23

I now recommend using the cool package:

\documentclass{article}
\usepackage{cool}
\begin{document}
Text:
$\pderiv{u}{t}=\pderiv{u}{x}$
More text.
\end{document}


I used to recommend defining a command to make a short form:

\documentclass{article}
% Partial derivative
\newcommand*{\pd}[]{\ensuremath{\frac{\partial^{#1} #2}{\partial #3}}}
\begin{document}
Text:
$\pd{u}{t}=\pd{u}{x^2}$
More text.
\end{document} • There is rarely a good use of \ensuremath. While there's nothing really wrong with it, it removes semantic meaning without adding much of anything else. See When not to use \ensuremath for math macro? – Paul Gessler Jan 29 '15 at 13:33
• You do not have to make that square in denominator by hand... you can formulate it in this way: \newcommand{\pdv}[]{\frac{\partial^{#1}#2}{\partial {#3}^{#1}}} – Jozef Janočko Feb 19 '16 at 18:27
• @JozefJanočko Note that \partial^{}u (the default in your solution) will give more spacing compared to \partial u. – hooy Feb 19 '16 at 21:18

Try this

\frac{\partial^2 u}{\partial x^2}
`
• This doesn't add anything more than isn't already covered in the other answer(s). – Werner Feb 1 at 19:51