A geometric application of Lagrange multipliers: extremal compatible linear connections | Synapse