A mathematical model for PCR (Polymerase Chain Reaction) is developed using the law of mass action and simplifying assumptions regarding the structure of the reactions. Differential equations are written from the chemical equations, preserving the detail of the complementary DNA single strand being extended one base pair at a time. The equations for the annealing stage are solved analytically. The method of multiple scales is used to approximate solutions for the extension stage, and a map is developed from the solutions to simulate PCR. The map recreates observed PCR well, and gives us the ability to optimize the PCR process. Our results suggest that dynamically optimizing the extension and annealing stages of individual samples may significantly reduce the total time for a PCR run. Moreover, we present a nearly optimal design that functions almost as well and does not depend on the specifics of a single reaction, and so would work for multi sample and multiplex applications.