With the help of fourier_transform() method, we can compute the Fourier transformation and it will return the transformed function.
Syntax : fourier_transform(f, x, k, **hints)
Return : Return the transformed function.
Example #1 :
In this example we can see that by using fourier_transform() method, we are able to compute the Fourier transformation and return the transformed function.
Python3
# import fourier_transform from sympy import fourier_transform, exp from sympy.abc import x, k # Using fourier_transform() method gfg = fourier_transform(exp( - x * * 2 ), x, k) print (gfg) |
Output :
sqrt(pi)*exp(-pi**2*k**2)
Example #2 :
Python3
# import fourier_transform from sympy import fourier_transform, exp from sympy.abc import x, k # Using fourier_transform() method gfg = fourier_transform(exp( - x * * 2 ), x, 4 ) print (gfg) |
Output :
sqrt(pi)*exp(-16*pi**2)