Find all functions $f: \mathbb{R} \setminus \{0,1\}$ such that

$$
f(x) + f\left(\frac{1}{1-x}\right) = x
$$

## Solutions
On a

$$
\frac{1}{1-\frac{1}{1-x}}=\frac{1-x}{1-x-1}=\frac{x-1}{x} \quad \text{and} \quad \frac{1}{1-\frac{x-1}{x}}=x
$$

Therefore,

$$
\begin{aligned}
f(x)+f\left(\frac{1}{1-x}\right) & =x \\
f\left(\frac{1}{1-x}\right)+f\left(\frac{x-1}{x}\right) & =\frac{1}{1-x} \\
f\left(\frac{x-1}{x}\right)+f(x) & =\frac{x-1}{x}
\end{aligned}
$$

and then

$$
\begin{aligned}
2 f(x) & =x-\frac{1}{1-x}+\frac{x-1}{x} \\
& =\frac{x^{2}(1-x)-x-x^{2}+2 x-1}{(1-x) x} \\
& =\frac{-x^{3}+x-1}{(1-x) x}
\end{aligned}
$$

Therefore, $f(x)=\frac{-x^{3}+x-1}{2(1-x) x}$. We then need to verify the solution...

## 2 Double Counting (Théo)

The goal of this session was to introduce the concept of double counting: we seek to count certain objects in two different ways to obtain combinatorial equalities.

For example, recall that $\binom{n}{k}$ is the number of ways to choose a subset of $k$ elements from $n$. It is known that if $0 \leqslant k \leqslant n$, then $\binom{n}{k}=\frac{n!}{k!(n-k)!}$. Let's prove this identity: for this, we will show that $n!=\binom{n}{k} k!(n-k)!$.

To do this, we will count the number of permutations of $\{1, \ldots, n\}$ in two different ways. There are $n!$ permutations ($n$ choices for the image of $1$, $n-1$ for the image of $2$, etc.). But we can also construct each permutation as follows: we choose $\{\sigma(1), \ldots, \sigma(k)\}$, the set of the first $k$ images of $\sigma$ (there are $\binom{n}{k}$ choices), then we choose an order for these images ($k!$ possibilities), and finally an order for the remaining $n-k$ images ($(n-k)!$ possibilities). Therefore, we have $\binom{n}{k} k!(n-k)!$ different permutations, each produced by this method, hence the equality.

For counting stories, to show an equality, a sum is interpreted as an exclusive or: if we sum positive integers $a_{1}+\cdots+a_{k}$, we often interpret $a_{i}$ as the number of possibilities for case $i$, knowing that each case is exclusive and that they cover all possibilities. If we multiply certain quantities, it should be interpreted as a successive or parallel choice of certain quantities.

Often, double counting pairs, triplets, or other sets proves particularly effective. It is important to try this even on simple cases, as more elaborate double counting ideas can appear in more complex problems (for example, the C2 2021 is a good example of a problem where double counting ideas appear). To double count pairs, often we look at the first term of the pair fixed, how many second terms are possible, and vice versa, giving two different equalities/inequalities.

The exercises in this TD are mostly taken from those of 2019 and 2021, available here: https://maths-olympiques.fr/wp-content/uploads/2019/08/PolycopieV1-1.pdf https://maths-olympiques.fr/wp-content/uploads/2022/02/Poly-2021-Valbonne.pdf. It is required to do them without calculation, without using the binomial coefficient formula with factorials, in order to try to properly implement the double counting method.