# Please explain how find a and b if n^2+an+b is sum of n terms in arithmetic seq.? first term=2

*print*Print*list*Cite

### 2 Answers

You should remember that the sum of n terms of arithmetic progression is given by the following formula such that:

`S_n = (a_1 + a_n)*n/2`

The problem provides the information that the first term is `a_1 = 2` . It also provides the information that the sum of n terms is `S_n = n^2 + an + b` .

You need to find the term a_n such that:

`a_n = S_n - S_(n-1)`

`a_n = n^2 + an + b- (n - 1)^2- a(n-1) - b`

Reducing the equal terms yields:

`a_n = n^2 + an - n^2 + 2n - 1 - an + a`

`a_n = 2n + a - 1`

You need to substitute 2 for `a_1` and `2n + a - 1` for `a_n` in the formula of sum of n terms such that:

`S_n = (2 + 2n + a - 1)*n/2`

`S_n = (1 + 2n + a)*n/2`

You should know that `a_1 = S_1 = 2` , hence, substituting 1 for n in the equation `S_n = n^2 + an + b` yields:

`S_1 = 1^2 + a + b => a + b + 1 = 2 => a + b = 1 => a = 1 - b`

`S_n = (1 + 2n + 1 - b)*n/2`

`S_n = (2n + 2 - b)*n/2`

You need to set equal the equations that give `S_n` such that:

`(2n + 2 - b)*n/2 = n^2 + an + b`

You need to substitute `1-b` for a in the equation to the right such that:

`(2n + 2 - b)*n/2 = n^2 + (1-b)n + b`

`2n^2 + 2n - bn = 2n^2 + 2(1-b)n + 2b`

`2n^2 + (2 - b)n = 2n^2 + 2(1-b)n + 2b`

`2 - b =2 - 2b => 2b - b = 0 => b = 0`

`a = 1 - b => a = 1`

**Hence, evaluating a, b under the given conditions yields `a = 1, b = 0.` **

to find a sum we must have two things,

i) first term (a1)

ii) common difference (d)

(i) is given and is a1 = 2.

to find out (ii) a nice way will be this:

let,

S(n) = n^2 + a n + b ---------------------(1)

is a sum of "n" numbers, then

This in terms of first term "a1" and common difference "d" is given by

S(n) = (n/2) [ 2 a1 + (n-1)d] ----------------------(2)

and so

S(n+1) = [(n+1)/2] [ 2 a1 + n*d]

So,

S(n+1) - S(n) = a1 + nd/2 + nd/2 = a1 + n*d

=> d = (1/n) * [S(n+1) - S(n) - a1]

= (1/n) * [ (n+1)^2 + a (n+1) + b - n^2 - a n - b - 2 ]

= (1/n) * [ 2*n + a - 1] ---------(3)

for n = 2

d = (1/2) * [2*2 + a - 1]

= (1/2) * [ 3 + a] -------------------(4)

One useful thing is that, if we put n = 1 then we must get the first term,

that is

a1 = S(1) = 1^2 + a*1 + b

=> 2 = 1 + a + b

=> a + b = 1

Let us now use (4) and equate (1) and (2) and do it for n = 2:

2^2 + a 2 + b = (1/2) [ 2 a1 + (2-1)d]

=> 4 + 2 a + b = (1/2) [ 2 * 2 + (1/2) * (3 + a) ]

=> 4 + 2a + 1 - a = (1/2) [ 4 + (1/2) * (3 + a) ] using a+b =1

=> 5 + a = 2 + 3/4 + a/4

=> a = -3

and as

a+b =1

=> - 3 + b = 1

=> b = 4

Therefore

a= - 3, b = 4