The best approach is to make the numerator variable optional: \newcommand{\ pder}[2][]{\frac{\partial#1}{\partial#2}}. Now \pder[f]{x} and \pder{x} will work as you .

If you are looking for the right symbols to create a partial derivative in LaTeX, this is how it's done.

derivatives), or variables held constant (partial derivatives), and the command for differentials ensures the dx (or dx) used in integrals is con-.

How to write LateX Derivatives, Limits, Sums, Products and Integrals. 14 November Partial firt order derivative, $\frac{\partial f}{\partial x}$.