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))

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/2ae26d1a-b7b6-42a8-8ccd-8b2c4df3e291n%40googlegroups.com.

Reply via email to