series_expansion
Computes Taylor, Laurent, or Puiseux series expansions of symbolic expressions around a specified point to a chosen order, with an option to omit the remainder term.
Instructions
Computes a Taylor/Laurent/Puiseux expansion (développement limité) using SymPy's series.
Args:
expr_key: The key of the expression (previously introduced) to expand.
var_name: The variable (previously introduced) of the expansion.
point: The expansion point, e.g. "0", "1", "pi/2", "oo". Parsed without eval
with the same rules as limit_expression. Defaults to "0".
order: Terms up to (var - point)**(order - 1) are kept, followed by O((var - point)**order).
Must be between 1 and 50. Defaults to 6.
remove_order_term: If True, drop the O(...) remainder and return the truncated polynomial.
Example:
intro("x", [Assumption.REAL], [])
expr_key = introduce_expression("exp(x)")
result_key = series_expansion(expr_key, "x", "0", 4)
# 1 + x + x^2/2 + x^3/6 + O(x^4)
Returns:
A key for the expansion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | No | ||
| point | No | 0 | |
| expr_key | Yes | ||
| var_name | Yes | ||
| remove_order_term | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |