Skip to main content
deleted 2 characters in body
Source Link
RunnyKine
  • 33.5k
  • 3
  • 112
  • 178

Bug introduced in 7.0.1 or earlier and persisting through 11.0.1


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

Bug introduced in 7.0.1 or earlier and persisting through 11.0.1


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

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.

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

Modified bug header
Source Link
bbgodfrey
  • 63.2k
  • 18
  • 96
  • 170

Bug introduced in 97.0.1 or earlier and persisting through 11.0.1


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

Bug introduced in 9.0 or earlier and persisting through 11.0


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

Bug introduced in 7.0.1 or earlier and persisting through 11.0.1


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

added 76 characters in body; edited tags
Source Link
Szabolcs
  • 239.2k
  • 32
  • 654
  • 1.3k

Bug introduced in 9.0 or earlier and persisting through 11.0


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

Bug introduced in 9.0 or earlier and persisting through 11.0


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

f[t_]:=1/(1+25.0*(t-0.3)^2);
Plot[f[t],{t,-1,1}]

enter image description here

Below FourierSeries retruns the wrong series.

WrongSeries[t_]=Chop@Expand@ExpToTrig@FourierSeries[
f[t],t,4,FourierParameters->{1,\[Pi]}];
Plot[WrongSeries[t],{t,-1,1},
PlotLabel->Style["The Wrong Truncated Fourier Series",14,Bold]]

enter image description here

Does Version 11 also have this problem?

-----EDIT-----

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

RightSeries[t_]=Expand[(
FourierCosSeries[f[t]+f[-t],t,4,FourierParameters->{1,\[Pi]}]+
FourierSinSeries[f[t]-f[-t],t,7,FourierParameters->{1,\[Pi]}])/2
];
Plot[{f[t],RightSeries[t]},{t,-1,1},
PlotLegends->{"g[t]","Truncated Fourier Series"}]

enter image description here

Tweeted twitter.com/StackMma/status/840888770400522241
I provided a workaround.
Source Link
Ted Ersek
  • 7.2k
  • 21
  • 42
Loading
Source Link
Ted Ersek
  • 7.2k
  • 21
  • 42
Loading