Is there a real continuous function that extends the domain of this function?

40 Views Asked by At

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

3

There are 3 best solutions below

2
On BEST ANSWER

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$$

1
On

example $$ f(x) = 1 - {1 \over x}\left( {\cos \pi x} \right) $$

0
On

$$ f(x)=\begin{cases} 1 & \text{when }x=0 \\ 1 - \frac1x\bigl(\cos(\pi x) - \sin(\pi x)/\pi x\bigr) & \text{otherwise} \end{cases} $$ is continuous (in fact real analytic) on all of $\mathbb R$ and agrees with your original definition at all points where it is defined.