The physical understanding of the response of slender elastic bodies restrained inside constraints under various loading and boundary conditions is of a great importance in engineering and medical applications. The research work presented in this thesis is especially concerned with the buckling response of an elastic rod (the elastica) subjected to unilateral constraints under axial compression. It seeks to address two main issues: (i) the conditions that lead to the onset of instability, and (ii) the factors that define the bifurcation diagram. Two distinct classes of problems are analyzed; (i) the classical buckling problem of a constant length elastica and (ii) the insertion buckling problem of a variable length elastica. Their main difference is the generation of a configurational force at the insertion point of the sliding sleeve in the insertion problem, which is not present in the classical problem. The thesis describes two distinct methodologies that can solve these constrained buckling problems; (1) a geometry-based method, and (2) an optimal control method. The geometry-based method is used to analyze the post-buckling response of a weightless planar elastica subjected to unilateral constraints. The method rests on assuming a deformed shape of the elastica and on uniquely segmenting the elastica consistent with a single canonical segment (clamped-pinned). An asymptotic solution of the canonical problem is then derived and the complete solution of the constrained elastica is constructed by assembling the solution for each segment. Nevertheless, the application of the optimal control method is more generic. It can be used to solve any constrained buckling problem under general boundary and loading conditions. Based on Hamiltonian mechanics, the optimality conditions, which constitute the Pontryagin’s minimum principle, involve the minimization of the Hamiltonian with respect to the control variables, the canonical equations and the transversality conditions. The main advantage of the optimal control method is the assumption of strong rather than weak variation of the involved variables, which leads to the additional Weierstrass necessary condition (“optimal” equilibrium state). Based on it, several factors such as the effect of the self-weight of the elastica and the clearance of the walls are investigated.