 So today we'll be talking about these interesting mechanisms of forming an acid amide from a carboxylic acid and its derivatives. We'll also talk about the various whys and hows of what's happening and what's not happening. We'll take up a carboxylic acid RCOOH, we have taken a general formula and its various derivatives acid chloride, ester and anhydride respectively. We'll be treating them with a given reagent and we'll be seeing how they form acid amide. Also we've already studied in the previous videos how NH2- can easily replace the leaving groups OH-Cl-OR- and OCOR from the substrate to give amide. And if we are working in a lab there is a possibility that we'd get NaNH2 or KNH2 to react with the given substrate but are we sure that we'll get that? Usually what happens is when we do organic reactions, they give us organic reagents. If they are giving us a carboxylic acid they might just give us ammonia for it and they tell us that ok now go and make an amide out of it. How do we do that? Let's talk about that. So we have a test tube and we put carboxylic acid RCOOH and ammonia to it. What can happen? Pause the video and think. You might be thinking why should I pause the video? This is what you are studying right? It should form an amide. It doesn't. What really happens is we have an acid and we have a base. There's an acid base neutralization reaction that's going to happen and we'll get a salt. Whoops! That's not what we expected. How do I get an amide out of it? To get an amide I have to have to remove H2O so that I get RCONH2 right? This has to go. So it has to dehydrate. It has to remove a water molecule to give me my required amide. And that can happen when we heat this test tube. Once we heat this test tube, we get the required amide and the water goes out. So if I want to get an amide out of a carboxylic acid and ammonia mixture, I have to heat it. If I don't heat it, the reaction will stop at the formation of salt. Let's just try for acid chloride and see what happens. There's no acid base reaction happening here. So why don't you pause the video and try the mechanism yourself before we do it together? Ammonia being the attacking nucleophile here attacks the carbonyl carbon. These pi electrons move to the more electronegative oxygen atom and we get something like this. Nitrogen was neutral but since it formed another bond, we get a positive charge here. What we really want is this chloride to leave. But if it does, we'll get something that looks like this. I don't think this is stable, do you? There's a positive charge on nitrogen. So what really happens is while leaving, this chloride ion tends to take a proton from this nitrogen so that we eventually get the required amide and it's here. Hey, it's time to look carefully at the side product. It's an acid. Whatever we took initially is a base as well. So if I take 10 molecules of RCOCl and 10 molecules of ammonia, one molecule of RCOCl will react with one molecule of ammonia to give one molecule of amide and one molecule of HCl. As soon as HCl is formed, it will go out looking for the second molecule of ammonia and that's gone for us. That ammonia molecule will react with HCl to give NH4Cl. That's a salt. It cannot act as a nucleophile anymore and that ammonia molecule is gone. I took 10 of each. Oh God, now I'm just left with 8. What do I do? And if I react the other one, it will form HCl again and that HCl will go for ammonia again. So my ammonia will get exhausted faster. So what do I do? I'll have to take excess of ammonia and why do I need to take it? Because the side product is forcing me to. The side product tells me if you don't take excess of ammonia, your reaction is not going to be completed well. Exactly, that's why. So RCOCl reacts with excess of ammonia to give RCONH2 plus HCl. Now that I have it in excess, let's say in the ratio 1 is to 2, I'm very safe that okay, I've taken twice the amount of ammonia, HCl go and react. And if somebody tells me that no, no, don't waste chemicals, no, don't take too much of ammonia. How do you know you have taken twice what if there's an excess of ammonia that's left unreacted? Don't do this. Find another way. Do we or do we not have another way? Hold that thought, keep it written somewhere and we will come back to it. But before that, let's just talk about how an acid chloride would respond to the various amines instead of ammonia. This is what we already know. This gives RCONH2 and HCl. Look carefully what has happened, what has left the Cl and 1H. So if any amine has this 1H to give to the chloride ion, the reaction can take place normally and that's exactly what happens. I'll take a 1 degree amine and I can see okay, it also has an H. So the reaction can take place. Please pause the video and try and write the products yourself. So the products look something like this. What about a 2 degree amine? Oh it also has an H. Try yourself for the 3 degree amine and then we'll do it together. I can see there's no H. So if it attacks also, I'll get this intermediate. But the Cl- will not leave because it cannot take an H plus and the product will have a positive charge on the nitrogen atom and that's not what we need. So this reaction typically goes backwards. Which tells me that okay, 3 degree amines do not form an amide when reacted with an acid chloride. Or we can say acid chlorides don't respond to 3 degree amines. But our 3 degree amines bases, yes they are. And if they are bases, can they help me somewhere else, yes they can. This brings me back to this one. So if I don't want to take excess of ammonia, what do I do? I take another base, another base that takes up HCl and helps me continue this reaction without wasting any. This base could be pyridine, they usually use pyridine in these organic reactions. Or it could be a 3 degree amine. Why? Because 3 degree amines do not give nucleophilic substitution reactions with acid halides. That's why. So when I treat an acid chloride with ammonia or 1 degree or 2 degree amines, I'll get the corresponding amides and HCl would be my side product. If and if I don't want to take excess of these nitrogen compounds, what do I do? I use a base which could be a pyridine or a 3 degree amine because I know they'll not hinder the reaction or they'll not cause an issue to the reaction. It's time to talk about the next derivative which is an anhydride. Please pause the video and try the mechanism yourself first. When these lone pair on the nitrogen atom attack the carbonyl carbon, these pi electrons move to the more electronegative oxygen atom. We get something that looks like this. Nitrogen has a positive charge. So if this leaving group wants to leave, it has to take H plus from nitrogen to make sure we get an amide. And one sec, what's the side product? It's an acid. It's the same story as an acid chloride. When the side product is an acid, you either have to take excess of ammonia or or we can take a base that helps us do the reaction properly. The last acid derivative. Again, please pause and try it yourself. The lone pair on the nitrogen atom attack the carbonyl carbon, the pi electron density moves to the oxygen atom and things leave. Would it leave? Yes. Would it take up the H? Yes. It's all similar for everybody. And we get an amide and an alcohol. Is alcohol in general an acid? No. So do we need excess ammonia? Not really. Do we need the base? No. Nothing special. Okay, that was a lot to take in, right? Let's just quickly revise and see what all we have learnt in this video. We took up a carboxylic acid and ammonia, ester and ammonia, an acid chloride or an anhydride with ammonia that has similar things to do. So what really happened when acid was treated with ammonia? It was an acid base reaction. And if I wanted an amide out of it, I had to heat it. Did we learn anything special in ester? Of course. We learnt how to do the mechanism, right? That was special in itself. But still we got an amide and alcohol as the side product. What about anhydride and acid? In case of an anhydride, there was a carboxylic acid as the side product. So what did we do to make sure that this didn't bother the reaction too much? We either took ammonia in excess or we added a base to it. Similarly, in order to make sure HCl didn't bother the reactants too much, we either took ammonia in excess or we added bases like pyridine or 3-degree amines.