Python | sympy.cos() method
In simpy, cos() method is cosine function. Using the cos(x) method in simpy module, we can compute the cosine of x.
Syntax : sympy.cos(x) Return : Returns the cosine of x
Code #1:
Below is the example using cos() method to find cosine function.
# importing sympy library from sympy import * # calling cos() method on expression geek1 = cos(-1) geek2 = cos(pi / 3) print(geek1) print(geek2) |
chevron_right
filter_none
Output:
cos(1) 1/2
Code #2:
# importing sympy library from sympy import * # calling cos() method on expression geek = cos(2 + 5j) print(geek) |
chevron_right
filter_none
Output:
-30.8822353189167 - 67.4727884405875*I
Recommended Posts:
- class method vs static method in Python
- Python | os.dup() method
- Python | set() method
- Python | next() method
- Python | sympy.gcd() method
- Python PIL | BoxBlur() method
- Python | sympy.eye() method
- Python | os.readv() method
- Python | sympy.sin() method
- Python | sympy.ones() method
- Python | os.waitid() method
- Python | os.WIFEXITED() method
- Python | os.readlink() method
- Python | os.writev() method
- Python | Tensorflow sin() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

