If the first term of an A.P. is \(p\), second term is \(q\), and last term is \(r\), then show that the sum of all terms is
\[
S = (q + r - 2p) \times \frac{(p + r)}{2(q - p)}
\]
Show Hint
For problems involving sums of an A.P., always express the number of terms (\(n\)) using the first, second, and last terms. Then apply \(S_n = \frac{n}{2}(a + l)\).
Step 1: Recall the general form of an A.P.
Let the first term be \(a = p\), the common difference be \(d\), and the last term be \(r\).
Thus,
\[
\text{Second term} = a + d = q
\]
\[
\Rightarrow d = q - p
\]
Step 2: Use the nth term formula.
The nth term of an A.P. is given by
\[
t_n = a + (n - 1)d
\]
Since the last term \(r = a + (n - 1)d\),
\[
r = p + (n - 1)(q - p)
\]
\[
\Rightarrow n - 1 = \frac{r - p}{q - p}
\]
\[
\Rightarrow n = \frac{r - p}{q - p} + 1 = \frac{r - p + q - p}{q - p} = \frac{q + r - 2p}{q - p}
\]
Step 3: Recall the sum of \(n\) terms of an A.P.
\[
S_n = \frac{n}{2}(a + l)
\]
where \(a = p\) and \(l = r\). Step 4: Substitute the values.
\[
S = \frac{1}{2} \times \frac{(q + r - 2p)}{(q - p)} \times (p + r)
\]
Step 5: Simplify.
\[
S = (q + r - 2p) \times \frac{(p + r)}{2(q - p)}
\]
Step 6: Conclusion.
Hence proved that
\[
\boxed{S = (q + r - 2p) \times \frac{(p + r)}{2(q - p)}}
\]