# \variation

Typesets a variation symbol for variational calculus or functional-variation notation, optionally with an order in brackets and with an attached braced or parenthesized quantity.

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

## 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: `o d<(,)><{,}>`

Typesets a variation symbol for variational calculus or functional-variation notation, optionally with an order in brackets and with an attached braced or parenthesized quantity.

## Examples

```latex
\variation
```

[Open in Playground](https://play.texform.dev/?input=%5Cvariation)

```latex
\variation[n]{q}
```

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

```latex
\variation(q)
```

[Open in Playground](https://play.texform.dev/?input=%5Cvariation%28q%29)

## 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.

## Equivalent forms

```latex
\var
```

exact. Mapped to the same Differential parse method with the same operator parameter.

## See also

- [\\dd](https://texform.dev/latex/commands/dd)
- [\\differential](https://texform.dev/latex/commands/differential)
- [\\var](https://texform.dev/latex/commands/var)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \variation | Positive: baseline | Pass | Fail | Pass |
| \variation[a] | Positive: vary:o[0] | Pass | Fail | Pass |
| \variation (a) | Positive: vary:d[1] | Pass | Fail | Pass |
| \variation[a](b) | Positive: maximal | Pass | Fail | Pass |
