Pl2 optimization

Optimizing the PL2 weighting scheme.
I think I follow roughly what you're trying to do here, but why do you only differentiate the numerator?  I don't think that's necessarily going to give you a result with the same sign as the actual second derivative has.