replaces all instances of f with Inactive[f] for symbols f used as heads in expr.


inactivates all symbols in expr that match the pattern patt.

Details and Options

  • Inactivate has attribute HoldFirst, and symbols in expr are inactivated before evaluation.
  • With the option setting Heads->False, Inactivate does not enter heads of expressions and inactivate their parts.
  • By default, certain semantically important heads are not inactivated. Common examples include List, Rule and Blank.


open allclose all

Basic Examples  (3)

Inactivate an expression:

Activate it:

Inactivate an expression with several terms:

Activate different parts of the expression:

Inactivate a symbol in an expression:

Evaluate the expression:

Scope  (5)

Inactivate an expression:

Evaluate the expression:

Inactivate the symbol g only:

Activate g:

Inactivate g and h:

Activate h only:

Inactivate all symbols except Integrate in an expression:

Evaluate the expression:

Prevent numeric functions from being inactivated:

Normally Plus and Sin would also have been inactivated:

Options  (1)

Heads  (1)

By default, Inactivate will make heads inactive, even inside compound heads:

With the setting Heads->False, inactivation does not proceed inside compound heads:

Applications  (5)

Define a trigonometric expression:

Activate different trigonometric functions:

Define , leaving both the derivative and integral inactive:

Differentiate the integral without evaluating the integral:

Activate the integral to compute the final result:

Integrate without performing the differentiation:

Activate the differentiation to compute the final result:

The results are mathematically the same:

Show identities including Leibniz's rule for differentiating integrals:

Chain rule:

Indefinite integrals:

Infinite sums and products:

Properties & Relations  (6)

Activate is the inverse of Inactivate:

Inactivate replaces specific symbols with their inactive forms:

Activate replaces all instances of inactive symbols with their active forms:

Inactivate maintains symbols in inactive form and allows parts of expressions to be inactive:

Hold maintains expressions in unevaluated form, and all parts are inactive:

Compare an inactive expression with the corresponding FullForm:

Inactivate is an idempotent operator:

Certain heads are not inactivated by default, including List, Rule () and Blank (_):

Using Replace at all levels can inactivate all heads in an expression:

Possible Issues  (1)

As compound heads have no attributes, the use of Inactivate can lead to evaluation leaks:

Normally, the HoldAll attribute of Sum would prevent the k from evaluating:

Neat Examples  (1)

Create a gallery of definite integrals:

Wolfram Research (2014), Inactivate, Wolfram Language function,


Wolfram Research (2014), Inactivate, Wolfram Language function,


Wolfram Language. 2014. "Inactivate." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2014). Inactivate. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_inactivate, author="Wolfram Research", title="{Inactivate}", year="2014", howpublished="\url{}", note=[Accessed: 19-July-2024 ]}


@online{reference.wolfram_2024_inactivate, organization={Wolfram Research}, title={Inactivate}, year={2014}, url={}, note=[Accessed: 19-July-2024 ]}