Freeform optics can be used to greatly extend the functionalities, improve performance, and reduce the volume and weight of optical systems. Today, the design of imaging systems largely relies on efficient ray tracing and optimization algorithms. Such a "step-and-repeat" approach to optical design typically requires considerable experience, intuition, and eventually "trial-and-error" guesswork. This time-consuming process applies especially to freeform optical systems. In this work, we present a deterministic direct optical design method for freeform imaging systems based on differential equations derived from Fermat’s principle and solved using power series. The method allows calculating all optical surface coefficients that ensure minimal image blurring for each individual order of aberrations. We demonstrate the systematic, deterministic, scalable, and holistic character of our method with several catoptric and catadioptric design examples.