Fourier series expansion error?

26 views
Skip to first unread message

Anton Makarov

unread,
Dec 14, 2022, 1:15:24 PM12/14/22
to sympy
Hi, I'm trying to find fourier series decomposition of 1/x function on [-3; 3] interval. IMHO, such a decomposition doesn't exist, because the a0 и an doesn't exist (corresponding integrals doesn't converge). But sympy function fourier_series, returns the answer (omitting the a0, an coefficients and only taking into account the bn coefficients). Is there an error in fourier_series function?
fourier_series(1/x,(x,-3,3)) = (2/3)*sin(pi*x/3)*Si(pi)+(2/3)*sin(2*pi*x/3)*Si(2*pi)+(2/3)*sin(pi*x)*Si(3*pi)+...

emanuel.c...@gmail.com

unread,
Dec 17, 2022, 9:33:33 AM12/17/22
to sympy

Let’s dissecate this :

>>> from sympy import symbols, fourier_series
>>> t=symbols("t", real=True)
>>> T=symbols("T", positive=True)
>>> foo=fourier_series(1/t, (t, -T/2, T/2)) ; foo
FourierSeries(1/t, (t, -T/2, T/2), (0, SeqFormula(0, (_k, 1, oo)), SeqFormula(4*sin(2*_n*pi*t/T)*Si(_n*pi)/T, (_n, 1, oo))))

The constant term tof this series is taken to be 0. The even terms are all 0. The coefficient of the nth odd term is Si(n*pi). These coefficients do not converge to 0 :

>>> k=symbols("k", integer=True)
>>> limit(Si(k*pi), k, oo)
pi/2

therefore their sum does not necessarily converge.

Therefore, the expressions returned by fourier_transform are analitically correct, but their existence do not imply their convergence.

In other word, fourier series return the elements allowing computation of the Fourier series of the function if such a series exist, but do not assess its existence.

HTH,

Антон Макаров

unread,
Dec 17, 2022, 9:36:31 AM12/17/22
to sympy
I understand, thank you for suck a deep explanation…



Отправлено из мобильной Почты Mail.ru


суббота, 17 декабря 2022 г., 17:33 +0300 от emanuel.c...@gmail.com <emanuel.c...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/70d57a91-f018-4592-b5be-229288fbb629n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages