The correct option is D f(x)=1, If x is irrational
Case:1
When n→∞ and x is rational i.e., x=pq, where p and q are integers and q≠0, n!x=n!×pq is integer as n! has factor q when n→∞
Also, when n!x is integer,
cos(n!πx)=±1
∴limm→∞limn→∞(1+cos2m(n!πx))=1+1=2
Case:2
When n→∞ and x is irrational
cos(n!πx)∈(−1,1)
⇒cos2m(n!πx)→0 as m→∞
∴limm→∞limn→∞(1+cos2m(n!πx))=1+0=1