Here $n$ is any integer. This is my attempt at solving the question:
Since $n \pi+\frac{\pi}{4}$ is irational, $f(x)=\cos(x)$. Let $h$ be a infinitesimally small positive quantity and $n=1$ $$ RHL=\lim\limits_{h\rightarrow0}f\left(\frac{\pi}{4}+h\right)$$ $$LHL=\lim\limits_{h\rightarrow0}f\left(\frac{\pi}{4}-h\right)$$
This is where my confusion begins, if we assume $h$ to be an infinitesimally small irrational number in the first case and infinitesimally small rational number in the second case then the function will be discontinuous.
If we assume $h$ to be an infinitesimally small rational number in the first case and infinitesimally small rational number in the second case then the function will be continuous.
However If we assume $h$ to be an infinitesimally small irrational number in the first case and infinitesimally small irrational number in the second case then the function will be discontinuous. So how can a function like this exist, and where am I going wrong?