Dual formulations for error estimation in non-uniform transmission lines