E. Allgower and &. K. Georg, Introduction to numerical continuation methods, Classics in Applied Mathematics, Soc. for Industrial and Applied Math, vol.45, p.388, 2003.
DOI : 10.1137/1.9780898719154

F. J. Bonnans, P. Martinon, and &. V. Grélard, Bocop -A collection of examples, INRIA, p.8053, 2012.
URL : https://hal.archives-ouvertes.fr/hal-00726992

B. Bonnard, J. Caillau, and &. E. Trélat, Second order optimality conditions in the smooth case and applications in optimal control, ESAIM: Control, Optimisation and Calculus of Variations, vol.6, issue.2, pp.207-236, 2007.
DOI : 10.1051/cocv:2001115

URL : https://hal.archives-ouvertes.fr/hal-00086380

B. Bonnard and &. M. Chyba, Singular trajectories and their role in control theory, Mathematics & Applications, vol.40, p.357, 2003.
DOI : 10.1007/978-1-4471-5102-9_49-1

B. Bonnard, M. Chyba, A. Jacquemard, and &. J. Marriott, Algebraic geometric classification of the singular flow in the contrast imaging problem in nuclear magnetic resonance. Mathematical Control and Related Fields-AIMS, Special issue in the honor of Bernard Bonnard, Part II, vol.3, issue.4, pp.397-432, 2013.
URL : https://hal.archives-ouvertes.fr/hal-00939495

B. Bonnard, M. Chyba, and &. J. Marriott, Singular Trajectories and the Contrast Imaging Problem in Nuclear Magnetic Resonance, SIAM Journal on Control and Optimization, vol.51, issue.2, pp.1325-1349, 2013.
DOI : 10.1137/110833427

URL : https://hal.archives-ouvertes.fr/hal-00939496

B. Bonnard, M. Claeys, O. Cots, and &. P. Martinon, Geometric and Numerical Methods in the Contrast Imaging Problem in Nuclear Magnetic Resonance, Acta Applicandae Mathematicae, vol.106, issue.1, pp.5-45, 2014.
DOI : 10.1007/s10107-004-0559-y

URL : https://hal.archives-ouvertes.fr/hal-00867753

B. Bonnard and &. O. Cots, GEOMETRIC NUMERICAL METHODS AND RESULTS IN THE CONTRAST IMAGING PROBLEM IN NUCLEAR MAGNETIC RESONANCE, Mathematical Models and Methods in Applied Sciences, vol.299, issue.01, pp.187-212, 2012.
DOI : 10.1137/0311048

B. Bonnard, O. Cots, J. Faugère, A. Jacquemard, J. Rouot et al., Safey El Din & T. Verron, Algebraic-geometric techniques for the feedback classification and robustness of the optimal control of a pair of Bloch equations with application to Magnetic Resonance Imaging, p.1556806, 2017.

B. Bonnard, O. Cots, S. Glaser, M. Lapert, D. Sugny et al., Geometric Optimal Control of the Contrast Imaging Problem in Nuclear Magnetic Resonance, IEEE Transactions on Automatic Control, vol.57, issue.8, pp.1957-1969, 2012.
DOI : 10.1109/TAC.2012.2195859

URL : https://hal.archives-ouvertes.fr/hal-00750032

B. Bonnard and &. I. Kupka, Théorie des singularités de l'application entrée/sortie et optimalité des trajectoiressingulì eres dans leprobì eme du temps minimal, Forum Math, vol.5, issue.2, pp.111-159, 1993.

U. Boscain and &. B. Piccoli, Optimal Syntheses for Control Systems on 2-D Manifolds, p.43, 2004.

R. Bulirsch and J. Stoer, Introduction to numerical analysis, of Texts in Applied Mathematics, p.744, 1993.

J. Caillau, O. Cots, and &. J. Gergaud, Differential continuation for regular optimal control problems, Optimization Methods and Software, pp.177-196, 2011.
DOI : 10.1080/10556788.2011.593625

M. Claeys, J. Daafouz, and D. Henrion, Modal occupation measures and LMI relaxations for nonlinear switched systems control, Automatica, vol.64, pp.64-143, 2016.
DOI : 10.1016/j.automatica.2015.11.003

URL : https://hal.archives-ouvertes.fr/hal-00980355

S. Conolly, D. Nishimura, and &. A. Macovski, Optimal Control Solutions to the Magnetic Resonance Selective Excitation Problem, IEEE Transactions on Medical Imaging, vol.5, issue.2, pp.106-115, 1986.
DOI : 10.1109/TMI.1986.4307754

M. Gerdts, Optimal Control of ODEs and DAEs, 2011.
DOI : 10.1515/9783110249996

URL : https://hal.archives-ouvertes.fr/hal-00724908

D. Henrion, J. B. Lasserre, and &. J. Löfberg, GloptiPoly 3: Moments, Optimization and Semidefinite Programming, Optim. Methods and Software, pp.24-28, 2009.
DOI : 10.1080/10556780802699201

URL : http://arxiv.org/pdf/0709.2559

A. J. Krener, The High Order Maximal Principle and Its Application to Singular Extremals, SIAM Journal on Control and Optimization, vol.15, issue.2, pp.256-293, 1977.
DOI : 10.1137/0315019

I. Kupka, Geometric theory of extremals in optimal control problems. I. The fold and Maxwell case, Trans. Amer. Math. Soc, vol.299, issue.1, pp.225-243, 1987.

M. Lapert, Y. Zhang, M. Braun, S. J. Glaser, and &. D. Sugny, Particles, Physical Review Letters, vol.104, issue.8, p.83001, 2010.
DOI : 10.1016/S0009-9260(98)80096-2

URL : https://hal.archives-ouvertes.fr/hal-00508340

M. Lapert, Y. Zhang, M. A. Janich, S. J. Glaser, and D. Sugny, Exploring the Physical Limits of Saturation Contrast in Magnetic Resonance Imaging, Scientific Reports, vol.3, issue.1, p.589, 2012.
DOI : 10.1002/mrm.1910030217

URL : https://hal.archives-ouvertes.fr/hal-00750055

J. Lasserre, Moments, Positive Polynomials and Their Applications, 2009.
DOI : 10.1142/p665

J. Lasserre, D. Henrion, C. Prieur, and E. Trélat, Nonlinear Optimal Control via Occupation Measures and LMI-Relaxations, SIAM Journal on Control and Optimization, vol.47, issue.4, pp.1643-1666, 2008.
DOI : 10.1137/070685051

URL : https://hal.archives-ouvertes.fr/hal-00136032

M. H. Levitt, Spin dynamics: Basics of Nuclear Magnetic Resonance, 2008.

L. Markus and N. J. , VIII. Quadratic Differential Equations and Non-Associative Algebras, pp.185-213, 1960.
DOI : 10.1515/9781400882649-009

H. Maurer, Numerical solution of singular control problems using multiple shooting techniques, Journal of Optimization Theory and Applications, vol.8, issue.2, pp.235-257, 1976.
DOI : 10.1007/BF00935706

A. Mosek, The mosek optimization toolbox for matlab manual, Version 7.1 Revision, p.28, 2015.

L. S. Pontryagin, V. G. Boltyanski?-i, R. V. Gamkrelidze, and &. E. Mishchenko, The Mathematical Theory of Optimal Processes, Translated from the Russian by, 1962.

M. Putinar, Positive polynomials on compact semi-algebraic sets, Indiana Univ, Math. J, vol.42, issue.3, pp.969-984, 1993.
DOI : 10.1016/s0764-4442(99)80251-1

H. Schättler, The Local Structure of Time-Optimal Trajectories in Dimension Three under Generic Conditions, SIAM Journal on Control and Optimization, vol.26, issue.4, pp.899-918, 1988.
DOI : 10.1137/0326050

H. J. Sussmannbielefeld and /. Rome, Time-optimal control in the plane, in Feedback control of linear and nonlinear systems, Lecture Notes in Control and Inform. Sci, vol.39, pp.244-260, 1981.

H. J. Sussmann, Regular Synthesis for Time-Optimal Control of Single-Input Real Analytic Systems in the Plane, SIAM Journal on Control and Optimization, vol.25, issue.5, pp.1145-1162, 1987.
DOI : 10.1137/0325062

E. Van-reeth, H. Ratiney, M. Tesch, D. Grenier, O. Beuf et al., Optimal control design of preparation pulses for contrast optimization in MRI, Journal of Magnetic Resonance, vol.279, pp.279-318, 2017.
DOI : 10.1016/j.jmr.2017.04.012

URL : https://hal.archives-ouvertes.fr/hal-01520515

T. Univ and I. Cnrs, 2 rue Camichel, 31071 Toulouse, France E-mail address: olivier.cots@irit.fr EPF: ´ Ecole d'Ingénieur-e-s, 2 Rue F Sastre, 10430Rosì eres-prés-Troyes, France E-mail address: jeremy.rouot@epf.fr Institute for Algebra