1 | initial version |

I can't fix this for you (yet?), but I see why this wasn't detected before - the example you reference uses

```
f = Piecewise([[(0,1),1*x^0]])
```

which becomes

```
sage: f
Piecewise defined function with 1 parts, [[(0, 1), 1]]
```

so the variables don't come into play. Also, the example (and yours) uses a polynomial variable, which of course (?) becomes non-polynomial once `e^x`

is involved. So there are two strikes against this.

It's not clear to me that there is an easy way to get around this, because there isn't an obvious way to turn the polynomial generator `x`

into an exponential, but the code for convolution relies pretty heavily on having those polynomial generators.

Stock disclaimer: all piecewise material dates from before Sage had any true symbolic capabilities. It has since languished. See the piecewise tag here and questions under it, such as this one.

I'm hoping someone more familiar with some of the numerical tools in Sage can help you with your underlying questions. You can certainly get some convolutions, e.g. discrete ones in Numpy, but your use case might be a little trickier.

Maxima used directly might be of help, or perhaps using its integration as at this Maxima feature request or using its piecewise capabilities.

2 | No.2 Revision |

I can't fix this for you (yet?), but I see why this wasn't detected before - the example you reference uses

```
f = Piecewise([[(0,1),1*x^0]])
```

which becomes

```
sage: f
Piecewise defined function with 1 parts, [[(0, 1), 1]]
```

so the variables don't come into play. Also, the example (and yours) uses a polynomial variable, which of course (?) becomes non-polynomial once `e^x`

is involved. So there are two strikes against this.

It's not clear to me that there is an easy way to get around this, because there isn't an obvious way to turn the polynomial generator `x`

into an exponential, but the code for convolution relies pretty heavily on having those polynomial generators.

Stock disclaimer: all piecewise material dates from before Sage had any true symbolic capabilities. It has since languished. See the piecewise tag here and questions under it, such as this one.

I'm hoping someone more familiar with some of the numerical tools in Sage can help you with your underlying questions. You can certainly get some convolutions, e.g. discrete ones in Numpy, but your use case might be a little trickier.

Maxima used directly might be of help, or perhaps using its integration as at this Maxima feature request or using its ~~piecewise capabilities.~~

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.