Synthesis of octinoxate

2-Ethylhexyl (E)-4-methoxycinnamate (octinoxate) is one of the most widely used ultraviolet-B filters in sunscreens. The conjugated system of the ring with the double bond and the ester absorbs around 310 nm.
It can be prepared in a single step by the Heck reaction of 4-bromoanisole with 2-ethylhexyl acrylate, using palladium acetate and a base. The aryl group bonds to the terminal carbon of the acrylate, and β-hydride elimination gives exclusively the E alkene.