Explanation:
looking back at the roots :
what is the sum of r, for r going from 1 to n ?
it is n(n+1)/2 = (n² + n)/2
let's compare this to the result of this given sum :
n² + 4n
n² + 4n = ((n² + n)/2)×2 + 3n
sum(f(r)) = sum(r)×2 + 3n, with r from 1 to n.
sum(r)×2 = sum(2r), with r from 1 to n.
sum(2r) + 3n = sum(2r + 3), with r from 1 to n.
so,
f(r) = 2r + 3
proof :
similar to sum(r) we have
sum(f(r)) = (first term + nth term) × n / 2 =
= (2×1 + 3 + 2n + 3) × n / 2 =
= (2 + 3 + 2n + 3) × n / 2 =
= (2n + 8) × n / 2 = (2n² + 8n)/2 =
= n² + 4n