Skip to content

Files

notebooks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 13, 2025
Jan 30, 2025
Mar 19, 2025
Mar 19, 2025
Feb 3, 2025
Feb 22, 2025
Mar 19, 2025
Feb 11, 2025
Jan 16, 2025
Mar 19, 2025
Feb 12, 2025
Feb 28, 2025
Mar 5, 2025
Mar 19, 2025

Code Usage and Experiments

Notebook What's in it
Arbitrary Domains This is where I first worked out how to take derivatives of functions over non-canonical domains (i.e. not [ 1 , 1 ] with the Chebyshev basis or [ 0 , 2 π ) with the Fourier basis. The explanation now also lives in the math, but the interactive code example lives here.
Chebyshev Usage examples of cheb_deriv, in one and multiple dimensions, including a PDE simulation at the end.
Chebyshev Antiderivatives It's easy to take spectral antiderivatives with the Fourier basis by simply dividing by j k instead of multiplying. This notebook explores doing the same with the Chebyshev basis, as part of a resolution to Issue #11.
Chebyshev Domain Endpoints Doing L'Hôpital's rule by hand to evaluate the endpoints is tedious and error-prone, so I wanted a way to do it programmatically. This notebook represents a solution. If the user tries to take derivatives over 4 t h order, a warning directs them here.
DCT Types Comparison Curious about other variants of the DCT, I did some sampling and reconstruction on a function with varying N . The DCT-II did best, which spawned Issue #13
DCT Types Extension Experiments This is where I worked out exactly how to take derivatives with the DCT-II/III and DST-III rather than the DCT-I and DST-I and poked around to find limitations. The correct path now lives in the math, but the intuition of the limitations best given by example here.
DFT, DCT, DST Relationship Explicit formulae and code examples to show how the coefficients of DCT and DST variants are related to DFT coefficients. A mathematical derivation of a couple of these relationships lives in the math, but it's useful to see others too and have a quick reference.
DFT Play Due to aliasing, it's possible to find the DFT coefficients with many different combinations of wavenumbers, so long as they cover 0 , . . . N modulo N . Here lies some code to demonstrate this fact.
Filtering Noise
Fourier Usage examples of fourier_deriv, in one and multiple dimensions, with an emphasis of when this method will work and when it will break.
Fourier Periodic Extensions It's sometimes possible to take even and odd extensions of a function and produce something periodic or nearly periodic, which can then be spectrally differentiated with the Fourier basis. This notebook demonstrates how to do this.
Stay in x Domain There is actually a simple derivative rule for a Chebyshev series, analogous to the rule for Power series, and we can exploit it to find spectral derivatives without some of the complicated steps.