We are given that f(r)=ar+b, and Sum f(r) =125 for r=1 to 5 Sum f(r) = 475 for r=1 to 10.
and we know, using Gauss's method, that G(n)=sum (1,2,3.....n) = n(n+1)/2 or G(n)=n(n+1)/2
Sum f(r) =125 for r=1 to 5 => sum=a(sum of 1 to 5) + 5b => G(5)a+5b=125 [G(5)=15] 15a+5b=125 ...................................................(1)
Similarly, Sum f(r) = 475 for r=1 to 10 => G(10)a+5b=475 [G(10)=55] => 55a+10b=475.................................................(2)
Solve system of equations (1) and (2) (2)-2(1) 55-2(15)a=475-2(125) => 25a=225 => a=9
Substitute a=9 in 1 => 15(9)+5b=125 => 5b=-10 b=-2
Substitute a and b into f(r), f(r)=9r-2 check: sum f(r), r=1,5 = (9-2)+(18-2)+(27-2)+(36-2)+(45-2)=135-10=125 [good]
We define the sum of f(r) for r=1 to n as S(n)=sum f(r) for r=1 to n = 9(sum 1,2,3....n)-2n = 9n(n+1)/2-2n = 9G(n)-2n S(n)=9n(n+1)/2-2n checks: S(5)=9(15)-2(5)=135-10=125 [good] S(10)=9(55)-2(10)=495-20=475 [good]