Abstract Gear theory is re-examined and we find optimal shapes for gears. As optimality criteria, we allow: (1) minimal frictional losses (highest efficiency) assuming linear law of friction {\it or} (2) uniform maximum stress (it will wear out slowly and last the longest) assuming Hertzian contacts {\it or} (3) uniform maximal temperature, assuming we are in a high power limit in which all heat is removed by the lubricant. Some other criteria which have been used before are that (4) mis-spacing the gears still yields perfect gear action with the desired speed ratio {\it or} (5) minimal vibration in the low friction limit. Both (4) and (5) lead to ``involute gears'' which are the standard in engineering practice. Criteria 1, 2, and 3 lead to apparently new gear-tooth forms. We manage to describe these curves with ordinary differential equations (ODEs), and for each of these 3 criteria we find the ODE for both spur (cylinder) and bevel (conical) gears, i.e. a total of 6 ODEs. Keywords minimum wear, uniform stress, minimum temperature, maximal efficiency, minimal frictional loss, optimal shape, form, structure, spur gears, bevel gears.