Opened 6 years ago

Closed 5 years ago

# wrong piecewise convolution

Reported by: Owned by: rws minor sage-duplicate/invalid/wontfix symbolics wdj, kcrisman, jondo, vbraun, slelievre, mkoeppe, eviatarbach, rws N/A

This doctest tests against a wrong result, the resulting curve must have a quadratic part:

```            sage: f = piecewise([[(-1,1),1]])                             ## example 2
sage: g = piecewise([[(0,3),x]])
sage: f.convolution(g)
Piecewise defined function with 3 parts, [[(-1, 1), 0], [(1, 2), -3/2*x], [(2, 4), -3/2*x]]
```

From numerical investigation it seems the solution would be `piecewise(x|-->1/2*x^2 + x + 1/2 on (-1/2, 1), x|-->2*x on (1, 2), x|-->-1/2*x^2 + x + 4 on (2, 7/2); x)`.

This works in the new `piecewise` from #14801.

The ticket is for documentary reasons because a new piecewise code is being worked on in #14801.

### comment:1 Changed 6 years ago by kcrisman

See also #12123 (possibly the same?) Actually, the fix should be pretty easy once one understands the code, but I gave up here.

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

• Description modified (diff)

### comment:3 Changed 5 years ago by mkoeppe

• Cc wdj kcrisman jondo vbraun slelievre mkoeppe eviatarbach rws added
• Description modified (diff)
• Milestone changed from sage-6.5 to sage-duplicate/invalid/wontfix
• Priority changed from major to minor

Works in the new `piecewise` from #14801. Dup of #12123, which is why I'm setting this to "dup/needs review"

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

• Status changed from new to needs_review

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

• Status changed from needs_review to positive_review

### comment:6 Changed 5 years ago by embray

• Resolution set to wontfix
• Status changed from positive_review to closed

Determined to be invalid/duplicate/wontfix (closing as "wontfix" as a catch-all resolution).

Note: See TracTickets for help on using tickets.