Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation and user interface of Fourier series #23672

Closed
egourgoulhon opened this issue Aug 22, 2017 · 10 comments
Closed

Improve documentation and user interface of Fourier series #23672

egourgoulhon opened this issue Aug 22, 2017 · 10 comments

Comments

@egourgoulhon
Copy link
Member

As discussed in https://groups.google.com/forum/#!topic/sage-devel/b1pWen3lrKA, the documentation of Fourier series as implemented in piecewise-defined functions needs some improvement. This ticket provides it, as well as a simplification of the user interface: the half-period is now an optional argument; if not provided, it is inferred from the domain of the piecewise-defined function:

sage: f = piecewise([((0, 2*pi), cos(x))]) 
sage: f.fourier_series_cosine_coefficient(1)  # results in TypeError in Sage 8.0
1
sage: f.fourier_series_cosine_coefficient(1, pi)  # compatible with Sage 8.0
1

The ticket also corrects two bugs:

  • computation of Fourier coefficients when the domain width does not coincide with the period:
sage: f = piecewise([((0, 4*pi), cos(x))])
sage: f.fourier_series_cosine_coefficient(1, pi)  # yields 2 in Sage 8.0
1
  • despite what it claimed, the method fourier_series_partial_sum did not return SN(x) but SN-1(x) (this is because the summation was governed by srange(1, N) instead of srange(1, N+1)); we have now
sage: f = piecewise([((0, 2*pi), cos(x))])
sage: f.fourier_series_partial_sum(1, pi)  # yields 0 in Sage 8.0
cos(x)

CC: @wdjoyner

Component: documentation

Keywords: Fourier series, piecewise functions

Author: Eric Gourgoulhon

Branch/Commit: 8cb8a4d

Reviewer: Richard L Lozes

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

@egourgoulhon
Copy link
Member Author

Branch: public/23672-Fourier_series

@egourgoulhon
Copy link
Member Author

Commit: de1bb70

@egourgoulhon
Copy link
Member Author

New commits:

de1bb70Improve documentation and user interface of Fourier series

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 24, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

8cb8a4dRewrite the Fourier series sections in Sage Constructions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 24, 2017

Changed commit from de1bb70 to 8cb8a4d

@rll2021
Copy link
Mannequin

rll2021 mannequin commented Aug 28, 2017

comment:3

Changes documented with explanatory texts and tests. Now behaves as one expects of a Fourier series.

@egourgoulhon
Copy link
Member Author

comment:4

Thank you for the review!

@rll2021
Copy link
Mannequin

rll2021 mannequin commented Aug 29, 2017

comment:5

Filled in "Reviewers" field.

@rll2021
Copy link
Mannequin

rll2021 mannequin commented Aug 29, 2017

Reviewer: Richard L Lozes

@vbraun
Copy link
Member

vbraun commented Sep 4, 2017

Changed branch from public/23672-Fourier_series to 8cb8a4d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants