New in Wolfram Mathematica 7: Enhanced Fourier Analysis  previous | next 
Compare Different Series Approximations
Compare Fourier, power and factorial power series approximations to exp(-).
In[1]:=

Click for copyable input
fourier = FourierTrigSeries[Exp[-Abs[t]] , t, 2];

power = Normal@Series[Exp[-Abs[t]] , {t, 1, 3}, Assumptions -> t > 0];

fpower = InterpolatingPolynomial[

   Table[{u, Exp[-Abs[u]]}, {u, -\[Pi], \[Pi], 2 \[Pi]/7}], t];
In[2]:=

Click for copyable input
GraphicsGrid[

 Partition[

  Table[Plot[{Exp[-Abs[t]], Last[f]}, {t, -\[Pi], \[Pi]}, 

    PlotRange -> {All, {0, 1.2}}, 

    Filling -> {1 -> {{2}, {Yellow, Green}}}, 

    Ticks -> {{-\[Pi], 0, \[Pi]}, {0, 1}}, 

    PlotLabel -> 

     First[f]], {f, {{Exp[-Abs[t]], Exp[-Abs[t]]}, {"Fourier Series", 

      fourier}, {"Power Series", power}, {"Factorial Power Series", 

      fpower}}}], 2]]
Out[2]=