DFT computational methods were applied to the mechanistic study of the formation of fumarate and maleate derivatives in a solution containing alkane, TpBr3M [M=Cu, Ag; TpBr3=hydrotris(3,4,5-tribromopyrazolyl)borate] and methyl diazoacetate. These solutions are the experimentally reported conditions for carbene insertion into alkane CH bonds, a procedure that usually competes with a nondesired reaction, producing fumarate and/or maleate derivatives. Several mechanisms are analyzed. The preferred mechanism proceeds through a direct reaction between a metallocarbene complex intermediate and a diazo molecule. The computational results explain all of the available experimental evidence and provide important information on the behavior of these systems.