Spectral methods in python

I have re-written the codes given in Trefethen's Spectral Methods in Matlab using python. You can find them in the following links as ipython notebooks.

If you have any suggestions to improve them or find a mistake, then I would like to hear.

A similar project is another-chebpy. Some of the following code is borrowed from another-chebpy. To get all the files, do

$ git clone https://github.com/cpraveen/chebpy

You can also read the code on github.

  1. Convergence of fourth order finite differences
  2. Convergence of periodic spectral method
  3. Band-limited interpolation
  4. Periodic spectral differentiation
  5. Repetition of Program 4 via FFT
  6. Variable coefficient wave equation
  7. Accuracy of periodic spectral differentiation
  8. Eigenvalues of harmonic oscillator
  9. Polynomial interpolation in equispaced and chebyshev points
  10. Polynomials and corresponding equipotential curves
  11. Chebyshev differentiation of a smooth function
  12. Accuracy of Chebyshev spectral differentiation
  13. Solve linear BVP
  14. Solve nonlinear BVP
  15. Solve eigenvalue BVP
  16. Poisson equation on [-1,1]x[-1,1] with u=0 on boundary
  17. Helmholtz equation
  18. Chebyshev differentiation via FFT
  19. Second order Wave Equation on Chebyshev Grid
  20. Second order Wave Equation using FFT
  21. Eigenvalues of Mathieu operator
  22. 5'th eigenvector of Airy equation
  23. Eigenvalues of perturbed Laplacian
  24. Pseudospectra of Davies complex harmonic oscillator
  25. Stability regions for ODE formulas
  26. Eigenvalues of 2nd-order Chebyshev diff. matrix
  27. Solve KdV equation