If cos x is irrational, find maximum positive integer n such that cos 2x, cos 3x, ... cos nx are all rational.

The multi-angle cosine functions are related by the identity cos(nx) = 2*cos(x)*cos((n-1)x) - cos((n-2)x).

Substituting n=3 and solving for cos(x) in terms of cos(2x) and cos(3x) yields cos(3x) / (2*cos(2x)-1) = cos(x).

If cos(3x) and cos(2x) are rational then this expression implies that cos(x) is also rational. But cos(x) is assumed to be irrational. So the possible n which satisfy the problem is at most 2.

The case n=2 is trivial to verify. Let x=pi/6 then cos(x)=sqrt(3)/2 is irrational and cos(2x)=1/2 is rational. Therefore the answer to the problem is **n=2**.