I am studying inequality (8.11) from Analytic Number Theory by Iwaniec and Kowalski. It is found on top of page 200. In bottom of page 199, the authors prove that $$ |S_f(N)|^2 \leq N + \frac{2N^2}{q} + 4(N+q)\log(q). $$ They claim that using the last inequality and the trivial bound $ |S_f(N)| \leq N $, (8.11) follows, namely $$ |S_f(N)| \leq2\frac{N}{\sqrt{q}} + \sqrt{q}\log(q). $$ where $ S_f(N) = \sum_{n=1}^N e^{\alpha n^2 + \beta n}, $ where $ \alpha $ and $ \beta $ are constants. also $ \left| 2\alpha - \frac{a}{q} \right| \leq \frac{1}{2Nq}, $ where $(a, q) = 1$ and $1 \leq q \leq 2N$.
I am having trouble fully understanding the derivation and implications of this result. Here's my attempt at breaking it into cases:
My Attempts
- Case A: If $ q \leq 4 $: $$ \min\left(\sqrt{N + \frac{2N^2}{q} + 4(N+q)\log(q)}, N\right) \leq N \leq \frac{2N}{\sqrt{q}}. $$ This appears consistent with (8.11).
- Case B: If $ N \leq \sqrt{q}\log(q) $: $$ \min\left(\sqrt{N + \frac{2N^2}{q} + 4(N+q)\log(q)}, N\right) \leq N \leq \sqrt{q}\log(q). $$ This seems to hold as well.
- Case C: If $ e^4 \leq q $: $$ \min\left(\sqrt{N + \frac{2N^2}{q} + 4(N+q)\log(q)}, N\right) \leq \sqrt{N + \frac{2N^2}{q} + 4(N+q)\log(q)}. $$ Using the fact that $ q \leq 2N $, I verified: $$ \frac{2N^2}{q} \leq 2N, \quad \text{and} \quad 4q\log(q) \leq q(\log(q))^2 \quad \text{if } e^4 \leq q. $$ This seems consistent with (8.11).
- Case D: Otherwise: I used MATLAB to check some examples numerically, but I found counterexamples that seem to violate (8.11). Below is the MATLAB code and output:
MATLAB Code and Results
% Parameters
q_min =5 ; % Minimum value of q
q_max = exp(4); % Maximum value of q
N=1:100; % Minimum value of N as a function of q
% Initialize variables
violations = []; % Store counterexamples
for q = q_min:floor(q_max) % q as an integer
for N = ceil(N_min(q)):floor(2*q) % Ensure N satisfies q <= 2N
% Compute LHS and RHS
LHS = min(sqrt(N + 2*N^2/q + 4*(N + q)*log(q)),N);
RHS = 2*N/sqrt(q) + sqrt(q)*log(q);
% Check if inequality is violated
8
if LHS > RHS
% Record counterexample
violations = [violations; q, N, LHS, RHS];
end
end
end
% Display results
if isempty(violations)
fprintf(’The inequality holds for all valid (q, N) pairs.\n’);
else
fprintf(’The inequality is violated for the following cases:\n’);
disp(’ q N LHS RHS’);
disp(violations);
end
The results
The inequality is violated for the following cases:
q N LHS RHS
13.0000 21.0000 20.9208 20.8968
14.0000 22.0000 21.7064 21.6339
15.0000 22.0000 22.0000 21.8490
15.0000 23.0000 22.4757 22.3654
16.0000 23.0000 22.8396 22.5904
16.0000 24.0000 23.2296 23.0904
16.0000 25.0000 23.6184 23.5904
17.0000 23.0000 23.0000 22.8383
17.0000 24.0000 23.5884 23.3233
17.0000 25.0000 23.9689 23.8084
17.0000 26.0000 24.3483 24.2935
18.0000 24.0000 23.9496 23.5765
18.0000 25.0000 24.3226 24.0479
18.0000 26.0000 24.6945 24.5193
18.0000 27.0000 25.0653 24.9907
19.0000 24.0000 24.0000 23.8465
19.0000 25.0000 24.6781 24.3053
19.0000 26.0000 25.0431 24.7641
19.0000 27.0000 25.4070 25.2230
19.0000 28.0000 25.7698 25.6818
20.0000 25.0000 25.0000 24.5777
20.0000 26.0000 25.3932 25.0249
20.0000 27.0000 25.7507 25.4721
20.0000 28.0000 26.1071 25.9193
20.0000 29.0000 26.4625 26.3665
20.0000 30.0000 26.8169 26.8137
21.0000 25.0000 25.0000 24.8626
Results showed cases where the inequality failed, especially for certain ( N, q ) values.
Question:
- Could someone clarify the derivation and logic leading to (8.11)?
- Are there additional conditions (perhaps implicit) required for (8.11) to hold?
- If counterexamples exist for $ N, q $, what might explain this discrepancy?
Any insights or guidance would be appreciated. Thank you!