# Period of periodic solution to forced nonlinear ODE

Suppose we have the following possibly nonlinear ODE:

$$\dot{x} = f(x) + \cos\omega t$$

Suppose that the equation has a periodic solution, i.e., $$\exists$$ T > 0 such that $$x(t) = x(t+T)$$.
Is it true that $$T = k\frac{2\pi}{\omega}$$ for some $$k \in \mathbb{Z}^+$$? If so, how would you show this?

We have the ODE \begin{aligned} \frac{dx}{dt} &= f(x) + \cos{\omega t} \\ x &= \int f(x)dt + \int \cos{\omega t}\ dt \\ x(t) &= \int f(x(t)) \ dt + \frac{\sin {\omega t}}{\omega} + C \\ x(t+T) &= \int f(x(t+T)) \ d(t+T) + \frac{\sin {\omega (t+T)}}{\omega} + C \\ &= \int f(x(t+T)) \ dt + \frac{\sin {\omega (t+T)}}{\omega} + C \\ \text{if} \ T = \frac{2 \pi k}{\omega} \\ x(t+T) &= \int f(x(t+T)) \ dt + \frac{\sin {\omega t}}{\omega} + C \\ \because x(t+T) = x(t) \\ x(t+T) &= \int f(x(t)) \ dt + \frac{\sin {\omega t}}{\omega} + C \end{aligned}
Therefore, $$x(t)$$ is periodic with period $$T =\frac{2 \pi k}{\omega}$$
$$x$$ and thus $$\dot x$$ are $$T$$-periodic. Thus $$\dot x(t)-f(x(t))$$ has $$T$$ as one of its period. If there is a smaller positive minimal period, it has the form $$T/k$$ for some integer $$k$$. On the other side is a function with frequency $$ω$$. Equality is only possible if $$T/k=2\pi/ω$$, or as claimed $$T=\frac{2k\pi}{ω}.$$