# Find all non-constant function $g$ such that $(g(x)-1)(g(-x)-1)=1$

Find all non-constant function $g$ such that $$\big(g(x)-1\big)\big(g(-x)-1\big)=1.$$

I started with some special functions like $g(x)=1+e^x$. Then later: $g(x)=1+a^{bx}$ or $g(x)=1-a^{bx}$. I wonder there are more, or how to find all of them.

Edit:

At first, I didn't mentioned that I am interested only in those continuous function.

Follows from Marvis's post, I think I got the answer.

Let $h(x)=|g(x)−1|$. Then $h(x)h(−x)=1$ and hence $\ln(h(x))+\ln(h(−x))=0$. This implies that $\ln(h(x))=−\ln(h(−x))$. Now, $\ln(h(x))=k(x)$ where $k(x)$ is an odd function. So $h(x)=e^{k(x)}$ and hence $g(x)=1±e^{k(x)}$, where $k(x)$ is an odd function.

Note that the base e can be changed to any base a with positive $a≠1$.

Do I miss out anything?

By the way, this questions was due to the following post which I wonder why the function $1+e^x$ is so special. And now, we can replace the $1+e^x$ with $1±a^{k(x)}$, where $k(x)$ is an odd function.

-
@Hurkyl thanks. I edited. – pipi Mar 3 '13 at 14:09

Let $f(x) = g(x) -1$. Then we have $$f(x) f(-x) = 1$$ From this we get $f(0) = \pm 1$. Now consider a function $h(x): (0,\infty) \to \mathbb{R} \backslash \{0\}$. Then $$f(x) = \begin{cases}h(x) & x > 0\\ \dfrac1{h(-x)} & x < 0\\ \pm1 & x=0\end{cases}$$ Hence, $$g(x) = \begin{cases}1+h(x) & x > 0\\ 1+\dfrac1{h(-x)} & x < 0\\ 0 \text{ or } 2 & x=0\end{cases}$$ where $h(x)$ is any function with $h(x): (0,\infty) \to \mathbb{R}$.
@copper.hat As Ross has also pointed out, it should read $f(0) = \pm 1$. – user17762 Oct 17 '12 at 4:23
$h(x)$ above cannot be $0$. – Stefan Smith Oct 19 '12 at 0:26