simplifyConstant

simplifyConstant(expr)

simplifyConstant(expr, options)

Try it yourself:

See also:

Simplify constant parts of expressions

simplifyConstant reduces constant arithmetic inside an expression while preserving its symbolic variables. It is useful when an expression should remain readable but fixed numeric portions can be calculated.

Example

An expression containing (2 + 3) * x can become 5 * x without assigning a value to x. Compare simplify for broader algebraic rewriting and evaluate for a fully scoped numerical result.

When to use it

Use it before derivative or repeated calculation to reduce obvious constant work. It is not a replacement for parsing valid syntax with parse, and it will not resolve unknown names. Use round only for presentation rather than changing symbolic precision prematurely.

All functions