File:Fast Multipoles - Local Expansion.svg

Summary

Description
English: For the Fast Multipole Method in 1D, this illustrates the interpolation of a pole at x=3 with an order-5 Chebyshev polynomial around [-1, 1]
Date
Source Own work
Author Summentier

Generated from the following Python script:

   import numpy as np
   import numpy.polynomial.chebyshev as np_cheby
   import matplotlib.pyplot as pl
   def f(x): 
       x = np.asarray(x)
       with np.errstate(divide='ignore'):
           return 1 / (x - 3)
   ftilde = np_cheby.Chebyshev.interpolate(f, 5)
   tk, _ = np_cheby.chebgauss(5)
   pl.figure(figsize=(5,4))
   x = np.linspace(-2, 4, 121)
   xint = np.linspace(-1, 1, 101)
   pl.plot(x, f(x), '-r', label='$(y-3)^{-1}$')
   pl.plot([3,3], [-10,10], ':r', lw=1)
   pl.plot(xint, ftilde(xint), '-k', label=r'$P_5(y)$')
   pl.plot(x, ftilde(x), '--k', lw=1.2)
   pl.plot(tk, ftilde(tk), '+k', lw=1, label='Chebyshev nodes')
   pl.legend()
   pl.ylim(-5, 5)
   pl.xlim(-1.5, 4)
   pl.title(r"Local expansion of a pole at $x=3$")


Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Fast%20Multipoles%20-%20Local%20Expansion.svgCategory:Self-published work
Category:SVG mathematics Category:Chebyshev polynomials Category:English-language SVG diagrams
Category:CC-BY-SA-4.0 Category:Chebyshev polynomials Category:English-language SVG diagrams Category:SVG mathematics Category:Self-published work