Optimization Calculus Problems Minimizing Lengths