Open In App

Python | sympy.atan() method

Improve
Improve
Like Article
Like
Save
Share
Report

In sympy, atan() method is an inverse tangent function. Using the atan(x) method in the sympy module, we can compute the inverse tangent or arctangent of x.

Syntax : sympy.atan(x)

Return : Returns the arc tangent of x 

Code #1: Below is the example using atan() method to find the inverse tangent function. 

Python3




# importing sympy library
from sympy import *
 
# calling atan() method on expression
geek1 = atan(-1)
geek2 = atan(1)
geek2 = atan(zoo) # zoo = infinity
 
print(geek1)
print(geek2)
print(geek3)


Output: 

-pi/4
pi/4
AccumBounds(-pi/2, pi/2)

  Code #2: 

Python3




# importing sympy library
from sympy import atan
 
 
# calling atan() method on expression
geek = atan(1)
print(geek)


Output: 

pi/4

Last Updated : 30 Jan, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads