Abstract. Let T be the angle-doubling map on the circle T, and consider the 1-parameter family of piecewise-linear cosine functions f θ : T → R, defined by f θ (x) = 1 − 4d T (x, θ). We identify the maximizing T -invariant measures for this family: for each θ the f θ -maximizing measure is unique and Sturmian (i.e. with support contained in some closed semi-circle). For rational p/q, we give an explicit formula for the set of functions in the family whose maximizing measure is the Sturmian measure of rotation number p/q. This allows us to analyse the variation with θ of the maximum ergodic average for f θ .