Statement (taken from here):
Let ${f: {\bf N} \rightarrow {\bf C}}$, ${F: {\bf R}^+ \rightarrow {\bf C}}$ and ${g: {\bf R}^+ \rightarrow {\bf R}^+}$ be functions such that ${g(x) \rightarrow 0}$ as ${x \rightarrow \infty}$. Then the following are equivalent:
(i) One has $$\sum_{y \leq n < x} f(n) = F(x) - F(y) + O( g(x) + g(y) )$$ for all ${1 \leq y < x}$.
(ii) There exists a constant ${c \in {\bf C}}$ such that $$ \sum_{n < x} f(n) = c + F(x) + O( g(x) )$$
for all ${x \geq 1}$. In particular, ${c = -F(1) + O(g(1))}$.
This exercise should be easy I think but for some reason I'm not grokking the use of the big Os.
My attempt:
i) $\rightarrow$ ii)
Set $y = 1$ in i) then you have
$$\sum_{1 \leq n < x} f(n) = F(x) - F(1) + O( g(x) + g(1) )$$
But I get stuck at trying to split the big O on the right side..
ii) $\rightarrow$ i)
Similar idea, but this time subtract up until $y$
$$\sum_{y \leq n < x} f(n) = \sum_{n < x} f(n) - \sum_{n < y} f(n) = $$
and applying ii) we have
$$ c + F(x) + O( g(x) ) - (c + F(y) + O(g(y))$$
Here $c$ cancels, and you get
$$ \sum_{y \leq n < x} f(n) = F(x) - F(y) + O(g(x)) - O(g(y))$$
and my problem becomes justifying joining the subtracting $O(g(y))$ part. I'm pretty sure that you can join $O(g) + O(h)$ into $O(g + h)$ by picking the max of the constants of the first expression but not the other way around
I'd prefer hints over solutions, thank you.
For i) -> ii), define the function
$$ H(x)=\sum_{n<x}f( n)-F(x). $$
Then use i) to conclude that $H(x)\to c$ for some $c$ as $x\to+\infty$. From i), it can also be concluded that
$$ H(x)=c+O(g(x)), $$
so we have
$$ \sum_{n<x}f(n)=F(x)+c+O(g(x)). $$