Analysis of the Minimal Residual Method Applied to Ill-Posed Optimality Systems