How do I get from $\int_{x_0}^{x} \int_{x_0}^{t}f(s)ds dt$ to $[t\int_{x_0}^tf(s)ds]|^x_{x_0} - \int_{x_0}^x tf(t)dt$?
At least, that's what it looks like from the brief solution given in my book. I've filled two pages with scrawls and scribbles and I still can't figure out the logic that goes behind the working! Why is it a minus? Why are the terms composed this way?
I think the first term, $[t\int_{x_0}^tf(s)ds]|^x_{x_0}$, is derived by taking the inner integral as a constant term wrt t, hence the inner integral is multiplied by a t, and the product is then computed from $x_0$ to $x$ to get $x\int_{x_0}^xf(t)dt$. But even if I understand how the term is derived, I still wouldn't know how to explain why we do this step if I had to explain to another student.
I don't understand how to derive the second term. Is the minus sign because the inner integral goes from $x_0$ to $t$? Would it be a plus if it went from $t$ to $x_0$? And then there's the composition of terms in $\int_{x_0}^x tf(t)dt$, how do I get that? Why are they like that? Arghh!
My patchy understanding at this moment is that in the first term I handle/solve the outer integral by fixing the contents as constant and computing the anti-derivative from $x_0$ to $x$. Then in the second term I retain the outer integral while I handle the inner integral. But the problem with my understanding is that when given another problem, I still second guess my working (and they turn out wrong) :( Help please?