Variational analysis of inextensible elastic curves