Friday, September 5, 2025
HomeLanguagesPython | Sympy equation() method

Python | Sympy equation() method

In Simpy, the function equation() is used to make equation of a given circle.

Syntax : equation(x='x', y='y')

Parameters:
x : str or Symbol, optional
y : str or Symbol, optional

Returns : SymPy expression

Example #1:




# import sympy, Point and Circle
from sympy import Point, Circle
  
# using Circle()
c1 = Circle(Point(0, 0), 5)
c2 = c1.equation()
  
print(c2)


Output:

x**2 + y**2 - 25

Example #2:




# import sympy, Point and Circle
from sympy import Point, Circle
  
# using Circle()
c3 = Circle(Point(1, 2), 5)
c4 = c3.equation()
  
print(c4)


Output:

(x - 1)**2 + (y - 2)**2 - 25
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32269 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6637 POSTS0 COMMENTS
Nicole Veronica
11802 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11865 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7027 POSTS0 COMMENTS
Thapelo Manthata
6704 POSTS0 COMMENTS
Umr Jansen
6721 POSTS0 COMMENTS