To a magnetically stirred 0.1M solution of piperidine in anhydrous acetonitrile add slowly 1.1 equivalents of an alkyl bromide or iodide over several hours at room temperature under a dry nitrogen atmosphere. I recommend using a syringe pump to add the alkyl halide at a slow rate. I did this with MeI, EtBr, iPrBr, nPrI and a few others. For isolation rotary evaporate off the acetonitrile and any remaining piperidine and/or alkyl halide to give the ammonium salt.
Try K2CO3/ alkylating agent/ dry DMF by stirring them together with piperidine at room temp. then optimize conditions if successful or NaH/ alkylating agent/ dry DMF, by adding NaH portionwise to a solution of piperidine in DMF at 0° C and allowing the mixture to stir for 30 min. then add the alkylating agent and monitor the progress of the reaction.
Bruce Levison Sir, Thanks for your kind response. But I'm looking for the N-alkylation of piperidine to get N-alkylpiperidines. I don't need a quaternary N atom (I don't want ammonium salts)
the quaternary substitution only occurs when you have excess alkyl halide. The procedure Bruce gives recommends adding the halide slowly to ensure that the piperidine is in excess.
I used the "N,N-diisopropylethylamine " procedure several times with complex amines (alkaloids). It works well, but yields were < 70%. It's a very easy to handle procedure if you haven't a syringe pump.
Without a base to remove the acid that forms, monoalkylation of the piperidine will predominate; the reaction slows as the salt accumulates. You can add base like 1.0 equivalent of KHCO3 to speed up the reaction but then dialkylation is possible.
After rotary evaporation to remove excess starting materials and the acetonitrile, convert the n-alkylpiperidinium salt to the free base by distributing the reaction product between ether and saturated aqueous sodium bicarbonate, caution CO2 is evolved. Collect the ethereal extract and evaporate down to give the free base of the n-alkylpiperidine.