| 1 | initial version |
This is an answer to the second part of the question only: you should use
plot(lambda x: f(I[0],I[1],x), (x,0,1))
Otherwise f(I[0],I[1],x) gets first evaluated with the symbolic variable x and returns the value zero (because the test x>=a and x<=b in f always fails with the symbolic x); this zero value is then passed to plot.
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.