Alkylation is a common reaction of enolates and provides a good insight into the factors affecting the selectivity. If methyl iodide is used as the alkylating agent in a polar aprotic solvent then the reaction produces mostly the carbon alkylated product. Switching to methyl bromide or methyl chloride increases the amount of oxygen alkylated product and if methyl tosylate is used then the reaction produces mainly the oxygen alkylated product. This is because the increasing electronegativity of the substituent increases the positive charge on the methyl carbon, meaning that electrostatic interactions are more important. Additionally, the $\ce{C-X}~\sigma^*$ orbital (the LUMO of the electrophile) will be lower in energy in methyl iodide than in methyl tosylate due to the poorer energy match between the $\ce{C}$ and $\ce{I}$ atomic orbitals compared to $\ce{C}$ and $\ce{O}$. This brings the electrophile LUMO closer in orbital to the enolate HOMO, making the orbital interactions more important.
TheTraditionally, the ratio of carbon- to oxygen substituted-substituted products is explained through "hard–soft acid–base (HSAB) theory". Using this model, the outcome depends on the balance of orbital interactionstwo factors, namely the orbital interactions and electrostatic interactionselectrostatic interactions between the reactants.
As you can seebe seen from the diagram above, the HOMO of the enolate has the greatest contribution from the $\alpha$-carbon and so reactions which are controlled by orbital energy factors take place through there. Conversely, the greatest negative charge is on the oxygen due to its greater electronegativity and so if the reaction is controlled by electrostatic factors then it will take place at the oxygen.
TraditionallyThis allows us to explain the effect of changing the electrophile from $\ce{CH3I}$ (mainly C-substituted product) to $\ce{CH3OTs}$ (mainly O-substituted product). The increasing electronegativity of the substituent increases the positive charge on the methyl carbon, this is explained bymeaning that electrostatic interactions become more important in the central atomscase of $\ce{CH3OTs}$. Conversely, the $\ce{C-X}~\sigma^*$ orbital (B or Sithe LUMO of the electrophile) beingwill be lower in energy in methyl iodide than in methyl tosylate due to the poorer energy match between the $\ce{C}$ and $\ce{I}$ atomic orbitals compared to $\ce{C}$ and $\ce{O}$. This brings the LUMO of $\ce{CH3I}$ closer in orbital to the enolate HOMO, making the orbital interactions more important in that case.
Likewise, boron or silicon central atoms are small and are highly charged, and so have strong electrostatic interactions with the oxygen end of the enolate. This canThese would be viewed as an application of 'hard–soft acid–base (HSAB) theory', where the silicon- and boron-based electrophiles are considered "hard acids", and the carbonyl oxygen is a "hard base". By comparison, neutral carbon electrophiles are "soft acids" and so exhibit less affinity for the oxygen.
This explanation might suffice forat an introductory chemistrylevel. However, in truth, the concept of HSAB theory doesn't hold up when generalised; it also ignores fundamental concepts such as whether the reaction is thermodynamically or kinetically controlled (which generally affect the reaction outcome). The issue of ambident reactivityHSAB theory is therefore not actually the correct way to treat this issue of ambident reactivity (i.e., a species reacting at two or more different parts) is better explained using.
The failings of HSAB theory, as well as a more sophisticated and correct model based on Marcus theory. This is, are described in detail by Mayr et al. in a review (Angew. Chem., Int. Ed. 2011, 50 (29), 6470–6505).