If
![\displaystyle g(x) = \int_0^x f(t) \, dt](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%28x%29%20%3D%20%5Cint_0%5Ex%20f%28t%29%20%5C%2C%20dt)
then g(x) gives the signed area under f(x) over a given interval starting at 0.
In particular,
![\displaystyle g(0) = \int_0^0 f(t) \, dt = 0](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%280%29%20%3D%20%5Cint_0%5E0%20f%28t%29%20%5C%2C%20dt%20%3D%200)
since the integral of any function over a single point is zero;
![\displaystyle g(4) = \int_0^4 f(t) \, dt = 8](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%284%29%20%3D%20%5Cint_0%5E4%20f%28t%29%20%5C%2C%20dt%20%3D%208)
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;
![\displaystyle g(8) = \int_0^8 f(t) \, dt = 0](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%288%29%20%3D%20%5Cint_0%5E8%20f%28t%29%20%5C%2C%20dt%20%3D%200)
since the area over [4, 8] is the same as the area over [0, 4], but on the opposite side of the t-axis;
![\displaystyle g(12) = \int_0^{12} f(t) \, dt = -8](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%2812%29%20%3D%20%5Cint_0%5E%7B12%7D%20f%28t%29%20%5C%2C%20dt%20%3D%20-8)
since the area over [8, 12] is the same as over [4, 8], but doesn't get canceled;
![\displaystyle g(16) = \int_0^{16} f(t) \, dt = 0](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%2816%29%20%3D%20%5Cint_0%5E%7B16%7D%20f%28t%29%20%5C%2C%20dt%20%3D%200)
since the area over [12, 16] is the same as over [0, 4], and all together these four triangle areas cancel to zero;
![\displaystyle g(20) = \int_0^{20} f(t) \, dt = 24](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%2820%29%20%3D%20%5Cint_0%5E%7B20%7D%20f%28t%29%20%5C%2C%20dt%20%3D%2024)
since the area over [16, 20] is a trapezoid with "bases" 4 and 8, and "height" 4, hence area (4 + 8)/2 • 4 = 24;
![\displaystyle g(24) = \int_0^{24} f(t) \, dt = 64](https://tex.z-dn.net/?f=%5Cdisplaystyle%20g%2824%29%20%3D%20%5Cint_0%5E%7B24%7D%20f%28t%29%20%5C%2C%20dt%20%3D%2064)
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.