HomeLanguagessympy.integrals.transforms.cosine_transform() in python

sympy.integrals.transforms.cosine_transform() in python

With the help of cosine_transform() method, we can compute the cosine transformation and return the transformed function by using this method.

cosine transformation

Syntax : cosine_transform(f, x, k, **hints)

Return : Return the transformed function.

Example #1 :

In this example we can see that by using cosine_transform() method, we are able to compute the cosine transformation and return the transformed function.

Python3




# import cosine_transform
from sympy import cosine_transform, exp, sqrt, cos
from sympy.abc import x, k, a
  
# Using cosine_transform() method
gfg = cosine_transform(exp(-a * x), x, k)
  
print(gfg)


Output :

sqrt(2)*a/(sqrt(pi)*(a**2 + k**2))

Example #2 :

Python3




# import cosine_transform
from sympy import cosine_transform, exp, sqrt, cos
from sympy.abc import x, k, a
  
# Using cosine_transform() method
gfg = cosine_transform(exp(-a * x), x, 5)
  
print(gfg)


Output :

sqrt(2)*a/(sqrt(pi)*(a**2 + 25))

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

Most Popular

Dominic
32688 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
7057 POSTS0 COMMENTS
Nicole Veronica
12198 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12293 POSTS0 COMMENTS
Shaida Kate Naidoo
7182 POSTS0 COMMENTS
Ted Musemwa
7447 POSTS0 COMMENTS
Thapelo Manthata
7160 POSTS0 COMMENTS
Umr Jansen
7150 POSTS0 COMMENTS