Question
Consider the map $g:[0,1] \to [0,1]$ given by $$ g(x) = \begin{cases} 1 - \Big\lceil \frac{1}{x} \Big\rceil + \frac{1}{x} & x \leq 1/2 \\ \Big\lceil \frac{1}{1-x} \Big\rceil - \frac{1}{1-x} & x > 1/2 \end{cases} $$ This function is plotted below
I would like to calculate the steady state distribution (aka invariant measure, aka leading eigenfunction) $m(x)$ obtained for generic initial values $x_0$ by repeated application of the map $$ \frac{1}{n}\sum_{k=1}^n f \circ g^k(x_0) \to \int f(x) m(x) dx. $$
The key properties of interest to me are
- The density at the extremal points of the interval $\lim_{x \to 0} m(x) = \lim_{x \to 1} m(x)$
- The average $\int_0^1 \log ( \min(x,1-x) ) m(x) dx = 2 \int_0^{1/2} \log (x) m(x) dx$
Context
This is related to the well known Gauss map $h:[0,1] \to [0,1]$ $$ h(x) = \frac{1}{x} - \Big\lfloor \frac{1}{x} \Big\rfloor $$ in the following way $$ g(x) = \begin{cases} 1 - h(x) & x \leq 1/2 \\ h(1-x) & x > 1/2 \end{cases} $$ (expect at the measure zero set of points $1/\min(x,1-x) \in \mathbb{N}$).
For $h(x)$ the steady state distribution is known, and given by $$ m_h(x) = \frac{1}{\log 2} \frac{1}{1+x} $$
In this case the equivalent properties of interest are
- $\lim_{x\to 0}m_h(x) = 1 / \log 2$
- $\int_0^1 dx \log (x) m_h(x) dx = \pi^2/(12 \log 2)$ (Levy's constant)
Operationally we can understand $g(x)$ as being a generalisation of the Gauss map which treat cases of $x$ very close to $0$, and $x$ very close to $1$ symmetrically.
I would like to find the equivalent properties for the map $g(x)$.
My progress
I detail my attempt at generalising the calculation of $m_h(x)$ to the case of interest. This yields an implicit equation ($**$) for the cumulative distribution function, however I have not been able to solve this thus far. Moreover, I do not know if this approach is the correct one, so any pointers will be appreciated.
Explicitly we are interested in solutions to the equation $$ m(x) = \int_0^1 d y \delta(x - g(y))m(y) \tag{$*$} $$ we write $g(x)$ in the following form $$ g(x) = \begin{cases} 1 - n + \frac{1}{x} & \qquad \text{for} \qquad \frac{1}{n} \leq x < \frac{1}{n-1}, \quad n = 3 , 4 ,5 , 6 \ldots \\ n - \frac{1}{1-x} & \qquad \text{for} \qquad \frac{n-1}{n} \leq x < \frac{n-2}{n-1}, \quad n = 3 , 4 ,5 , 6 \ldots \end{cases} $$ Substituting this in to ($*$) we obtain $$ m(x) = \sum_{n=3}^\infty \left[ \frac{m\left(\frac{1}{n-1+x}\right)}{(n-1+x)^2} + \frac{m\left(1-\frac{1}{n-x}\right)}{(n-x)^2} \right] $$ We integrate this to obtain $$ c(x) = \sum_{n=3}^\infty \left[ c\left( \frac{1}{n-1} \right) - c\left( \frac{1}{n-1+x} \right) + c\left( 1- \frac{1}{n} \right) - c\left( 1- \frac{1}{n-x} \right) \right] $$ where $c(x) = \int_0^x m(y) dy$ is the cumulative distribution function. The expected symmetry of the distribution $m(x) = m(1-x)$ allows for some simplification, specifically we use $c(x) = 1 - c(1-x)$ to obtain $$ c(x) = \sum_{n=3}^\infty \left[ c\left( \frac{1}{n-1} \right) - c\left( \frac{1}{n-1+x} \right) - c\left( \frac{1}{n} \right) + c\left( \frac{1}{n-x} \right) \right] $$ The constant terms telescope and we obtain $$ \begin{equation} c(x) = 1 - c(1-x) = \frac{1}{2} + \sum_{n=3}^\infty \left[ c\left( \frac{1}{n-x} \right) - c\left( \frac{1}{n-1+x} \right) \right] \tag{$**$} \end{equation} $$ where we have used that $c(1/2)=1/2$.
Unfortunately I am unable to make progress from here. Some futzing around and re-writing yields a different form, but no progress.

I muddled through. For anyone interested, the solution is $$ c(x) = \frac{\log\left(1+\frac{x \phi^2}{1- x + \phi}\right)}{\log\left(1 +\phi\right)} $$ where $\phi = \tfrac12(1 + \sqrt{5})$ is the golden ratio. Using this form for $c(x)$ other properties of interest may be readily calculated.
I am still interested in other answers which explain how the problem might be tackled efficiently, as my answer was basically found by guesswork.