# Why does this functional equation follow from periodicity?

I'm reading a proof where they say that given

$$\phi(x) = \Gamma(x)\Gamma(1-x)\sin \pi x$$ and $$g(x) = [\log \phi(x)]''$$

then, since $$g$$ is periodic with period 1, it satisfies the functional equation $$\frac{1}{4} \left(g\left(\frac{x}{2}\right) + g\left(\frac{x+1}{2}\right)\right) = g(x).$$

I haven't been able to prove this even after expanding out $$g(x)$$. Is there a quick proof that $$g$$ satisfies this functional equation?

$$g(x)=\frac{1}{\phi\left(\frac{x}{2}\right)^2 \phi\left(\frac{x+1}{2}\right)^2}\left[\phi\left(\frac{x}{2}\right) \phi\left(\frac{x+1}{2}\right) \left(\frac{1}{4} \phi\left(\frac{x+1}{2}\right) \phi''\left(\frac{x}{2}\right)+\frac{1}{4} \phi\left(\frac{x}{2}\right) \phi''\left(\frac{x+1}{2}\right)+\frac{1}{2} \phi'\left(\frac{x}{2}\right) \phi'\left(\frac{x+1}{2}\right)\right)-\left(\frac{1}{2} \phi\left(\frac{x+1}{2}\right) \phi'\left(\frac{x}{2}\right)+\frac{1}{2} \phi\left(\frac{x}{2}\right) \phi'\left(\frac{x+1}{2}\right)\right)^2\right]$$
$$g(x)=\frac{1}{4} \left(\frac{f''\left(\frac{x}{2}\right)}{f\left(\frac{x}{2}\right)}-\frac{f'\left( \frac{x}{2}\right)^2}{f\left(\frac{x}{2}\right)^2} + \frac{f\left(\frac{x+1}{2}\right) f''\left(\frac{x+1}{2}\right)-f'\left(\frac{x+1}{2}\right)^2}{f\left(\frac{x+1}{2} \right)^2}\right) = \frac{1}{4}\left[g\left( \frac{x}{2}\right)+g\left( \frac{x+1}{2}\right)\right].$$