function undefined at odd inputs

248 Views Asked by At

I am a high-school student in pre-calculus. My teacher told me today that it is impossible to define a function using only multiplication, division, exponents, addition, subtraction such that it would be undefined at every odd input (that is $x \bmod 2$ is $1$). I, of course, wanted to disprove her and I made up this equation that turns any function $f(x)$ into a function that has domain $\mathbb{R} \mid \lfloor x\rfloor\bmod 2\neq0$! $$g(x)=\frac{1}{(-1)^{\lfloor x \rfloor}+1}-\frac{1}{2}+f(x)$$ feeding in an odd number will cause the fraction to become undefined. but feeding in an even number will cause the fraction to equate to one half, and after subtracting one half, $f(x)$ should work as defined.

What bothers me is that I googled $(-1)^x$ and any other form of $y=(-a)^x$ and simply could not find anything. My question is: What did I just do? Is there a name for this? Is my precal teacher insane??

1

There are 1 best solutions below

0
On

Your function (or a variation of the theme) is correct as specified if:

  • You restrict the domain of the function to the integers $\mathbb{Z}$ or
  • You allow the range of the function to the complex numbers $\mathbb{C}$.

Either will correctly mean that the function is undefined only on the odd integers.

However, this is why you must be more specific. Supposing that you were looking at functions $f: \mathbb{R} \to \mathbb{R}$. Then it is the case that:

$$f(x) = \frac{1}{(-1)^x+1}$$

(which is the building block of any similar function) is undefined on more than just the odd integers. For instance, it is intuitively obvious that such a function is also undefined for $x=\frac{1}{2}$, which is not real valued. Indeed, such a function is undefined for practically every real number, with the exception of even integers, though this is far from being intuitive. I suspect (but cannot prove) that your teacher is correct for functions mapping real numbers to real numbers.

Also, as a tangentially related point, note also that defining $(-1)^x$ for $x \in \mathbb{R}$ is a much more complex task than doing it for integers. It is not obvious that the function is not real valued for any reals that are not also integers. Although we are working solely with real numbers, defining such a function is much simpler when complex exponentiation is used as a starting point.