Ask Your Question

Plot a circle, by utilizing an equation solved for x

asked 2013-08-28 17:40:07 -0500

bxdin gravatar image

The following code is an example of plotting the equation: x = y^2-3x-5y+7, i.e. an equation solved for x:

f = y^2-3*x-5*y+7
Yax = x
Xax = y
p1= implicit_plot(f, (x,-4, 4), (y,-2, 6))
p3= implicit_plot(Yax,  (x,-4, 4), (y,-2, 6),color='black')
p4= implicit_plot(Xax,  (x,-4, 4), (y,-2, 6),color='black')
p0= p1+p3+p4

According to the author, he solved the following equation in terms of x: x^2+y^2 = 25 He got the following: x = sqrt(25 - y^25) and x = -sqrt(25-y^2), i.e. ± sqrt(25 - y^25).

According to him, he plotted the 2 separate results to obtain a circle plot/graph.

How can I generate such an output on Sage 5.9?

The following was my best attempt, but I received no output for the plot of: sqrt(25-y^2):

f = sqrt(25-y^2)
Yax = x
Xax = y
p1= implicit_plot(f, (x,-50, 50), (y,-50, 50))
p3= implicit_plot(Yax,  (x,-50, 50), (y,-50, 50), color='black')
p4= implicit_plot(Xax,  (x,-50, 50), (y,-50, 50), color='black')

p0= p1+p3+p4
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-08-29 03:36:08 -0500

calc314 gravatar image

The following seems to be what you are describing.


Note that for numerical reasons, this will often not display well at $y=\pm 5$.

edit flag offensive delete link more


Awesome, thanks.

bxdin gravatar imagebxdin ( 2013-08-29 13:32:34 -0500 )edit

answered 2013-08-28 22:58:10 -0500

Luca gravatar image

I do not fully understand your question, but if it is the circle of equation $x^2 + y^2 = 25$ that you want to plot, then just replace the second line with

f = 25 - y^2 -x^2
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-08-28 17:40:07 -0500

Seen: 97 times

Last updated: Aug 29 '13