Question concerning big O 
$\sum\limits_{i=1}^n(3i+2n)$ is $O(n^2)$

How do I solve this? I know that the answer for $\sum\limits_{i=1}^n(3i+2n)$ would be 
$$\sum\limits_{i=1}^n(3i+2n)=\sum\limits_{i=1}^n3i+\sum\limits_{i=1}^n2n=3\sum\limits_{i=1}^ni+2n\sum\limits_{i=1}^n1=3\frac{n(n+1)}{2}+2n\cdot n=3\frac{n(n+1)}{2},$$ but how do I solve $\sum\limits_{i=1}^n(3i+2n)$ is $O(n^2)$ ?
 A: You want to show that there exists some real number $C$ such that $\sum\limits_{i=1}^n(3i+2n)\leq Cn^2$ for sufficiently large $n$. Try splitting this up as
$$\sum\limits_{i=1}^n(3i+2n)=\sum\limits_{i=1}^n3i+\sum\limits_{i=1}^n2n=3\frac{n(n+1)}{2}+2n^2$$
and observe that $\frac{n(n+1)}{2}=\frac{n^2+n}{2}\leq \frac{2n^2}{2}=n^2$, so using $C=5$ works.
A: A very fast way to show the result is: 
$$\sum\limits_{i=1}^n(3i+2n)\leq \sum\limits_{i=1}^n 5n=5n^2 =O(n^2)$$
A: We are interested in estimating $\sum_{i=1}^n (3i+2n)$. This is equal to 
$$\sum_{i=1}^n 3i+\sum_{i=1}^n 2n.$$
The second sum is the sum of $n$ terms, each of which is $2n$. So the second sum is $2n^2$.
For the first sum, we can get an exact expression, as in your work. But let's not work so hard. We have a sum of $n$ terms, each of which is $\le 3n$. So $\sum_{i=1}^n 3i\le 3n^2$.
Thus our original sum is $\le 5n^2$.  We could have done this in one step by noting that $3i+2n\le 5n$ for all $i\le n$. 
So there is a constant $C$, namely $5$, such that our sum is $\le Cn^2$ for all $n$. That ends the proof.
Remark: In this case, by using the standard formula for $\sum_{i=1}^n i$, we can get a "better" constant than $5$. But it can save a lot of work if one notices when a crude estimate is good enough.
