[Math] Formula for sum of first $n$ odd integers

inductionsummation

I'm self-studying Spivak's Calculus and I'm currently going through the pages and problems on induction. This is my first encounter with induction and I would like for someone more experienced than me to give me a hint and direction.
The first problem is as follows:

Find a formula for $$\sum_{i=1}^n(2i-1)=1+3+5+…+(2n-1)$$
And the related following problem:

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

The given hints are: "What do these expressions have to do with $1+2+3+…+2n$ and $1^2+2^2+3^2+…+(2n)^2$?"

I recognize that the above sums are the sum of all the odd integers from $1$ to $n$ and the sum of all the squares of the odd integers from $1$ to $n$, respectively. My question is, in problems like these does one just do a bunch of trial and error, as I have done for quite a while now, or is there a more clever way to go about it?

Best Answer

There is a simple rule: For any arithmetic progression, that is any series where the difference between consecutive elements is constant, the sum is equal to the number of elements, multiplied by the average between the first and the last element.

In your case, the first element is 1, the last element is 2n - 1, the average is n, there are n elements, therefore the sum is $n^2$.