Does this kind of function exist?

46 Views Asked by At

Does a function, $f(x)$, exist such that for some integer $a$, $f(a) = 1$. In addition, the function evaluated at all integers between $1$ and $a$ is $0$. Finally, the limit of this function as $x$ approaches infinity is $1$. Thanks!

2

There are 2 best solutions below

0
On

$$f(x)=\cases{0&if $x<a$\cr 1&if $x\ge a$.\cr}$$

0
On

There are many functions like that. You have already described the function $f(x)$ over all the input values $1 < x \leq a.$ We also know that the function is discontinuous at $x = a.$ (This is implied by the values you've already required it to have.)

Regarding the parts of the function you have not already explicitly specified, for $x > a$ you can take any function whose limit is $1$ as $x \to \infty,$ and for $x \leq 1$ you can use any function you want.