# \derivative

Verbose physics-package command for ordinary derivatives, including higher-order and starred slash-style forms.

https://texform.dev/latex/commands/derivative

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Physics: derivatives](https://texform.dev/latex/topics/physics-derivatives) |
| Packages | physics |
| Allowed mode | math |
| Tags |  |
| Commonality | low |
| Kind | prefix |

## Syntax

### physics

Argument specification: `s o m g`

Verbose physics-package command for ordinary derivatives, including higher-order and starred slash-style forms.

## Examples

```latex
\derivative{x}
```

[Open in Playground](https://play.texform.dev/?input=%5Cderivative%7Bx%7D)

```latex
\derivative*[n]{f}{x}
```

[Open in Playground](https://play.texform.dev/?input=%5Cderivative*%5Bn%5D%7Bf%7D%7Bx%7D)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| physics | full | none | full |

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

### [physics/derivative-to-dv](https://texform.dev/rules/physics/derivative-to-dv)

Collapse derivative to the compact dv command.

Level: authoring. Fidelity: render.

```latex
\derivative{#1}{#2}
```

→

```latex
\dv{#1}{#2}
```

```latex
F=m\derivative{x}{t}
```

→

```latex
F=m\dv{x}{t}
```

## Equivalent forms

```latex
\dv
```

exact. PhysicsMappings registers both names to the same Derivative handler with argMax=2 and op='\\diffd'.

## See also

- [\\dv](https://texform.dev/latex/commands/dv)
- [\\fderivative](https://texform.dev/latex/commands/fderivative)
- [\\fdv](https://texform.dev/latex/commands/fdv)
- [\\functionalderivative](https://texform.dev/latex/commands/functionalderivative)
- [\\partialderivative](https://texform.dev/latex/commands/partialderivative)
- [\\pderivative](https://texform.dev/latex/commands/pderivative)
- [\\pdv](https://texform.dev/latex/commands/pdv)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \derivative{a} | Positive: baseline | Pass | Fail | Pass |
| \derivative*{a} | Positive: vary:s[0] | Pass | Fail | Pass |
| \derivative[a]{b} | Positive: vary:o[1] | Pass | Fail | Pass |
| \derivative{a}{b} | Positive: vary:g[3] | Pass | Fail | Pass |
| \derivative*[a]{b}{c} | Positive: maximal | Pass | Fail | Pass |
| \derivative a | Positive: bare[2] | Pass | Fail | Pass |
