This entry is now part of the unified function reference. Open the unified page →
nerdamer.partfrac
nerdamer.partfrac(x: ExpressionInput, variable?: ExpressionInput): ExpressionDecomposes a rational expression P(x)/Q(x) into partial fractions.
The routine extracts
`P(x)/Q(x)`, performs polynomial long division for an improper fraction, factors
`Q`over the supported exact polynomial domain, and solves the undetermined coefficients by exact evaluation and row reduction. Repeated linear factors and irreducible quadratic factors are supported. An irreducible factor of higher degree, a singular coefficient system, a denominator independent of the selected variable, or a factorization that does not expose a useful decomposition leaves the original expression unchanged.
Parameters
| Name | Type | Description |
|---|---|---|
x | ExpressionInput | Rational expression to decompose. |
variable | ExpressionInput | Main variable; defaults to the first variable reported by the expression. |
Returns
Expression — A new decomposition when one is found, otherwise the original parsed expression.
