simplify
Rewrites an expression into a simpler equivalent form using Nerdamer's symbolic simplification rules.
Simplification includes algebraic cancellation, polynomial and rational reduction, selected identities, factorial cancellation, radical simplification, and simplification inside function arguments.
The result remains symbolic. Nerdamer only applies transformations it can justify from the expression and any available assumptions.
Examples
These examples use Nerdamer Notation.
Cancel a common polynomial factor.
simplify((x^2+2*x+1)/(x+1))
// → 1+xApply a trigonometric identity.
simplify(sin(x)^2+cos(x)^2)
// → 1Cancel adjacent factorials symbolically.
simplify(n!/(n+1)!)
// → (1+n)^-1Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
simplify(arg1)
nerdamer.simplify
Call the operation through the default nerdamer import.
nerdamer.simplify(x: string | Expression, modifiers: { … }): Expression
Parameters
| Name | Type | Description |
|---|---|---|
x | string | Expression | Expression or parser text to simplify. |
modifiers | { … } | Internal recursion markers used to detect an unchanged image. |
Returns
Expression — The simplified expression, which may retain forms unsupported by the finite strategy set.
Direct JavaScript / TypeScript API
Import the operation directly from its package entry point.
import { simplify } from 'nerdamer/algebra';
simplify(x: string | Expression, modifiers: { … }): Expression
Parameters
| Name | Type | Description |
|---|---|---|
x | string | Expression | Expression or parser text to simplify. |
modifiers | { … } | Internal recursion markers used to detect an unchanged image. |
Returns
Expression — The simplified expression, which may retain forms unsupported by the finite strategy set.
