I have a function g(x) equal to x^2 if x >= 5, and equal to 2*x if x < 5. I constructed the piecewise function as follows:
g1(x) = x**2 g2(x) = 2*x g = Piecewise([[(-Infinity,5),g2],[(5,Infinity),g1]]) When I evaluate f(5), it returns 35/2 because it evaluates g1(5), g2(5) and returns the average of the two values, as I'm not indicating that at x=5, g1(x) should be used to evaluate the piecewise function. Questions: 1) Isn't there a way to pass to the Piecewise function if the intervals are open or closed at its borders, so as, in the example above, g(x) could be evaluated to 25 instead of 35/2? 2) Cant't I plot a Piecewise function with intervals extending to infinity, as the example above, by just indicating (maybe in the plot method) the definite interval that I wish to be used to evaluate and plot the function? For the graph of a Piecewise function, I would expect something like the examples in http://www.sagemath.org/calctut/continuity.html, with the hollow and filled circles indicating if the intervals are open or closed at its borders. I hope I was clear enough. But, as english is not my mother tongue and neither I am a mathematician, maybe something is confusing. So, fell free to ask for clarifications. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.