When dealing with trigonometric sums involving fractions of \(\pi\), always look for pairs of angles that add up to \(\pi\) or \(\pi/2\). This allows you to use identities like \(\cos(\pi - \theta) = -\cos(\theta)\) or \(\cos(\pi/2 - \theta) = \sin(\theta)\) to simplify the expression. Here, recognizing \(12\pi/17\) as \(\pi - 5\pi/17\) was the key to solving the problem.