The "integral" or, in this case, the distance moved given a velocity vs time graph is the area between the curve and the xaxis. That can be very difficult to calculate for many curves and required the invention of "integral caculus". But here, the graph is given as straight lines, horizontal or from one vertex of a square to the diagonally opposite vertex. The "area under the graph" is always made of whole squares, with area 1, or half squares, with area 1/2.
From 2 to 2.5 seconds, I see a stack of 7 whole squares and one half square: that area is 7.5. From 2.5 to 3.0, I see a stack of 6 whole squares and one half square: area 6.5. From 3.0 to 3.5, I see a stack of 4 whole squares and 2 partial squares. Neither of the partial squares is exactly a half but since the graph goes from the upper left vertex of the upper square to the lower right vertex of the lower square it cuts those two squares in half (1/2)(2)= 1. The area is 4+ 1= 5. From 3.5 to 4, I see 2 whole squares and then two partials: 2+ 1= 3. From 4 to 4.5 I see one whole and one half square: 1.5. From 4.5 to 5, I see a half square: .5. So far that is an "area under the curve" or 7.5+ 6.5+ 5+ 3+ 1.5+ .5= 23.0. During that time, from 2 to 5 seconds, the object has moved, to the right, 23.0 meters.
After 5 seconds, the velocity becomes negative which means it has started moving back to the left. From 5 to 5.5 seconds, I see 2 partial squares: (1/2)(2)= 1 but since this is below the taxis, that is 1. From 5.5 to 6 seconds, I see a total of two full squares and four partial squares but because the graph is from one vertex to another, that is a total area of 2+ (1/2)(4)= 4. Again, because it is below the taxis, that is 4. From 6 to 6.5 seconds, I see 6 whole squares and half of one square for a total of 6.5 squares: 6.5. From 6.5 to 7 seconds, I see 7 whole squares and half of one square for a total of 7.5 squares. Since it is below the taxis, that is 7.5. Finally, from 7 to 7.5 seconds and from 7.5 to 8 seconds, I see 8 whole squares for a total of 16 between 7 and 8 seconds. Again, that is 16 since it is below the taxis. From t= 5 to t= 8, that is a total of 1 4 6.5 7.5 16= 35. Between t= 5 and t= 8 seconds the object has moved 35 meters back to the left. The "displacement", the actual signed distance from the starting point to the end point, is 23 35= 12. The object ends up 12 meters to the left of its starting point.
