Raymour said:
I would still really like to know how to properly solve this with integration, however.
Here what would be my method.
Integrating a constant acceleration to find velocity:
$$dv = adt$$
$$\int_{v_0}^{v}dv = \int_{t_0}^{t}adt$$
$$v - v_0 = a (t - t_0)$$
So you have an equation for ##v##:
$$v = v_0 + a (t - t_0)$$
Integrating velocity to find the distance:
$$dx = vdt$$
$$\int_{x_0}^{x}dx = \int_{t_0}^{t}(v_0 + at - at_0)dt$$
$$x - x_0 = v_0 t + \frac{1}{2}at^2 - at_0 t - (v_0 t_0 + \frac{1}{2}at_0^2 - at_0 t_0)$$
So you have an equation for the distance traveled ##x - x_0##:
$$x - x_0 = (v_0 - at_0) (t - t_0) + \frac{1}{2}a(t^2 - t_0^2)$$
With those equations, you can use them with the actual numbers on the graph for the time (0 &10, 10 & 15, 15 & 20).
Now, the distance traveled for ##t = 0## to ##t = 20## is:
$$\int_{x_0}^{x_{20}}dx = \int_{x_0}^{x_{10}}dx + \int_{x_{10}}^{x_{15}}dx + \int_{x_{15}}^{x_{20}}dx$$
We already know the solution of ##\int dx## when the acceleration is constant for each part, so:
$$\begin{aligned}
x_{20} - x_0 =& (v_0 - (2) t_0) (t_{10} - t_0) + \frac{1}{2}(2)(t_{10}^2 - t_0^2)\\
&+ (v_{10} - (0) t_{10}) (t_{15} - t_{10}) + \frac{1}{2}(0)(t_{15}^2 - t_{10}^2)\\
&+ (v_{15} - (-3) t_{15}) (t_{20} - t_{15}) + \frac{1}{2}(-3)(t_{20}^2 - t_{15}^2)\\
x_{20} - x_0 =& ((0) - (2)(0)) ((10) - (0)) + \frac{1}{2}(2)((10)^2 - (0)^2)\\
&+ ((20) - (0)(10)) ((15) - (10)) + \frac{1}{2}(0)((15)^2 - (10)^2)\\
&+ ((20) - (-3)(15)) ((20) - (15)) + \frac{1}{2}(-3)((20)^2 - (15)^2)\\
x_{20} - x_0 =&\ 4 + 100 + 62.5 \\
x_{20} - x_0 =&\ 166.5
\end{aligned}$$