On Fri, May 28, 2021 at 5:38 PM Hongyi Zhao <hongyi.z...@gmail.com> wrote: > > > > On Friday, May 28, 2021 at 8:19:07 PM UTC+8 Emmanuel Charpentier wrote: >> >> This can be computed “by hand” using (one of) the textbook definition(s) : >> >> sage: var("omega, s") >> (omega, s) >> sage: integrate(sin(x^2)*e^(-I*s*x), x, -oo, oo) >> 1/2*sqrt(2)*sqrt(pi)*cos(1/4*s^2) - 1/2*sqrt(2)*sqrt(pi)*sin(1/4*s^2) >> >> Both sympy and giac have implementations of this transform : >> >> sage: from sympy import fourier_transform, sympify >> sage: fourier_transform(*map(sympify, (sin(x^2),x, s)))._sage_() >> 1/2*sqrt(2)*sqrt(pi)*(cos(pi^2*s^2) - sin(pi^2*s^2)) >> sage: libgiac.fourier(*map(lambda u:u._giac_(), (sin(x^2), x, s))).sage() >> 1/2*sqrt(2)*sqrt(pi)*(cos(1/4*s^2) - sin(1/4*s^2)) >> >> which do not follow the same definitions… But beware : they may be more or >> less wrong : >> >> sage: integrate(sin(x)*e^(-I*s*x), x, -oo, oo).factor() >> undef # Wrong >> sage: fourier_transform(*map(sympify, (sin(x),x, s)))._sage_() >> 0 # Wrong AND misleading >> sage: libgiac.fourier(*map(lambda u:u._giac_(), (sin(x), x, s))).sage() >> I*pi*dirac_delta(s + 1) - I*pi*dirac_delta(s - 1) # Better... >> >> BTW: >> >> sage: mathematica.FourierTransform(sin(x^2), x, s).sage().factor() >> 1/2*cos(1/4*s^2) - 1/2*sin(1/4*s^2) >> sage: mathematica.FourierTransform(sin(x), x, s).sage().factor() >> -1/2*I*sqrt(2)*sqrt(pi)*(dirac_delta(s + 1) - dirac_delta(s - 1)) > > But what I got is different from yours: > > sage: sage: var("omega, s") > (omega, s) > sage: mathematica.FourierTransform(sin(x), x, s).sage().factor() > -I*(dirac_delta(s + 1) - dirac_delta(s - 1))*Sqrt(1/2*pi)
this depends of a version of Mathematica > > BTW: > > How to input the sage computation representation as the code style just like > what you've posted? > > HY > >> >> HTH, >> >> Le dimanche 23 mai 2021 à 03:22:06 UTC+2, hongy...@gmail.com a écrit : >>> >>> It seems that all the Fourier transform methods implemented in sagemath is >>> numeric, instead of symbolic/analytic. >>> >>> I want to know whether there are some symbolic/analytic Fourier transform >>> functions, just as we can do in mathematica, in sagemath? >>> >>> I want to know if there are some symbolic/analytical Fourier transform >>> functions available in sagemath, just as the ones in mathematica? >>> >>> Regards, >>> HY >>> > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/84095de0-8726-4194-a84f-f2f0c5c876c3n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAAWYfq0nzxJ5jyV8d%3DPwPHEzEE-XP7NO7PbMyK_SthcEdKNf6g%40mail.gmail.com.