So I am learning ordinary differential equations theory and I have come across the Fredholm alternative and kernel solutions to ODEs. And I have started to think my understanding of how integrals and differentials work is somewhat flawed and needs some rethinking. Here is my problem:
Suppose we are trying to solve the problem $$x''(t) = x(t)$$ subject to $$x(a)=0, x'(a)=0$$ Simple enough, from standard trick of solving DEs, we know $$x=c_1e^x + c_2 e^{-x}$$ solving for $c_1$, $c_2$ is trivial.
But now I run into Fredholm.
Fredholm says, integrate both sides of the equation from $a$ to $t$.
$$x'(t) - x'(a)= \int _{a}^{t} x(\tau) d\tau \implies x'(t) = \int _{a}^{t} x(\tau) d\tau$$
Good so far. Now, I look at the RHS of the above equation and I say that
$$F(t) = \int _{a}^{t} x(\tau) d\tau$$
So,
$$x'(t) = F(t)$$
Straight out of an undergraduate engineering education, I would say
$$x = \int_{a}^t F(t) dt$$
But Fredholm says
$$x(t) = \int_{a}^{s} \int_{a}^t x(\tau) d\tau ds$$ and not
$$x(t) = \int_{a}^{t} \int_{a}^t x(\tau) d\tau ds$$
This is the part that bothers me. Why are the limits going from $a$ to $s$? Shouldn't it be $a$ to $t$, since $x$ is a function of $t$? Isn't $s$ just some dummy variable, with no connection to $t$? Because I know it is bad practice writing
$$I = \int_{a}^{x} f(x) dx$$ because $x$ is a dummy variable and it's more rigorous to write that integral as $$I = \int_{a}^{x} f(t) dt$$
But that is about the extent of my knowledge regarding mathematical formalisms.
Furthermore, he claims that we can switch order of integration, and say
$$x(t) = \int_{a}^{t} \left(\int_{a}^s ds \right) x(\tau) d\tau$$
and then I'd expect it to say $$ \int_{a}^s ds = (s-a)$$ but no, that integral is actually equal to $\tau - t$, and the final equation looks like
$$x(t) = \int_{a}^{t} (\tau - t) x(\tau) d\tau$$
How? Why is this allowed?
$$ x''(t)=x(t),\;\;\; x(a)=x'(a)=0. $$ Integrate twice and apply $x(a)=x'(a)=0$, and use $x''(t)=x$ at the end: \begin{align} x(t)&=x(t)-x(a) \\ & =\int_a^t x'(u)du \\ & =\int_a^t (x'(u)-x'(a))du \\ & =\int_a^t\int_a^ux''(v)dvdu \\ & = -\int_a^t\left[\frac{d}{du}(t-u)\right]\left[\int_a^u x''(v)dv\right] du \\ & = \int_a^t(t-u) \frac{d}{du}\int_a^u x''(v)dv \\ & =\int_a^t(t-u)x''(u)du \\ & =\int_a^t(t-u)x(u)du \end{align}