TrigFactor[Cos[x]+Cos[y]]