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.