FourierSeries`
FourierSeries`
NFourierCosCoefficient
NFourierCosCoefficient[expr,t,n]
gives a numerical approximation to the n coefficient in the Fourier cosine series expansion of expr, where expr is a periodic function of t with period 2π.
Details and Options
- To use NFourierCosCoefficient, you first need to load the Fourier Series Package using Needs["FourierSeries`"].
- The numerical approximation to the n
coefficient in the Fourier cosine series expansion of expr is by default defined to be
NIntegrate[expr Cos[n t],{t,0,π}].
- Different choices for the definition of the Fourier cosine 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
coefficient computed by NFourierCosCoefficient is
NIntegrate[expr Cos[b n t],{t,0,
}].
- The parameter b in the setting FourierParameters->{a,b} must be numeric.
- In addition to the option FourierParameters, NFourierCosCoefficient can also accept the options available to NIntegrate. These options are passed directly to NIntegrate.
Examples
Basic Examples (1)Summary of the most common use cases
In[1]:=1

✖
https://wolfram.com/xid/0cy30vl31cqoj6wtui498pe-bsixf8
Use different definitions to calculate numerical approximations for a Fourier cosine coefficient:
In[2]:=2

✖
https://wolfram.com/xid/0cy30vl31cqoj6wtui498pe-dv6y4x
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0cy30vl31cqoj6wtui498pe-ly3mjw
Out[3]=3

Compare with the answer from symbolic evaluation:
In[4]:=4

✖
https://wolfram.com/xid/0cy30vl31cqoj6wtui498pe-het7p6
Out[4]=4

In[5]:=5

✖
https://wolfram.com/xid/0cy30vl31cqoj6wtui498pe-uqc8n
Out[5]=5

In[6]:=6

✖
https://wolfram.com/xid/0cy30vl31cqoj6wtui498pe-uw904
Out[6]=6
