This entry is documented with its primary interface. Open the documentation →
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. Each denominator
factor of degree d receives a numerator polynomial of degree less than d, including
repeated factors. 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.
