Problem 2. For the sequence

$$
S_{n}=\frac{1}{\sqrt{n^{2}+1^{2}}}+\frac{1}{\sqrt{n^{2}+2^{2}}}+\ldots+\frac{1}{\sqrt{n^{2}+n^{2}}}
$$

find

$$
\lim _{n \rightarrow \infty} n\left(n\left(\ln (1+\sqrt{2})-S_{n}\right)-\frac{1}{2 \sqrt{2}(1+\sqrt{2})}\right)
$$
Solution: 2. If $\operatorname{det}(A) \neq 0$, multyplying the equation by $A^{-1}$ from left (right), we get

$$
I_{n}=B-A^{-1} B A+A B-2 B A+A^{-1} B A^{2}+A B A-B A^{2}
$$

Taking trace and having in mind that $\operatorname{tr}(M N)=\operatorname{tr}(N M)$ we deduce:

$$
\begin{aligned}
& n=\operatorname{tr}\left(I_{n}\right)=\operatorname{tr}\left(A\left(A^{-1} B\right)\right)-\operatorname{tr}\left(\left(A^{-1} B\right) A\right)+\operatorname{tr}(A B)-\operatorname{tr}(B A)-\operatorname{tr}\left(\left(B A^{2}\right) A^{-1}\right)+ \\
& +\operatorname{tr}\left(A^{-1}\left(B A^{2}\right)\right)+\operatorname{tr}(A(B A))-\operatorname{tr}((B A) A)=0
\end{aligned}
$$

which is a contradiction. Hence $\operatorname{det}(A)=0$.

Problem 2. For the sequence

$$
S_{n}=\frac{1}{\sqrt{n^{2}+1^{2}}}+\frac{1}{\sqrt{n^{2}+2^{2}}}+\ldots+\frac{1}{\sqrt{n^{2}+n^{2}}}
$$

find

$$
\lim _{n \rightarrow \infty} n\left(n\left(\ln (1+\sqrt{2})-S_{n}\right)-\frac{1}{2 \sqrt{2}(1+\sqrt{2})}\right) .
$$

Solution: In what follows $O\left(x^{k}\right)$ stays for $C x^{k}$ where $C$ is some constant.

$$
f(x)=f(b)+f^{\prime}(b)(x-b)+\frac{1}{2} f^{\prime \prime}(b)(x-b)^{2}+\frac{1}{6} f^{\prime \prime \prime}(\theta)(x-b)^{3}
$$

for some $\theta$ between $a$ and $b$. It follows that

$$
\int_{a}^{b} f(x) d x=f(b)(b-a)-\frac{1}{2} f^{\prime}(b)(b-a)^{2}+\frac{1}{6} f^{\prime \prime}(b)(b-a)^{3}+O\left((b-a)^{4}\right)
$$

Now, let $n$ be a positive integer. Then, for $k=0,1,2, \ldots, n-1$,

$$
\int_{(k-1) / n}^{k / n} f(x) d x=\frac{1}{n} f\left(\frac{k}{n}\right)-\frac{1}{2 n^{2}} f^{\prime}\left(\frac{k}{n}\right)+\frac{1}{6 n^{3}} f^{\prime \prime}\left(\frac{k}{n}\right)+O\left(\frac{1}{n^{4}}\right)
$$

Summing over $k$ then yields

$$
\int_{0}^{1} f(x) d x=\frac{1}{n} \sum_{k=1}^{n} f\left(\frac{k}{n}\right)-\frac{1}{2 n^{2}} \sum_{k=1}^{n} f^{\prime}\left(\frac{k}{n}\right)+\frac{1}{6 n^{3}} \sum_{k=1}^{n} f^{\prime \prime}\left(\frac{k}{n}\right)+O\left(\frac{1}{n^{3}}\right)
$$

Similarly, we can get

$$
f(1)-f(0)=\int_{0}^{1} f^{\prime}(x) d x=\frac{1}{n} \sum_{k=1}^{n} f^{\prime}\left(\frac{k}{n}\right)-\frac{1}{2 n^{2}} \sum_{k=1}^{n} f^{\prime \prime}\left(\frac{k}{n}\right)+O\left(\frac{1}{n^{2}}\right)
$$

and

$$
f^{\prime}(1)-f^{\prime}(0)=\int_{0}^{1} f^{\prime \prime}(x) d x=\frac{1}{n} \sum_{k=1}^{n} f^{\prime \prime}\left(\frac{k}{n}\right)+O\left(\frac{1}{n}\right)
$$

Combining (3), (4) and (5) we obtain

$$
\int_{0}^{1} f(x) d x=\frac{1}{n} \sum_{k=1}^{n} f\left(\frac{k}{n}\right)-\frac{1}{2 n}(f(1)-f(0))-\frac{1}{12 n^{2}}\left(f^{\prime}(1)-f^{\prime}(0)\right)+O\left(\frac{1}{n^{3}}\right)
$$

Now, let

$$
f(x)=\frac{1}{\sqrt{1+x^{2}}}
$$

Then

$$
\begin{aligned}
\int_{0}^{1} f(x) d x & =\left.\ln \left|x+\sqrt{1+x^{2}}\right|\right|_{0} ^{1}=\ln (1+\sqrt{2})-\ln (1)=\ln (1+\sqrt{2}) \\
\frac{1}{n} \sum_{k=1}^{n} f\left(\frac{k}{n}\right) & =\frac{1}{n} \sum_{k=1}^{n} \frac{1}{\sqrt{1+(k / n)^{2}}}=\sum_{k=1}^{n} \frac{1}{\sqrt{n^{2}+k^{2}}}=S_{n} \\
f(1)-f(0) & =\frac{1}{\sqrt{2}}-1=\frac{1-\sqrt{2}}{\sqrt{2}}=-\frac{1}{\sqrt{2}(1+\sqrt{2})} \\
f^{\prime}(1)-f^{\prime}(0) & =-\frac{1}{2 \sqrt{2}}-0=-\frac{1}{2 \sqrt{2}}
\end{aligned}
$$

Hence

$$
\ln (1+\sqrt{2})=S_{n}+\frac{1}{2 \sqrt{2}(1+\sqrt{2}) n}+\frac{1}{24 \sqrt{2} n^{2}}+O\left(\frac{1}{n^{3}}\right)
$$

Finally,

$$
\lim _{n \rightarrow \infty} n\left(n\left(\ln (1+\sqrt{2})-S_{n}\right)-\frac{1}{2 \sqrt{2}(1+\sqrt{2})}\right)=\frac{1}{24 \sqrt{2}}
$$

Problem 3. Prove that: if $A$ is $n \times n$ square matrix with complex entries such that $A+A^{*}=A^{2} A^{*}$, then $A=A^{*}$. (For any matrix $M$, denote by $M^{*}=\bar{M}^{t}$ the conjugate transpose of $M$.)