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 | set() method
- Python | os.dup() method
- Python | next() method
- Python | os.closerange() method
- Python | os.close() method
- Python PIL | getcolors() Method
- Python | os.fchdir() method
- Python PIL | putalpha() Method
- Python PIL | putdata() method
- Python PIL | getpalette() Method
- Python PIL | tobytes() Method
- Python | sympy.nP() method
- Python | sympy.nC() method
- Python | isinstance() 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.



