Saturday, December 28, 2024
Google search engine
HomeLanguagessympy.integrals.transforms.fourier_transform() in python

sympy.integrals.transforms.fourier_transform() in python

With the help of fourier_transform() method, we can compute the Fourier transformation and it will return the transformed function.

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

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments