This paper extends the pure theory of patents to make it consistent with the empirical evidence on R&D which shows both variable returns to scale and a variable elasticity of cost reduction with respect to R&D (output elasticity). Using a generalized invention possibility function, the authors show that for a given social rate of discount, a socially optimal patent depends only on output elasticity and demand elasticity. The authors also show that an optimal patent can exist for increasing returns as well as for constant and decreasing returns to R&D. In general, the constant elasticity assumption overestimates the optimal life of a patent.