Question:
How many terms are there in the A.P. whose first and fifth terms are −14 and 2 respectively and the sum of the terms is 40?
Solution:
We have:
$a=-14$ and $S_{n}=40 \ldots$ (i)
$a_{5}=2$
$\Rightarrow a+(5-1) d=2$
$\Rightarrow-14+4 d=2$
$\Rightarrow 4 d=16$
$\Rightarrow d=4$ ...(ii)
Also, $S_{n}=\frac{n}{2}[2 a+(n-1) d]$
$\Rightarrow 40=\frac{n}{2}[2(-14)+(n-1) \times 4] \quad($ From $(\mathrm{i})$ and $(\mathrm{ii}))$
$\Rightarrow 80=n[-28+4 n-4]$
$\Rightarrow 80=4 n^{2}-32 n$
$\Rightarrow n^{2}-8 n-20=0$
$\Rightarrow(n-10)(n+2)=0$
$\Rightarrow n=10,-2$
But, $\mathrm{n}$ cannot be negative.
$\therefore \mathrm{n}=10$