11

Every time I want to write an (ordinary) derivative I have to use frac, like this:

\frac{\mathrm{d}^2 \omega}{\mathrm{d}\theta^2}

Or using \partial for partial derivatives.

Is there a package or a command that takes, for instance, (Ordinary or Partial, Power of derivative, variables) and outputs the formatted expression?

  • one is physics for other i temporary don't remember a name :-( – Zarko Jan 27 '18 at 17:28
  • 2
    Certainly you can define abbreviations, but I would recommend not doing this since you may want to share your TeX code with others. Then you probably don't want to mess with their shortcuts, and the others may not be too excited about yours either. Use shortcuts in your editor instead. – user121799 Jan 27 '18 at 17:28
  • \partial, for example. – Oleg Lobachev Jan 27 '18 at 17:35
16

You can use the esdiff package, which has handy macros for derivatives and partial derivatives, taking care of indices. Here is a demo;

\documentclass{article}%

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage[thinc]{esdiff}

 \begin{document}

\begin{alignat*}{3}
     \diff{f}{x} &\qquad \diff*[4]{g}{t}{t = 1} \\[2ex]
     \diffp{f}{x} &\qquad\diffp{g}{tu}& & \qquad & \diffp*{g}{{t^2}{u^3}}{(0,0)}
 \end{alignat*}

 \end{document}

enter image description here

  • +5 for my friend. I still have the account stuck on Mathematics. Could you please take a look at my combinatorial question and publish it, please? – Sebastiano Jan 27 '18 at 20:49
  • @ Sebastiano: Do you mean, publish it in my name, or edit yours? Or if you want, I know a combinatorial proof for your question? – Bernard Jan 27 '18 at 21:11
  • Edit my question and after you give me a combinatorial proof for your question. The answers are blocked – Sebastiano Jan 27 '18 at 21:12
  • @Sebastiano: I've modified your question (without changing its title) to put it in a more general context. Please see if it's OK. I'm not sure it will be enough to re-open it, though. – Bernard Jan 27 '18 at 21:29
  • 1
    @ParthaD.: No there is n't. But you may take a look at the diffcoeff package, which has a \dl command and is quite customisable through a set of options, and a config file if you want. – Bernard Feb 17 at 10:39
12

Oh, you mean not symbol, but operator. There is physics, as stated by @Zarko.

  • \differential produces the variants of d: \dd x
  • \derivative yields the $df/dx$ in variants: \dv{x}, \dv{f}{x}
  • \partialderivative produces the partial symbol in derivaties a la carte, similar to \dv, use \pdv x, etc.
  • \variation and \functionalderivative are also there, e.g. \fdv{F}{g}.

It's all in the documentation on pages 5-6, say texdoc physics for the pdf.


Screenshot from the document.

enter image description here

2

Exist also derivative package (very simple to use) to write ordinary derivate and partial derivatives. Here there are simple examples.

enter image description here

\documentclass[12pt]{article}
\usepackage{derivative}
\usepackage{amsmath,amssymb}
\begin{document}

\[\odv{f(x)}{x}, \qquad \odv[n]{f(x)}{x}, \qquad \pdv[\alpha,b,c]{f}{x,y,z}\]
\[\pdv{f}{x,y}, \qquad \odv{e^{\tan(x)}}{x}, \qquad \odv{\cos t}{t}_{t=0}^{}\]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.