TITLE: Functional equation: $R(1/x)/x^2 = R(x) $
QUESTION [11 upvotes]: The following can be shown without much hassle. 

Suppose $R$ is a rational function satisfying the following functional equation.
  \begin{align} 
   \frac{1}{x^2} R\left( \frac{1}{x} \right) = R(x) \qquad \forall \: x \in \mathbb{R} \backslash \{0\}
   \tag{1}
\end{align}
Then 
  $$ 
    \int_0^\infty R(x) \cdot \log x \,\mathrm{d}x = 0 
$$
  if it converges. 

The proof is done by splitting the integral from $0$ to $1$ and $1$ to $\infty$. And then map $[1,\infty) \to [0,1]$ by $u \mapsto 1/x$. There are many rational functions satisfying this equation. A few examples below
$$ 
    R(x) = \frac{1}{x}\,,\ \frac{x}{(1+x^2)^2} \,,\ \frac{1}{x^2 + x + 1}\,,\ \frac{1}{x^2+1}
$$
My question is: Can one find groups or families of functions satisfying $(1)$?

REPLY [2 votes]: I have been thinking about your problem again and came up with an alternative characterisation.
Notice that in each of your examples, the numerator and denominator have coefficients that read the same backwards as they do forwards. For example, 
$$\frac{1}{(1+x)^2} = \frac{1}{1+2x+x^2}$$
and the coefficients in the denominator are $(1,2,1)$; a palindrome. Call a polynomial $p(x)$ a palindrome of index $k$ if 
$$p(x) = x^k p(1/x)$$
For example, $p(x) = x^4 + 3x^3 + 3x^2 + x$ is a palindrome of index $5$. Then I claim that all the rational functions $r(x)$ which satisfy $r(1/x)=r(x)$ have the form 
$$r(x) = p(x)/q(x)$$
where $p$ and $q$ are palindromes of the same index. It follows that your functions are precisely those of the form $p(x)/q(x)$ where $p(x)$ is a palindrome of index $k$ and $q(x)$ is a palindrome of index $k+2$, for some $k$. For example, $1/(1+2x+x^2)$ is a palindrome of index $0$ divided by a palindrome of index $2$.

To prove the claim, suppose that $r(x) = p(x)/q(x)$ satisfies $r(1/x)= r(x)$ and work over $\mathbb{C}(x)$ so that $p(x)$ and $q(x)$ may be assumed to have no common linear factors. Choose $k$ to be the smallest possible power so that $x^k p(1/x)$ and $x^k q(1/x)$ are both polynomials. Let $P(x) = x^kp(1/x)$ and $Q(x) = x^kq(1/x)$. Then 
$$r(x) = p(x)/q(x) = P(x)/Q(x).$$
The polynomials $P$ and $Q$ have no common factor, since if $P(a) = Q(a) = 0$ then $a^kp(1/a) = a^k q(1/a) = 0$. But then either $a=0$, in which case $P$ and $Q$ have a common factor of $x$, which contradicts that $k$ is as small as possible, or else $p(1/a)=q(1/a)=0$, which contradicts that $p$ and $q$ have no common factor.
Then from $p(x)Q(x) = q(x)P(x)$, by factorisation into linear factors it follows that $p(x) = c_1P(x)$ and $q(x) = c_2Q(x)$ for some constants $c_1$ and $c_2$. But then $c_1/c_2=1$ and so $p(x) = cP(x)$, $q(x)=cQ(x)$. But by putting $x=1$, it follows that $(c-1)p(1) = (c-1)q(1) = 0$. Since $p(1)$ and $q(1)$ cannot both be zero, it follows that $c=1$ and therefore $p(x) = P(x) = x^kp(1/x)$ and $q(x) = Q(x) = x^kq(1/x)$ are palindromes of index $k$, as claimed.

Now you can write down all the functions satisfying $(1)$ by just writing down palindromes, for example
$$R(x) = \frac{x^4 + 3x^3 + 3x^2 + x}{2x^7 - x^4 - x^3 +2}$$
satisfies $R(1/x) = x^2R(x)$ and you can get them all this way.