
    \hG                         S SK Jr  SS jrg)    )sympifyNc                 <    [        U 5      n U R                  XX45      $ )a  Series expansion of expr around point `x = x0`.

Parameters
==========

expr : Expression
       The expression whose series is to be expanded.

x : Symbol
    It is the variable of the expression to be calculated.

x0 : Value
     The value around which ``x`` is calculated. Can be any value
     from ``-oo`` to ``oo``.

n : Value
    The number of terms upto which the series is to be expanded.

dir : String, optional
      The series-expansion can be bi-directional. If ``dir="+"``,
      then (x->x0+). If ``dir="-"``, then (x->x0-). For infinite
      ``x0`` (``oo`` or ``-oo``), the ``dir`` argument is determined
      from the direction of the infinity (i.e., ``dir="-"`` for
      ``oo``).

Examples
========

>>> from sympy import series, tan, oo
>>> from sympy.abc import x
>>> f = tan(x)
>>> series(f, x, 2, 6, "+")
tan(2) + (1 + tan(2)**2)*(x - 2) + (x - 2)**2*(tan(2)**3 + tan(2)) +
(x - 2)**3*(1/3 + 4*tan(2)**2/3 + tan(2)**4) + (x - 2)**4*(tan(2)**5 +
5*tan(2)**3/3 + 2*tan(2)/3) + (x - 2)**5*(2/15 + 17*tan(2)**2/15 +
2*tan(2)**4 + tan(2)**6) + O((x - 2)**6, (x, 2))

>>> series(f, x, 2, 3, "-")
tan(2) + (2 - x)*(-tan(2)**2 - 1) + (2 - x)**2*(tan(2)**3 + tan(2))
+ O((x - 2)**3, (x, 2))

>>> series(f, x, 2, oo, "+")
Traceback (most recent call last):
...
TypeError: 'Infinity' object cannot be interpreted as an integer

Returns
=======

Expr
    Series expansion of the expression about x0

See Also
========

sympy.core.expr.Expr.series: See the docstring of Expr.series() for complete details of this wrapper.
)r   series)exprxx0ndirs        K/var/www/auris/envauris/lib/python3.13/site-packages/sympy/series/series.pyr   r      s    t 4=D;;qa%%    )Nr      +)sympy.core.sympifyr   r    r   r   <module>r      s    &;&r   