If you are trying the calculus method, you are trying to maximize the area under the curve. That is, torque, plotted with Rpm and vehicle speed as the two axis.
Both methods are similar in theory. Without calculus, you are breaking up the torque plot into vertical standing rectangles. This approximates the area using simple geometry. To be more precise, you could use rectangles having a smaller width, thereby getting close to the actual area. Calculus is a way to do the same thing where the width of each rectangle approaches zero.
I'd rather change gears to my own preference. Knowing your torque curve via a chassis dyno, you can pick out where peak power is and at what point it has dropped past an unacceptable level. With that knowledge in mind you should be able to figure out when to short shift or hold gears longer due to traffic, turn complexes, elevation changes. SOmetimes its better to shift a little early so that you can concentrate on a set of upcoming turns.