FourierSeries`
FourierSeries`

NFourierCoefficient

NFourierCoefficient[expr,t,n]

gives a numerical approximation to the n^(th) coefficient in the Fourier exponential series expansion of expr, where expr is a periodic function of t with period 2π.

Details and Options

  • To use NFourierCoefficient, you first need to load the Fourier Series Package using Needs["FourierSeries`"].
  • The numerical approximation to the n^(th) coefficient in the Fourier exponential series expansion of expr is by default defined to be NIntegrate[expr -nt,{t,-π,π}], where n must be an integer.
  • Different choices for the definition of the Fourier exponential series expansion can be specified using the option FourierParameters.
  • With the setting FourierParameters->{a,b}, expr is assumed to have a period of , and the n^(th) coefficient computed by NFourierCoefficient is NIntegrate[expr -bnt,{t,-,}].
  • The parameter b in the setting FourierParameters->{a,b} must be numeric.
  • In addition to the option FourierParameters, NFourierCoefficient can also accept the options available to NIntegrate. These options are passed directly to NIntegrate.

Examples

Basic Examples  (1)

Use different definitions for calculating numerical approximation for a Fourier coefficient:

Compare with the answer from symbolic evaluation: