Proof.
Since \(\chi\) is (completely) multiplicative and \(r = \chi * 1\) (Dirichlet convolution), it follows that \(r\) is multiplicative (but not necessarily completely multiplicative).
Let \(p\) be a prime and \(a \geq 1\text{.}\) Then
\begin{align}
r(p^a) \amp = \sum_{d \mid p^a} \chi(d) \tag{7.7.1}\\
\amp = \chi(1) + \chi(p) + \chi(p^2) + \dotsb + \chi(p^a) \tag{7.7.2}\\
\amp = \chi(1) + \chi(p) + \chi(p)^2 + \dotsb + \chi(p)^a \tag{7.7.3}\\
\amp = \begin{cases}
a+1, \amp \text{if } \chi(p) = 1; \\
1, \amp \text{if } \chi(p) = 0; \\
1, \amp \text{if } \chi(p) = -1 \text{ and } a=2k; \\
0, \amp \text{if } \chi(p) = -1 \text{ and } a=2k+1.
\end{cases} \tag{7.7.4}
\end{align}
Let \(n = p_1^{a_1} \dotsm p_k^{a_k}\text{.}\) Then \(r(n) = r(p_1^{a_1}) \dotsm r(p_k^{a_k})\text{.}\) We saw that every \(r(p^a) \geq 0\text{,}\) hence \(r(n) \geq 0\text{.}\) If \(n\) is a perfect square, then every power \(a_i\) is even, so each \(r(p_i^{a_i}) \geq 1\text{.}\) It follows that \(r(n) \geq 1\text{.}\)
Proof.
We will use the Dirichlet hyperbola method.
We have
\begin{align}
A(x) \amp = \sum_{n \leq x} \frac{r(n)}{\sqrt{n}} \tag{7.7.5}\\
\amp = \sum_{n \leq x} \frac{1}{\sqrt{n}} \sum_{d \mid n} \chi(d) \tag{7.7.6}\\
\amp = \sum_{dk \leq x} \frac{\chi(d)}{\sqrt{dk}} \tag{7.7.7}\\
\amp = \sum_{dk \leq x} \frac{\chi(d)}{\sqrt{d}} \cdot \frac{1}{\sqrt{k}} \tag{7.7.8}
\end{align}
This sum is over lattice points \((d,k)\) where \(d,k\) are postive integers such that \(dk \leq x\text{,}\) i.e., lying on or underneath the hyperbola \(dk = x\) in the \(dk\)-plane. We separate the region under the hyperbola into three parts as follows: the first part is defined by \(d \leq \sqrt{x}\text{,}\) the second is defined by \(k \leq \sqrt{x}\text{,}\) and the third is the intersection of the first two, so \(d, k \leq \sqrt{x}\) (both). Visually, if \(d\) is the horizontal coordinate and \(k\) is the vertical coordinate, then the region under the hyperbola with \(d \leq \sqrt{x}\) is the “upward” branch, the region under the hyperbola with \(k \leq \sqrt{x}\) is the “rightward” branch, and the region with both \(d,k \leq \sqrt{x}\) is a square. Define \(S_1,S_2,S_3\) as the sums over lattice points in these regions:
\begin{equation}
S_1 = \sum_{dk \leq x, d \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \frac{1}{\sqrt{k}},
\qquad
S_2 = \sum_{dk \leq x, k \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \frac{1}{\sqrt{k}},
\qquad
S_3 = \sum_{dk \leq x, d \leq \sqrt{x}, k \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \frac{1}{\sqrt{k}}.\tag{7.7.9}
\end{equation}
We have
\begin{equation}
A(x) = S_1 + S_2 - S_3.\tag{7.7.10}
\end{equation}
Now our goal is to approximate the \(S_i\text{.}\) Looking ahead, we can expect to encounter certain sums, so it will be helpful to recall the following approximations:
\begin{equation}
\sum_{k \leq y} \frac{1}{k^s} = \frac{y^{-s+1}}{-s+1} + O(1)\tag{7.7.11}
\end{equation}
and
\begin{equation}
\sum_{d \leq z} \frac{\chi(d)}{d^s} = L(s,\chi) + O\left(\frac{1}{z^s}\right)\text{,}\tag{7.7.12}
\end{equation}
both of these holding for all \(0 \lt s \lt 1\text{.}\) (The textbook mentions a more accurate approximation for the sum of \(1/k^s\) that can be found by using Euler summation.) We will use them for \(s = \frac{1}{2}\text{.}\) In order to avoid headaches about fractions, here are explicit statements:
\begin{equation}
\sum_{k \leq y} \frac{1}{\sqrt{k}} = \frac{y^{1/2}}{1/2} + O(1) = 2\sqrt{y} + O(1)\tag{7.7.13}
\end{equation}
and
\begin{equation}
\sum_{d \leq z} \frac{\chi(d)}{\sqrt{d}} = L(1/2,\chi) + O\left(\frac{1}{\sqrt{z}}\right)\text{.}\tag{7.7.14}
\end{equation}
We will apply these with various \(y\)’s and \(z\)’s; warning, sometimes we will use, for example, \(y = \sqrt{x}\) in which case \(\sqrt{y} = x^{1/4}\) (similar for \(z\)).
Now, here are the approximations of the \(S_i\text{.}\) The easiest is \(S_3\text{:}\)
\begin{align}
S_3 \amp = \left( \sum_{d \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \right)
\left( \sum_{k \leq \sqrt{x}} \frac{1}{\sqrt{k}} \right) \tag{7.7.15}\\
\amp = (L(1/2,\chi) + O(1/x^{1/4})) (2x^{1/4} + O(1)) \tag{7.7.16}\\
\amp = 2x^{1/4} L(1/2,\chi) + O(1) \tag{7.7.17}
\end{align}
Next, we approximate \(S_1\text{:}\)
\begin{align}
S_1 \amp = \sum_{d \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \sum_{k \leq \frac{x}{d}} \frac{1}{\sqrt{k}} \tag{7.7.18}\\
\amp = \sum_{d \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \left(2\sqrt{x/d} + O(1) \right) \tag{7.7.19}\\
\amp = 2\sqrt{x} \sum_{d \leq \sqrt{x}} \frac{\chi(d)}{d} + O(1) \sum_{d \leq \sqrt{x}} \frac{\chi(d)}{\sqrt{d}} \tag{7.7.20}\\
\amp = 2\sqrt{x} (L(1,\chi) + O(1/\sqrt{x})) + O(1)(L(1/2,\chi) + O(1/x^{1/4})) \tag{7.7.21}\\
\amp = 2 \sqrt{x} L(1,\chi) + O(1) \tag{7.7.22}
\end{align}
(For some reason, the textbook uses more accurate approximations here and does extra work, to arrive at the same result in the end.) Finally, \(S_2\) is similar to \(S_1\text{:}\)
\begin{align}
S_2 \amp = \sum_{k \leq \sqrt{x}} \frac{1}{\sqrt{k}} \sum_{d \leq \frac{x}{k}} \frac{\chi(d)}{\sqrt{d}} \tag{7.7.23}\\
\amp = \sum_{k \leq \sqrt{x}} \frac{1}{\sqrt{k}} (L(1/2,\chi) + O(1/\sqrt{x/k})) \tag{7.7.24}\\
\amp = L(1/2,\chi) \sum_{k \leq \sqrt{x}} \frac{1}{\sqrt{k}} + O(1/\sqrt{x}) \sum_{k \leq \sqrt{x}} \frac{1}{\sqrt{k}} O(\sqrt{k}) \tag{7.7.25}\\
\amp = L(1/2,\chi) (2x^{1/4} + O(1)) + O(1/\sqrt{x}) O(\sqrt{x}) \tag{7.7.26}\\
\amp = 2x^{1/4} L(1/2,\chi) + O(1) \tag{7.7.27}
\end{align}
Putting it all together:
\begin{align}
A(x) \amp = S_1 + S_2 - S_3 \tag{7.7.28}\\
\amp = (2 \sqrt{x} L(1,\chi) + O(1)) + (2 x^{1/4} L(1/2,\chi) + O(1)) - (2x^{1/4}L(1/2,\chi) + O(1)) \tag{7.7.29}\\
\amp = 2 \sqrt{x} L(1,\chi) + O(1) \tag{7.7.30}
\end{align}
which proves the claim.