Python | sympy.tan() method
Last Updated :
01 Feb, 2023
In sympy, tan() method is a tangent function. Using the tan(x) method in the sympy module, we can compute the tangent or arctangent of x.
Syntax : sympy.tan(x)
Return : Returns the tangent of x
Code #1: Below is the example using tan() method to find the inverse tangent function.
Python3
from sympy import *
geek1 = tan( - 1 )
geek2 = tan(pi / 3 )
geek3 = tan(pi / 2 )
print (geek1)
print (geek2)
print (geek3)
|
Output:
-tan(1)
sqrt(3)
zoo
Code #2:
Python3
from sympy import tan
geek = tan( 2 + 5j )
print (geek)
|
Output:
-6.87216388011928e-5 + 1.000059350149*I
Share your thoughts in the comments
Please Login to comment...