Question: Issue with singularity in summand of a Fourier series

For educational purposes, I was experimenting with the Fourier series expansion of periodic functions. Following the definition for 2pi-periodic functions on Wikipedia, given by

 

 

and

 

 

I have entered these functions more or less unchanged into Maple.

Now, I expect to have f(x) = g(x). Of course I have not given Maple much help in evaluating those expressions. Maple seems to give a wrong answer here! Am I doing something wrong? If yes, isn't this behaviour dangerously misleading? If not, is it a Maple bug? This issue might be related to this question, which seems to offer a workaround but I still am unable to figure out what is wrong.

maple-singularity-in.mw The full source documenting this issue (MW)

maple-singularity-in.pdf  The full source documenting this issue (PDF)

Please Wait...