# How to find the value of this summation equation?

The question is:

$$\sum_{i=1}^n (i^2+3i+4)$$

I get that

$$\sum_{i=1}^n i^2 = \frac{n(n+1)(n+2)}{6}$$ and $$3\sum_{i=1}^n i = \frac{3n(n+1)}{2}$$ so one would get

I'll call this form1: $$\frac{n(n+1)(n+2)}{6} + \frac{3n(n+1)}{2} + 4n$$

However, the textbook that I using says the answer is:

I'll call this form2: $$\frac{n(n^2+6n+17)}{3}$$

So the part I am confused with is the steps in between form1 and form2.

On a last note it been a good year since I've done any calculus so it would appreciated if you would point the relevant concepts so I can review. Thanks.

• While you're editing things, you can remove that summation sign from the fourth line. Have you tried factoring out an $n$ and putting everything over a common denominator? – Mike Jan 12 '15 at 2:34

There are several mistakes. Below is the clarification.

$$\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$$ $$\sum_{i=1}^n i = \frac{n(n+1)}{2}$$ $$\sum_{i=1}^n 1 = n$$

Hence

\begin{align} \sum_{i=1}^n (i^2+3i+4) & = \sum_{i=1}^n i^2 + 3 \sum_{i=1}^n i + 4\sum_{i=1}^n 1\\ & = \frac{n(n+1)(2n+1)}{6} + 3\frac{n(n+1)}{2} + 4n \\ & = \frac{n}{6}(2n^2 + 3n + 1 + 9n + 9 + 24)\\ & = \frac{n}{6}(2n^2 + 12n + 34)\\ & = \frac{n}{3}(n^2 + 6n + 17) \end{align}

Here's your mistake: $$\sum_{i=1}^ni^2=\frac{n(n+1)(2n+1)}{6}$$

• No sorry it was just typo. However, the fix has been made. – Asterisk Jan 12 '15 at 2:30

The last term $4$ should be $4n$, because you are adding $4$ for $n$ times.

• While you absolutely correct and that mistake is my fault but that is not the part I am getting confused with I will update the question so it more clearer what I want. – Asterisk Jan 12 '15 at 2:34

$$\sum_{k\le n} c=cn\neq c$$ In your example, $\displaystyle\sum 4=4n,$ yet you wrote $4$.

EDIT: $$\frac{n(n+1)(n+2)}{6} + \frac{3n(n+1)}{2} + 4n = n(n^2+6n+17)/3$$ $$\frac{n(n+1)(n+2)}{2} + \frac{9n(n+1)}{2} + 12n = n^3+6n^2+17n$$ $$\frac{n^3+3n^2+2n}{2} + \frac{9n^2+9n}{2} = n^3+6n^2+5n$$ $${n^3+3n^2+2n} + {9n^2+9n}= 2n^3+12n^2+10n$$ $${2n} + {9n}= n^3+10n$$ $$1\neq n^2$$ Therefore one of them is incorrect. We see that you messed up on $\sum i^2$, it equals $\frac{n(n+1)(2n+1)}{6}$