I try to choose some value of $x=\sqrt{n\pi}$ and $y=\sqrt{n\pi/2}$ so that $|x-y|<\delta$ and $|f(x)-f(y)>\epsilon$, but I got stuck when trying to state the relationship of x and y I picked and $\delta$ in order to make sure that it works for all $\delta$