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()