Brilliant.org has a module on classical mechanics and I'm having difficulty with a mathematical step. They want you to represent position in terms of acceleration and then to solve the double integral involved.
The initial conditions and subsequent calculation of the integral are given as follows:
If [a motorcycle] starts from rest at $r(t_i)$, we can set $v(t_i)$ to zero. And since acceleration is constant, we can write $a(t) = a_0$.
Then,
$r(t_f)$ = $r(t_i)$ + $\int_{t_i}^{t_f}$$(\int_{t_i}^{t}$$a_0dt^{'})dt$
= $r(t_i)$ + $a_0$$\int_{t_i}^{t_f}$$(t-t_i)dt$
= $r(t_i)$ + $\frac 12$$a_0$$(t_f-t_i)^2$
How did we get from line 2 to line 3? I can see how we obtain this result using u-substitution, but a straightforward integration seems to produce the extraneous terms $-t_it_f$ and $+t_it_i$. I assumed putting these to zero might have to do with the initial condition of zero velocity, but on the next page a case with non-zero initial velocity is offered up and the double integral is handled the same and an integral of the velocity term is tacked on. So presumably I'm just not understanding something about the mathematics here.