I'm being introduced to the Big-O notation via Susanna Epp's Discrete Mathematics with Appplications 3rd edition. The following defintion is stated on page 519:
Let f and g be real-valued functions defined on the same set of nonnegative real numbers. Then f is of order at most h, written f is O(h), if, and only if, there exist a positive real number A and a nonnegative real number a such that |f| ≤ A|h| for all real numbers x > a.
And the following theorem is given on page 521:
If f is O(h) and g is O(k), then f+g is O(max(|h|, |k|)) for each x in the domain of the functions.
The proof is left as an exercise, and unfortunately I'm unable to derive the theorem. Instead, I'm getting f+g is O(A |h| + B |k|) which is O(|h| + D |k|).
I feel that I'm misunderstanding the topic, but am unable to see how. Can someone help me please?