# \dv

Shorthand ordinary-derivative command from the physics package, used for derivatives like d/dx and higher-order derivatives.

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

## Metadata

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

## Syntax

### physics

Argument specification: `s o m g`

Shorthand ordinary-derivative command from the physics package, used for derivatives like d/dx and higher-order derivatives.

## Examples

```latex
\dv{x}
```

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

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

[Open in Playground](https://play.texform.dev/?input=%5Cdv*%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/dv-to-frac-d](https://texform.dev/rules/physics/dv-to-frac-d)

Expand dv forms to explicit d-based derivative fractions.

Level: faithful. Fidelity: render.

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

→

```latex
\frac{\mathrm{d} #1}{\mathrm{d} #2}
```

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

→

```latex
m\frac{\mathrm{d} x}{\mathrm{d} t}=p
```

## Equivalent forms

```latex
\derivative
```

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

## See also

- [\\derivative](https://texform.dev/latex/commands/derivative)
- [\\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 |
| --- | --- | --- | --- | --- |
| \dv{a} | Positive: baseline | Pass | Fail | Pass |
| \dv*{a} | Positive: vary:s[0] | Pass | Fail | Pass |
| \dv[a]{b} | Positive: vary:o[1] | Pass | Fail | Pass |
| \dv{a}{b} | Positive: vary:g[3] | Pass | Fail | Pass |
| \dv*[a]{b}{c} | Positive: maximal | Pass | Fail | Pass |
| \dv a | Positive: bare[2] | Pass | Fail | Pass |
