Function reference · Algebra

polyfactors

Returns polynomial factors as a Vector of separate factor expressions.

In Nerdamer Notation, use polyfactors(...). In JavaScript or TypeScript, use polyFactors(...) from the root API or nerdamer/algebra.

The result is a Vector containing the factor expressions rather than a single product.

Examples

These examples use Nerdamer Notation.

Return the factors of a difference of squares as separate Vector entries.

polyfactors(x^2-1)
// → [1+x, -1+x]

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API · Direct API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

polyfactors(arg1)

nerdamer.polyFactors

Call the operation through the default nerdamer import.

nerdamer.polyFactors(x: ExpressionInput): Vector

Parameters

NameTypeDescription
xExpressionInputPolynomial-like input.

Returns

Vector — A new Vector containing the factor expressions.

Browse the nerdamer API →

Direct JavaScript / TypeScript API

Import the operation directly from its package entry point.

import { polyFactors } from 'nerdamer/algebra';
polyFactors(x: ExpressionInput): Vector

Parameters

NameTypeDescription
xExpressionInputPolynomial-like input.

Returns

Vector — A new Vector containing the factor expressions.

Browse nerdamer/algebra →

Related API names

polyFactors

← Back to Function reference