The reaction of 4-nitrophenylacetic acid (I) with formaldehyde and dimethylamine in water gives 2-(4-nitrophenyl)-3-(dimethylamino)propionic acid (II), which by treatment with refluxing concentrated HCl is converted into 2-(4-nitrophenyl)acrylic acid (III). The esterification of (III) with methanol and p-toluenesulfonic acid yields the corresponding methyl ester (IV), which is reduced with H2 over Pd/C in ethanol to afford methyl 2-(4-aminophenyl)propionate (V). The alkylation of (V) with 2-methylallyl chloride (VI) by means of pyridine in refluxing ethanol gives methyl 2-[4-(2-methylallylamino)phenyl]propionate (VII), which is finally hydrolyzed with NaOH in refluxing methanol.
The malonic synthesis of 4-nitrochlorobenzene (VIII) with sodium diethyl methylmalonate (IX) (prepared with the corresponding malonic ester and NaH) in hot DMF gives diethyl (4-nitrophenyl)methylmalonate (X), which is reduced with H2 over Pd/C as before yielding diethyl (4-aminophenyl)methylmalonate (XI). The alkylation of (XI) with (VI) by means of NaHCO3 in refluxing ethanol affords diethyl [4-(2-methylallyl)aminophenyl]methylmalonate (XII), which is treated with sodium ethoxide in refluxing ethanol to yield ethyl 2-(4-[2-methylallylamino)phenyl]propionate (XIV). Finally, this compound is hydrolyzed with NaOH in refluxing ethanol. Partial hydrolysis of (XII) with NaOH in refluxing ethanol gives 2-[4-(2-methylallylamino)phenyl]methylmalonic acid (XIII), which is finally decarboxylated by treatment with refluxing aqueous HCl. The simultaneous hydrolysis and decarboxylation of (XII) with NaOH in refluxing ethanol also gives the title product.