Opened 6 years ago

# Check for and handle symbolic series in simplify

Reported by: Owned by: dkrenn major sage-7.4 symbolics N/A

### Description

```sage: (x+1).series(x,2)
1 + 1*x
sage: (x+1).series(x,2).operator() is None
True
sage: (x+1).series(x,2).operands()
[1, x]
```

Related (maybe a consequence) is

```sage: (x+1).series(x,2) - 1
(1 + 1*x) - 1
sage: ((x+1).series(x,2) - 1).simplify()
...
ValueError: The name "1" is not a valid Python identifier.
```

### comment:1 Changed 5 years ago by rws

It is both a consequence of the special status series have in GiNaC. As to the latter, the documentation notes you need to apply series again for getting results:

```sage: (x+1).series(x,2)
1 + 1*x
sage: _-1
(1 + 1*x) - 1
sage: _.series(x,2)
1*x
```

### comment:2 Changed 5 years ago by rws

• Milestone changed from sage-7.1 to sage-7.4
• Summary changed from missing operator in symbolic series to Check for and handle symbolic series in simplify

The best way to give users what they want---apart from always automatically applying the series operator---would be to apply it in `simplify()` if the expression has a series, i.e., `((x+1).series(x,2) - 1).simplify()` should give `1*x` instead of an exception. This means that the operator to-be-applied should have as precision the min of all operators precisions in the expression.

Last edited 5 years ago by rws (previous) (diff)
Note: See TracTickets for help on using tickets.