# $f(x)= \begin{cases} -1+\sin(k_1\pi x) & x\;\text{is rational} \\ 1+\cos(k_2 \pi x) & x\;\text{is irrational} \end{cases}$

$$f(x)= \begin{cases} -1+\sin(k_1\pi x) & x\;\text{is rational} \\ 1+\cos(k_2 \pi x) & x\;\text{is irrational} \end{cases}$$

If $$f(x)$$ is periodic function, then

(A) Either $$k_1, k_2\in\text{rational} \;\text{or}\;k_1, k_2\in\text{irrational}$$

(B) $$k_1, k_2\in\text{rational only}$$

(C) $$k_1, k_2\in\text{irrational only}$$

(D) $$k_1, k_2\in\text{irrational such that }\dfrac{k_1}{k_2}\; \text{rational}$$

My Approach:

Case $$(1)$$: Assuming Period $$T_1$$ to be rational

Let $$x$$ is rational

Then $$f(x)=f\left(x+T_1\right)\implies -1+\sin(k_1\pi x)=-1+\sin\left(k_1 \pi(x+T_1)\right)$$

$$\implies \sin(k_1\pi x)=\sin\left(k_1 \pi(x+T_1)\right)$$

$$\implies k_1\pi (x+T_1)=n\pi+k_1\pi x\implies k_1(x+T_1)=n+k_1x\implies k_1=\dfrac{n}{T_1}$$

Hence $$k_1$$ should be rational.

Case$$(2)$$:

Assuming Period $$T_1$$ to be irrational.

Let $$x$$ is rational and using the same steps as Case$$(1)$$ I got $$k_1=\dfrac{n}{T_1}$$

Hence $$k_1$$ should be irrational.

I am not getting any option and correct answer given is option (B)

Also, Did I make any error in Case $$(2)$$?

• You have given Multiple Choices , I assume it is some test where quick thinking can save time. Intuitively : We can easily get the Correct Answer (B) : All other Choices allow irrational numbers. Intuitively , we can see that $k_1 \in \{ e^e , \sqrt{2} , \log(2) \}$ & $k_2 \in \{ e^\pi , \sqrt{3} , \pi^{\pi} \}$ will give some weird function which can not have a period !!
– Prem
Commented May 1, 2023 at 10:49

• If $$T_1$$ is rational, then $$k_1$$ is rational.
• If $$T_1$$ is irrational, then $$k_1$$ is irrational.
You do not know if $$T_1$$ can be either rational or irrational.
In fact, you can show that $$T_1$$ cannot be irrational. Indeed, if $$T_1$$ is the period of $$f$$, then we have $$f(0) = f(T_1)$$. However, if $$T_1$$ were to be irrational, then by definition of $$f$$, we would get $$f(0) = -1 + \sin(0) = -1$$ and $$f(T_1) = 1 + \cos(k_2 T_1 \pi) \in [0,2]$$. Therefore, they cannot be equal.