Ask Your Question

Revision history [back]

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.