Is there a real continuous function that extends the domain of this function?
$$ f(k) \begin{cases} if \:k \equiv 1 \:\mod\:2, \quad f(k) = \frac{k+1}{k}\\ \\if \:k \equiv 0 \:\mod\: 2, \quad f(k) = \frac{k-1}{k} \end{cases} $$ Graph of the function
Is there a real continuous function that extends the domain of this function?
$$ f(k) \begin{cases} if \:k \equiv 1 \:\mod\:2, \quad f(k) = \frac{k+1}{k}\\ \\if \:k \equiv 0 \:\mod\: 2, \quad f(k) = \frac{k-1}{k} \end{cases} $$ Graph of the function
What about
$$f(x)=\frac{x-1}x \cos^2 \left(\frac{\pi}2x\right)+\frac{x+1}x \sin^2 \left(\frac{\pi}2x\right)$$
which can be simplified by trigonometric identities
$$f(x)=1-\frac1x\left[2\cos^2 \left(\frac{\pi}2x\right)-1\right] =1-\frac{\cos \left(\pi x\right)}x$$