Skip to content

Partial sums are off for Fourier series of piecewise functions #8603

Closed
@novoselt

Description

@novoselt

Doing

f = Piecewise([[(-pi, pi), x]])
print f.fourier_series_partial_sum(2, pi)
print f.fourier_series_partial_sum(3, pi)

we get

2*sin(x)
-sin(2*x) + 2*sin(x)

while according to the documentation we should get the second output with the first command.

Update: Same output with the new piecewise from #14801. Does it agree with the documentation there?

UPDATE: this is fixed in Sage 8.1 (see #23672):

sage: f = piecewise([[(-pi, pi), x]])
sage: f.fourier_series_partial_sum(2, pi)
-sin(2*x) + 2*sin(x)

Depends on #14801

CC: @wdjoyner @jasongrout @jondo @kcrisman @vbraun @slel @mkoeppe @eviatarbach @rwst @novoselt

Component: calculus

Keywords: sd31

Work Issues: other instances of the typo

Author: David Joyner

Issue created by migration from https://trac.sagemath.org/ticket/8603

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions