Series and residues
taylor_series#
Default context
taylor_series(
input_expression: ExpressionLike,
variable: VariableLike,
expansion_point: ExpressionLike,
order: int,
) -> ExpressionCalling forms and variants
Explicit context: Context.taylor_series
taylor_series(
input_expression: ExpressionLike,
variable: VariableLike,
expansion_point: ExpressionLike,
order: int,
) -> ExpressionExpression method: Expression.taylor_series
taylor_series(
variable: VariableLike,
expansion_point: ExpressionLike,
order: int,
) -> ExpressionVariant using local assumptions — AssumptionScope method: AssumptionScope.taylor_series
taylor_series(
input_expression: ExpressionLike,
variable: VariableLike,
expansion_point: ExpressionLike,
truncation_order: int,
) -> ExpressionTruncated Taylor expansion about expansion_point, keeping terms of degree
strictly less than order (the remainder is
. Returns the truncated polynomial, not a series object;
order = 0 returns zero. Coefficients are computed exactly by repeated
symbolic differentiation.
maclaurin_series#
Default context
maclaurin_series(
input_expression: ExpressionLike,
variable: VariableLike,
order: int,
) -> ExpressionCalling forms
Explicit context: Context.maclaurin_series
maclaurin_series(
input_expression: ExpressionLike,
variable: VariableLike,
order: int,
) -> ExpressionExpression method: Expression.maclaurin_series
maclaurin_series(variable: VariableLike, order: int) -> Expressiontaylor_series specialised to expansion point 0.
laurent_series#
Default context
laurent_series(
input_expression: ExpressionLike,
variable: VariableLike,
center: ExpressionLike,
order: int,
) -> ExpressionCalling forms
Explicit context: Context.laurent_series
laurent_series(
input_expression: ExpressionLike,
variable: VariableLike,
center: ExpressionLike,
order: int,
) -> ExpressionExpression method: Expression.laurent_series
laurent_series(
variable: VariableLike,
center: ExpressionLike,
order: int,
) -> ExpressionTruncated Laurent expansion at center: every term
with , where m is the pole order. Analytic points degrade
to the Taylor expansion. At an essential singularity (where pole_order
declines) the result is an unevaluated series_unevaluated(...) placeholder,
because no finite truncation of the principal part is correct.
residue#
Default context
residue(
input_expression: ExpressionLike,
variable: Any,
center: Any,
) -> ExpressionCalling forms
Explicit context: Context.residue
residue(
input_expression: ExpressionLike,
variable: Any,
center: Any,
) -> ExpressionExpression method: Expression.residue
residue(variable: Any, center: Any) -> ExpressionCoefficient of in the Laurent expansion at
center. Analytic/removable points give 0; simple poles use the limit of
; higher poles use the derivative formula. Essential singularities
return an unevaluated residue_unevaluated(...) placeholder. Rational
functions use exact polynomial valuations and formal series division, so
explicit algebraic centers do not need to occur as structural factors.
pole_order#
Default context
pole_order(
input_expression: ExpressionLike,
variable: VariableLike,
center: ExpressionLike,
) -> Optional[int]Calling forms
Explicit context: Context.pole_order
pole_order(
input_expression: ExpressionLike,
variable: VariableLike,
center: ExpressionLike,
) -> Optional[int]Expression method: Expression.pole_order
pole_order(
variable: VariableLike,
center: ExpressionLike,
) -> Optional[int]Order of the singularity at center: 0 for analytic/removable points,
for a pole of order . Returns None (undefined in JS) when no
order can be certified — the essential-singularity / undecidable
verdict. Notes: this is the one series entry returning a plain integer,
mirroring the core classifier; it never returns an unevaluated form. For a
rational function at an exact algebraic center, the order is obtained from
the square-free multiplicities of its numerator and denominator.
Example#
Series expansion, residues, and closed-form summation.
import symi
x = symi.symbol("x")
k = symi.symbol("k", integer=True)
n = symi.symbol("n", integer=True)
print(symi.taylor_series(symi.exp(x), "x", 0, 4))
print(symi.residue(1 / (x**2 + 1), "x", symi.imaginary_unit))
print(symi.execute(symi.summation(k, "k", 0, n)))