Suppose that $f$ is a rational function over $\mathbb{R}$ (or $\mathbb{C}$, or whatever field makes this easier to answer). Is $$\frac{f(\sqrt{x}) + f(-\sqrt{x})}{2}$$ always a rational function of $x$?

This question is inspired by a sequence question. Given a sequence $a_n$ with a rational generating function, is it true that, say, $a_{2n}$ also has a rational generating function? If $f$ is the generating function for $a_n$, then $(f(\sqrt{x}) + f(-\sqrt{x})) / 2$ is the generating function for $a_{2n}$.

As an example, take $f(x) = 1 / (1 - x)$, which corresponds to the all-ones sequence $a_n = 1$. Then $$\frac{f(\sqrt{x}) + f(-\sqrt{x})}{2} = \frac{1}{1 - x},$$ as we would expect.

This specific case might be "easy" to answer (not for me), but when I first heard about this someone mumbled something about Galois theory and field extensions that I didn't understand. I would like to know more about this if it's relevant, since this question generalizes to seemingly harder cases.

  • 3
    $\begingroup$ I think Galois theory is the way to go here. $\mathbb R(\sqrt x)$ is a quadratic extension of $\mathbb R(x)$, so the Galois group is cyclic of order $2$. The only non-trivial element is $\sigma$ which changes the sign of $\sqrt x$. Since your expression is fixed under $\sigma$ it must be in the base field. Does that answer your question? $\endgroup$
    – lulu
    Jan 14, 2020 at 20:35
  • $\begingroup$ @lulu That sounds exactly like what the person said. I don't know anything about Galois theory - is this the type of argument I could learn with any introductory text? $\endgroup$
    – Robert D-B
    Jan 14, 2020 at 20:38
  • 2
    $\begingroup$ In a nutshell: the answer is yes. This can be justified by noting that switching $\sqrt{x}$ with $-\sqrt{x}$ defines a "field automorphism", and the only elements that are fixed by this field automorphism are the rational functions over $x$. $\endgroup$ Jan 14, 2020 at 20:38
  • 2
    $\begingroup$ this question provides some basic references in Galois Theory. I'd say it's worth looking up one (or more) of these. It's a great and powerful topic, well worth learning. $\endgroup$
    – lulu
    Jan 14, 2020 at 20:43

1 Answer 1


Here is a brutal-force solution: Write $f$ in the form

$$ f(x) = \frac{A_0(x^2) + x A_1(x^2)}{B_0(x^2) + x B_1(x^2)} $$

where $A_0, A_1, B_0, B_1$ are polynomials. Then

$$ \frac{f(\sqrt{x}) + f(-\sqrt{x})}{2} = \frac{A_0(x)B_0(x) - x A_1(x)B_1(x)}{B_0(x)^2 - x B_1(x)^2}. $$

  • 6
    $\begingroup$ +1. Elegant Solution. I am not sure I would refer to this thing as a brute-force solution (it's an elementary technique) but I definitely wouldn't call it 'brutal.' Seems gentle enough. $\endgroup$
    – Mason
    Jan 14, 2020 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .