I was working on a computer programming project that involves 2D drawing on windows OS. I was displaying curves using simple mathematical formulas, and was thinking of filling the part under a curve.
That requires to draw straight lines from x to y. Then I was thinking, summing up those lines make up the area under the curve, which is clearly what an integral in mathematics is, but I was not able to explain one thing.
The length of those lines is the corresponding y's, so basically I would be summing: y1 + y2 + y3 + ...
So, if I have a graph for
y = x, the sum is:
1 + 2 + 3 + . . .
The formula for this sum is clearly
((x * x) + x) / 2, and not
(x * x) / 2.
I don't get it, because the laws of integration tell us that the integral of
x^n is (x ^ (n+1)) / (n+1). How is that so?