Kinematic dimensional synthesis is one of the essential steps during the process of design. It is classified into three tasks: function generation, path generation, and motion generation. In this paper, a design method is presented to solve the synthesis of the slider-crank mechanism for function generation based on a closed-form solution with five design parameters. The success criterion of a method used for function generation depends on the structural error function within an operational domain of the slider-crank mechanism. The structural error reduction is related to the number of design parameters utilized in mechanism synthesis, and the effective maximum number of design parameters for the slider-crank mechanism is five. In this study, the closed-form synthesis is found using three methods: precision point method, sub-domain method, and galerkin method. The system of equations is reduced to a twelfth-degree univariate polynomial equation, and thus all the available solutions are obtained. The effectiveness of this design method is tested with some examples of commonly used test functions, namely ex, sin(x), tan(x) and ln(x), using a developed computer program. This design method gives lower structural error than traditional methods in kinematics literature.