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, Le mercredi 14 décembre 2022 à 19:15:24 UTC+1, antonv...@gmail.com a écrit : > 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)+... > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/70d57a91-f018-4592-b5be-229288fbb629n%40googlegroups.com.