Inactivate

Inactivate[expr]

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

Inactivate[expr,patt]

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.

Examples

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:

Neat Examples  (1)

Create a gallery of definite integrals:

Wolfram Research (2014), Inactivate, Wolfram Language function, https://reference.wolfram.com/language/ref/Inactivate.html.

Text

Wolfram Research (2014), Inactivate, Wolfram Language function, https://reference.wolfram.com/language/ref/Inactivate.html.

BibTeX

@misc{reference.wolfram_2020_inactivate, author="Wolfram Research", title="{Inactivate}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Inactivate.html}", note=[Accessed: 03-December-2020 ]}

BibLaTeX

@online{reference.wolfram_2020_inactivate, organization={Wolfram Research}, title={Inactivate}, year={2014}, url={https://reference.wolfram.com/language/ref/Inactivate.html}, note=[Accessed: 03-December-2020 ]}

CMS

Wolfram Language. 2014. "Inactivate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Inactivate.html.

APA

Wolfram Language. (2014). Inactivate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Inactivate.html