<s>[INST] Showing that $f(x)=\frac x{x+1}$ is the unique function satisfying $f(x)+f\left(\frac1x\right)=1$ and $f(2x)=2f\big(f(x)\big)$ We are given a function $ f : \mathbb Q ^ + \to \mathbb Q ^ + $ such that $$ f ( x ) + f \left( \frac 1 x \right) = 1 $$
and
$$ f ( 2 x ) = 2 f \big( f ( x ) \big) \text . $$
Find, with proof, an explicit expression for $f(x)$ for all positive rational numbers $x$.
Every number I have evaluated is of the form $ f ( x ) = \frac x { x + 1 } $ and this clearly fits the functional equations, but I can't prove that it's the only solution. Can anyone help me? I have put down the start of my workings which led me to the conjecture of $ f ( x ) = \frac x { x + 1 } $.
Plugging in $ x = 1 $ clearly gives $ f ( 1 ) = \frac 1 2 $ and $ f ( 2 ) = 2 f \big( f ( 1 ) \big) = 2 f \left( \frac 1 2 \right) $ which we can plug back into the first equation to get that $ f ( 2 ) = \frac 2 3 $. Working in this vein I have been able to show that $ f ( x ) = \frac x { x + 1 } $ for particular values of $ x $, but not in general.
The most difficult part appears to be proving it for the even integers. To prove $ x = 8 $, we have
$$ f ( 12 ) = 2 f \left( \frac 6 7 \right) = 4 f \left( \frac 3 { 10 } \right) = 4 - 4 f \left( \frac { 10 } 3 \right) \\
= 4 - 8 f \left( \frac 5 8 \right) = 8 f \left( \frac 8 5 \right) - 4 = 16 f \left( \frac 4 9 \right) - 4 \\
= 32 f \left( \frac 2 { 11 } \right) - 4 = 64 f \left( \frac 1 { 12 } \right) - 4 = 60 - 64 f ( 12 ) \text , $$
giving us $ f ( 12 ) = \frac { 12 } { 13 } $. This will probably be the main area of difficulty in the proof.
 [/INST] As j___d does, I will attempt to prove that $f(\frac pq) = \frac{p}{p+q}$ by strong induction on $p+q$, starting with the base case $p+q=2$ where $f(\frac11) = \frac12$.
Now assume that $f(\frac{p}{q}) = \frac{p}{p+q}$ holds when $p+q<k$, and consider fractions $\frac pq$ with $p+q=k$.
Whenever $p<q$, we have $f(\frac{p}{q-p}) = \frac pq$, so $2f(f(\frac{p}{q-p})) = 2f(\frac pq)$, and by the second identity this implies that $f(\frac{2p}{q-p}) = 2f(\frac pq)$. Whenever $p>q$, of course, we have $f(\frac qp) = 1 - f(\frac pq)$ by the first identity. 
Either way, this gives us $f(\frac{p'}{q'})$ for some different $\frac{p'}{q'}$ with $p'+q'=p+q$, in terms of $f(\frac pq)$.
Now we repeat the following process. Start with $f(\frac1{k-1}) = x$, and let $\frac pq = \frac1{k-1}$. Then repeatedly apply one of the identities  $$f\left(\frac{2p}{q-p}\right) = 2f\left(\frac pq\right) \qquad \text{or} \qquad f\left(\frac qp\right) = 1 - f\left(\frac pq\right)$$ (preferentially the first) to get a different value $f(\frac{p'}{q'})$ in terms of $f(\frac{p}{q})$ and therefore in terms of $x$. Set $\frac pq = \frac{p'}{q'}$ and repeat. An example for $k=11$:
\begin{array}{cccccccccc}
f(\frac{1}{10}) & f(\frac{2}{9}) & f(\frac{3}{8}) & f(\frac{4}{7}) & f(\frac{5}{6}) & f(\frac{6}{5}) & f(\frac{7}{4}) & f(\frac{8}{3}) & f(\frac{9}{2}) & f(\frac{10}{1}) \\
x & 2x & 1-8x & 4x & 16x-1 & 2-16x &   & 8x &   & 32x-2
\end{array}
Because there are finitely many values, we will eventually loop back to a value we have already seen, getting a second expression for it in terms of $x$. That expression will be different from the first, because the coefficient of $x$ doubles with every step from left to right in the table above. (In this case, we'll get $f(\frac1{10}) = 3 - 32x$, so $x = 3 - 32x$.)
So we can solve for $x$ and get some value for $f(\frac{1}{k-1})$, as well as all the other values we've encountered. If there are values in the table we haven't filled in yet, we can start this process again from those values, stopping when we get two expressions for the same unknown value, or an expression for a value we've already solved for.
(By the way, if $k$ is not prime, then we will have some fractions $\frac pq$ with $p+q=k$ which can be simplified, so we already know their values. In some cases, this lets us take a shortcut from the very beginning: for example, this will happen whenever $k$ is even.)
Eventually, we can fill in the entire table. This tells us that there's a unique solution for all $f(\frac pq)$ with $p+q=k$. But we know that $f(\frac pq) = \frac{p}{p+q}$ is consistent with the functional equation, so if we got some unique solution, that must be what we got.
By induction on $p+q$, we have $f(\frac pq) = \frac{p}{p+q}$ for all $p, q \ge 1$.
</s>