Cory Lindh wrote:
By the way, do you happen to know why the integration errors out for certain combinations of my variables? i.e, what makes this particular calculation somewhat fragile?
I'm not sure, but there's a possibility that your penultimate condition in function p(t,tm,po) is sometimes skipped.
For example, it is skipped when tm = pmax/jmax, because, in this case, the "upper" test value is actually lower than the "lower" test value!
Alan