Bug introduced in 7.0.1 or earlier and persisting through 11.1

I am using version 10.0 with Apple OS X. Consider the following.


enter image description here

Below FourierSeries retruns the wrong series.

PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?


I can derive the right series using a combination of FourierCosSeries and FourierSinSeries.

PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

  • $\begingroup$ Hi; I run 11.0 on linux and I get that too. $\endgroup$
    – bobbym
    Commented Mar 11, 2017 at 19:24
  • $\begingroup$ Same with 11.0 on Windows. Image $\endgroup$
    – jjc385
    Commented Mar 11, 2017 at 19:28
  • 1
    $\begingroup$ Sadly, the same bug even with version 7.0.1 on Win7x64. $\endgroup$
    – innaiz
    Commented Mar 13, 2017 at 22:08
  • $\begingroup$ I can confirm that the bug is present in MMA 11.1.0. $\endgroup$
    – user58955
    Commented Mar 23, 2017 at 17:48
  • $\begingroup$ The same issue in version 12.1 on Linux. $\endgroup$
    – user64494
    Commented May 19, 2020 at 5:19

1 Answer 1


This is a bug in FourierSeries, and appears to be caused by the default setting GenerateConditions -> False which is used while computing the underlying integrals.

A workaround for the problem is to use GenerateConditions -> True, as shown below.

f[t_] := 1/(1 + 25.0 * (t - 0.3)^2);
FSeries[t_] = Chop @ Expand @ ExpToTrig @ FourierSeries[f[t], t, 4,
    FourierParameters -> {1, Pi}, GenerateConditions -> True];


Thank your for reporting this issue, and sorry for the inconvenience.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.