\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{fullpage}
\usepackage{verbatim}
\usepackage[estonian]{babel}

\newcommand{\Mat}{\operatorname{Mat}}
\everymath{\displaystyle}

\begin{document}

\title{Treeningvõistlus}
\date{14.10.2016}
\maketitle
\thispagestyle{empty}

\begin{enumerate}
\item
\begin{enumerate}
\item 
Leia kõik sellised pidevad funktsioonid $f: [0, \infty) \to \mathbb R$, et iga $x \geq 0$ korral
\[
f(x^2) = f(x).
\]
\item
Kas leidub lõpmata palju erinevaid pidevaid funktsioone $f: (1, \infty) \to \mathbb R$, mille jaoks iga $x > 1$ korral
\[
f(x^2) - f(x) = \ln 2?
\]
\end{enumerate}
\item
Olgu $A$ ja $B$ reaalsed $n\times n$ maatriksid. Tõesta, et
\[
A(A+B)^{-1}B = B(A+B)^{-1}A
\]
eeldusel, et
\begin{enumerate}
\item
maatriksid $A+B$, $A$ ja $B$ on pööratavad,
\item
maatriks $A+B$ on pööratav.
\end{enumerate}
\item
Iga $n \in \mathbb N$ korral tähistame 
\[
S_n = 1 - \frac 1 2 + \frac 1 3 - \frac 1 4 + \dots + \frac 1 {2n-1} - \frac 1 {2n}.
\]
Tõesta, et 
\[
S_n = \frac 1 {n+1} + \frac 1 {n+2} + \dots + \frac 1 {2n}
\]
ja leia 
\[
\lim_{n \to \infty} S_n.
\]
\item
Milliste $m \geq 1$ korral leiduvad täisarvud $n_0 < n_1 < \ldots < n_m$ ja täisarvuliste kordajatega polünoom $P$, mille aste on $m$, nii, et
\[
|P(n_0)| = |P(n_1)| = \ldots = |P(n_m)| = 1?
\]
\end{enumerate}
\newpage
\section*{Solutions}
\begin{enumerate}
\item 
\begin{enumerate}
\item
These are constant functions. They clearly satisfy the condition. On the other hand, fix $x > 0$ and denote $x_n := x^{\frac 1 {2^n}}$. Then $x_n \to 1$. So $f(x_n) \to f(1)$. 
But 
\[
f(x) = f(x_0) = f(x_1) = \ldots = f(x_n),
\]
so $f(x) = f(1)$. Then, by continuity, also $f(0) = f(1)$. 
\item
Yes, because $h(x) = \ln \ln x$ as well as $h(x) + C$, where $C \in \mathbb R$ is a constant, satisfy the condition.
\end{enumerate}
\item
\begin{enumerate}
\item
We have
\[
\begin{split}
A(A+B)^{-1}B &= (A^{-1})^{-1}(A+B)^{-1}(B^{-1})^{-1}\\
             &= (B^{-1}(A+B)A^{-1})^{-1}\\
	     &= (B^{-1} + A^{-1})^{-1}.
\end{split}
\]
Since the latter expression is symmetric with respect to $A$ and $B$, we get the claim.
\item
This is because
\[
A(A+B)^{-1}B + B(A+B)^{-1}B = (A+B)(A+B)^{-1}B = B
\]
and
\[
B(A+B)^{-1}A + B(A+B)^{-1}B = B(A+B)^{-1}(A+B) = B.
\]

\end{enumerate}
\item
Set
\[
H_n := 1 + \frac 1 2 + \frac 1 3 + \dots + \frac 1 n$
\]
Then
\[
S_n = H_{2n} - 2(\frac 1 2 H_n) = H_{2n} - H_n.
\]
To find a limit, observe that
\[
\lim_n S_n = \lim_n \frac 1 n \sum_{i=1}^n \frac 1 {1 + \frac i n} = \int_0^1 \frac{dx}{1 + x} = \ln 2.
\]

\item
For $m=1$: $P(x) = x$, $\{n_i\} = \{-1, 1\}$.

For $m=2$: $P(x) = x(x-1)-1$, $\{n_i\} = \{-1, 0, 1\}$.

For $m=3$: $P(x) = (x+1)x(x-2)+1$, $\{n_i\} = \{-1, 0, 1, 2\}$.

There are no such polynomials for $m \geq 4$.
Using the Lagrange interpolation, we can show that 
\[
\max |P(n_i)| \geq |a_m| \frac{m!}{2^m} \geq \frac{m!}{2^m} \geq \frac{4!}{2^4} = \frac{24}{16} > 1
\]
where $a_m$ is the coefficient at $x^m$. Indeed, if we denote 
\[
f(x) = (x-n_0)(x-n_1)(x-n_2)\ldots(x-n_m),
\]
then the Lagrange interpolation formula gives
\[
P(x) = \sum_{i=0}^m \frac{P(n_i)}{f'(n_i)} \frac{f(x)}{x-n_i}.
\]
Looking at the coefficient at $x_m$ we obtain
\[
a_m = \sum_{i=0}^m \frac{P(n_i)}{f'(n_i)}
\]
and 
\[
|a_m|  \leq \max |P(n_i)| \sum_{i=0}^m \frac{1}{|f'(n_i)|}.
\]
Note that 
\[
|f'(n_i)| = |(n_i - n_0)(n_i - n_1)\dots(n_i - n_{i-1})(n_i - n_{i+1})\dots (n_i - n_m)| \geq i!(m-i)!.
\]
Hence 
\[
\sum_{i=0}^m \frac{1}{|f'(n_i)|} \leq \frac{1}{m!}\sum_{i=0}^m \frac{m!}{i!(m-i)!} = \frac{2^m}{m!}.
\]
\end{enumerate}

\end{document}
