Artificial intelligent assistant

Limit of double variable $$\lim_{n\rightarrow \infty\\\m\rightarrow \infty}cos^2 (n!πx) ^m$$ where n belongs to natural numbers and x belongs to real numbers. I have been told to find the graph of this function with variation of x The only thing I have figured out is that the $cos^2 {x}$ has a range from [0 to 1] so the function will fluctuate between these values but I can't figure out how it will vary with x.

we have $\cos^{2m}(y)\in[0,1]$ because $2m$ is even. taking the limit we have $\cos^{2m}(y)\to0$ if $\cos(y)\
e\pm1$ and $\cos^{2m}(y)\to1$ if $\cos(y)=\pm1$.

Now, $\cos(y)=\pm1$ iff $y=N\pi,N\in\Bbb Z$ so $\lim_{m\to\infty}\cos^{2m}(y)=\begin{cases}1&y=N\pi,N\in\Bbb Z\\\0&\mbox{otherwise}\end{cases}$.

Now $y=n!\pi x$, so we need $n!x$ to be an integer, $n!x\in\Bbb Z\iff x=\frac \beta{\alpha}$ where both are integers and $\alpha$ divides $n!$(and, ofc, $\alpha\
e0)$, we can notice that if $|\alpha|\le n$ it divides $n!$, taking the limit we have that for every integer $\alpha$.

Thus we left with $$f(x)=\begin{cases}1&x=\frac{\beta}{\alpha},\beta,\alpha_{\
e0}\in\Bbb Z\\\0&\mbox{otherwise}\end{cases}$$

In other words

$$f(x)=\begin{cases}1&x\in\Bbb Q\\\0&\mbox{otherwise}\end{cases}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a753cd778d68135683cd9b29861c3bd6