# Find a formula for $\sum_{i=1}^n (2i-1)^2 = 1^2+3^2+....+(2n-1)^2$

Consider the sum $$\sum_{i=1}^n (2i-1)^2 = 1^2+3^2+...+(2n-1)^2.$$

I want to find a closed formula for this sum, however I'm not sure how to do this. I don't mind if you don't give me the answer but it would be much appreciated. I would rather have a link or anything that helps me understand to get to the answer.

EDIT: I Found this question in a calculus book so I don't really know which tag it should be.

• The statement itself is wrong to begin with. $\displaystyle \sum_{i=1}^n (2i-1)^2 = 1^2+3^2+5^2+\cdots+(2n-1)^2$.
– DHMO
Apr 12 '17 at 14:15
• hmm..what do you mean? Apr 12 '17 at 14:18
• (2n-1) is odd integer if n is integer. Apr 12 '17 at 14:19
• Also, it should end on $(2n-1)^2$ and not $(2i-1)^2$ which makes no sense. Apr 12 '17 at 14:20
• What @DHMO is saying is that $i$ is defined only within the sum. Therefore, it can't appear on the RHS. Instead, the RHS should have only the variable $n$. Apr 12 '17 at 14:20

Hint: $\sum_{i=1}^ni^2=\frac{n(n+1)(2n+1)}{6}$ and $\sum_{i=1}^ni=\frac{n(n+1)}{2}$. And last but not least $$(2i-1)^2=4i^2-4i+1.$$

Edit: Let's prove that $\sum_{i=1}^ni=\frac{n(n+1)}{2}$. We proceed by induction on $n$. If $n=1$ the statement is trivial. Now suppose the statement holds for $n\geq 1$. Then \begin{eqnarray}\sum_{i=1}^{n+1}i&=&\sum_{i=1}^ni+(n+1)\\ &=&\frac{n(n+1)}{2}+(n+1)\\ &=& (n+1)(\frac{n}{2}+1)\\ &=& \frac{(n+1)(n+2)}{2}.\end{eqnarray} Here we used the induction hypothesis in the second equation. This proves the statement by induction. You can prove the other formula in a similar fashion.

• $\frac{4n(n+1)(2n+1)}{6} - \frac{4n(n+1)}{2} + n$ will it look something like this? and where can i learn about these formulas etc. Apr 12 '17 at 14:29
• Yes, if you work it out you should get $\frac{1}{3}n(4n^2-1).$ I'll edit my answer and show you how to prove one the formulas. Apr 12 '17 at 14:34

hint

We have

$$1^2+3^2+5^2+... (2n-1)^2=$$

$=\sum$ odd$^2$=$\sum$ all$^2$-$\sum$even$^2=$

$$\sum_{k=1}^{2n} k^2-(2^2+4^2+...4n^2)=$$

$$\sum_{k=1}^{2n}k^2-4\sum_{k=1}^n k^2=$$

$$\boxed {\color {green}{\frac {n(4n^2-1)}{3}}}$$

for $n=2$, we have $10$ , for $n=3$, we find $35$ and for $n=4$, it is $84$.

• i don't understand how you got to $\sum_1^{2n} k^2-(2^2+4^2+...4n^2)=$ Apr 12 '17 at 14:38
• plus what does $\sum_1^{2n}$ this even mean. How can it be 2n isnt it essentially just n Apr 12 '17 at 14:40
• @TomHarry I edited it . now it is clear. Apr 12 '17 at 14:43
• doesn't sigma all^2 = $\sum_{k=1}^{n} k^2$ and if so why do u have $\sum_{k=1}^{2n} k^2$ Apr 13 '17 at 16:05

Hint: Write $f(n) = \sum_{i=1}^n (2i-1)^2$. You can start by hypothesizing that the sum of squares is a cubic $f(n) = an^3 + bn^2 + cn + d$ (as a sort of discrete analogy with the integration formula $\int x^2\, dx = x^3/3 + C$). Then $(2n+1)^2 = f(n+1) - f(n) = a (3n^2 + 3n + 1) + b(2n + 1) + c$, which gets you the constants $a, b, c$, and you can find $d$ from $f(1) = 1$. Verifying this formula is an easy proof by induction.

\begin{align} \sum_{i=1}^n (2i-1)^2 &=\sum_{i=1}^n \binom {2i-1}2+\binom {2i}2&&\text(*)\\ &=\sum_{r=0}^{2n}\binom r2\color{lightgrey}{=\sum_{r=2}^{2n}\binom r2}\\ &=\color{red}{\binom {2n+1}3}&& \text(**)\\ &\color{lightgrey}{=\frac {(2n+1)(2n)(2n-1)}6}\\ &\color{lightgrey}{=\frac 13 n(2n-1)(2n+1)}\\ &\color{lightgrey}{=\frac 13 n(4n^2-1)} \end{align}

*Note that $\;\;\;R^2=\binom R2+\binom {R+1}2$.
**Using the Hockey-stick identity