AroundReplace[expr,{s1Around[x1,δ1],s2Around[x2,δ2],…}]
propagates uncertainty in expr by replacing all occurrences of si by Around[xi,δi].
AroundReplace[expr,rules,n]
propagates uncertainty in expr using a series expansion to order n.
AroundReplace
AroundReplace[expr,{s1Around[x1,δ1],s2Around[x2,δ2],…}]
propagates uncertainty in expr by replacing all occurrences of si by Around[xi,δi].
AroundReplace[expr,rules,n]
propagates uncertainty in expr using a series expansion to order n.
Details
- In AroundReplace[expr,{s1->Around[xi,…],…}], each occurrence of a given si in expr is assumed to represent the same value, but different replacements Around[xi,…] are assumed to be uncorrelated.
- In AroundReplace[expr,rules], rules can contain scalar rules of the form sAround[…] for an uncorrelated variable s, or vector rules of the form {s,r,…}VectorAround[…] for correlated variables s,r,….
- In AroundReplace[f[s,r],rules], uncertainty propagation is based on the following formula:
- In AroundReplace[f[s,r],rules,n], uncertainty propagation involves derivatives up to order n.
- For n=1, the result of AroundReplace[f[s],sAround[x,δ],n] is centered at f[x], but for higher n orders the central value may depend on δ as well.
Examples
open all close allBasic Examples (2)
Perform an operation with Around objects:
AroundReplace[Exp[s] + Exp[s / 2], s -> Around[2., 0.3]]Converting x into two uncorrelated variables makes the result have smaller uncertainty:
AroundReplace[Exp[s] + Exp[r / 2], {s -> Around[2., 0.3], r -> Around[2., 0.3]}]Specify an intermediate level of correlation with VectorAround:
AroundReplace[Exp[s] + Exp[r / 2], {s, r} -> VectorAround[{2., 2.}, {{0.3, 0.3}, 0.5}]]By default, uncertainty propagation uses first-order expansions:
AroundReplace[Sin[s], s -> Around[1.56, 0.01]]Use a higher-order expansion to obtain better results:
AroundReplace[Sin[s], s -> Around[1.56, 0.01], 2]Properties & Relations (1)
AroundReplace[expr,rules] is not equivalent to ReplaceAll[expr,rules] in general:
expr = p q / (p + q);
rules = {p -> Around[p0, δp], q -> Around[q0, δq]};
$Assumptions = (p | q | p0 | q0 | δp | δq)∈Reals;AroundReplace[expr, rules]//SimplifyReplaceAll[expr, rules]//SimplifyThey coincide if each replaced variable appears once in the original expression:
ReplaceAll[1 / (1 / p + 1 / q), rules]//SimplifyRelated Guides
History
Text
Wolfram Research (2019), AroundReplace, Wolfram Language function, https://reference.wolfram.com/language/ref/AroundReplace.html.
CMS
Wolfram Language. 2019. "AroundReplace." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AroundReplace.html.
APA
Wolfram Language. (2019). AroundReplace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AroundReplace.html
BibTeX
@misc{reference.wolfram_2026_aroundreplace, author="Wolfram Research", title="{AroundReplace}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/AroundReplace.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_aroundreplace, organization={Wolfram Research}, title={AroundReplace}, year={2019}, url={https://reference.wolfram.com/language/ref/AroundReplace.html}, note=[Accessed: 12-June-2026]}