The polymerization of a diamine and a dianhydride can be carried out by a two-step method in which a poly(amidocarboxylic acid) is prepared first, or directly by a one-step method. The two-step method is the most widely used procedure for polyimide synthesis. First a soluble poly(amidocarboxylic acid) (2) is prepared which is cyclized after further processing in a second step to the polyimide (3).