| 1 | initial version |
To get a plot in your case:
g(x) = x-3
y = var('y')
eq = x == y^2 + 2*y -3
sol = solve(eq,y)
h1(x) = sol[0].rhs()
h2(x) = sol[1].rhs()
G = Graphics()
G += plot(g,-5,5, fill=g(5),fillcolor='gold')
G += plot(h1,-4,5)
G += plot(h2,-4,5,fill=h1,fillcolor='blue',fillalpha=0.2)
G.show()
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.