Original
Let $a\in\mathbb R$ and $f\colon [0,1]\to\mathbb R$ a continuous function. Solve the integral equation $$u(t)=f(t)+a\int_0^t u(s)\mathrm ds,\quad t\geq 0$$ and find an explicit formula for the solution.
First assume $f$ is differentiable. Then
$$u'(t)=f'(t)+au(t)$$
$$\to u'(t)-au(t)=f'(t)$$
$$\to u'(t)e^{-at}-au(t)e^{-at}=f'(t)e^{-at}$$
$$\to (u(t)e^{-at})'=f'(t)e^{-at}$$
$$\to (u(t)e^{-at})=\int f'(t)e^{-at} dt$$
$$\to u(t)=e^{at}\int f'(t)e^{-at} dt$$
$$\to u(t)=e^{at}[e^{-at}f(t)+a\int f e^{-at} dt]$$
$$\to u(t)=f(t)+ae^{at}\int f e^{-at} dt$$
Is this merely coincidence? Or is there some rule like in solving integral equations with conditions of blah blah blah, the Ansatz is of when $f$ is differentiable under the conditions of blah blah blah, is right?
You could do it like this: Let $$ v(t) = \int_0^t u(s)\ ds $$
Then by the FTOC, $v'(t) = u(t)$, so you have
$$ v'(t) - av(t) = f(t) $$
Using the integrating factor $$ (e^{-at}v(t))' = e^{-at}f(t) $$
Integrate both sides, knowing $v(0) = 0$ $$ v(t) = e^{at}\int_0^t e^{-as}f(s)\ ds $$
Finally, differentiate again $$ u(t) = v'(t) = f(t) + ae^{at}\int_0^te^{-as}f(s)\ ds $$