If
[tex]\displaystyle g(x) = \int_0^x f(t) \, dt[/tex]
then g(x) gives the signed area under f(x) over a given interval starting at 0.
In particular,
[tex]\displaystyle g(0) = \int_0^0 f(t) \, dt = 0[/tex]
since the integral of any function over a single point is zero;
[tex]\displaystyle g(4) = \int_0^4 f(t) \, dt = 8[/tex]
since the area under f(x) over the interval [0, 4] is a right triangle with length and height 4, hence area 1/2 • 4 • 4 = 8;
[tex]\displaystyle g(8) = \int_0^8 f(t) \, dt = 0[/tex]
since the area over [4, 8] is the same as the area over [0, 4], but on the opposite side of the t-axis;
[tex]\displaystyle g(12) = \int_0^{12} f(t) \, dt = -8[/tex]
since the area over [8, 12] is the same as over [4, 8], but doesn't get canceled;
[tex]\displaystyle g(16) = \int_0^{16} f(t) \, dt = 0[/tex]
since the area over [12, 16] is the same as over [0, 4], and all together these four triangle areas cancel to zero;
[tex]\displaystyle g(20) = \int_0^{20} f(t) \, dt = 24[/tex]
since the area over [16, 20] is a trapezoid with "bases" 4 and 8, and "height" 4, hence area (4 + 8)/2 • 4 = 24;
[tex]\displaystyle g(24) = \int_0^{24} f(t) \, dt = 64[/tex]
since the area over [20, 24] is yet another trapezoid, but with bases 8 and 12, and height 4, hence area (8 + 12)/2 • 4 = 40, which we add to the previous area.