Solution to a non-homogeneous linear $\text{ODE}$ given that $k(t)$ is a solution to a homogeneous equation of similar form My lecturer has gone through this question but still I'm confused on one particular part (I don't understand his explanation). Here's the problem:
Suppose $k(t)$ is the solution to a homogeneous equation $x'' + px' + qx =0 , p,q\in \Bbb R$ satisfying $k(0)=0 , k'(0)=1$.
(a) Prove that $x(t) = \int_{0}^{t}k(t-s)f(s)ds$ is a solution to the non-homogeneous equation $x'' + px' + qx =f(t)$.
So the solution the lecturer gave was that using the $\epsilon - \delta$ definition of derivatives and that $x(t) = \int_{0}^{t}k(t-s)f(s)ds$,
$$\begin{aligned} x'(t) &= \int_{0}^{t+h}\frac{k(t+h-s)}{h}f(s)ds - \int_{0}^{t}\frac{k(t-s)}{h}f(s)ds\qquad \qquad (\,1\,)\\&= \int_{t}^{t+h}\frac{k(t+h-s)}{h}f(s)ds + \int_{0}^{t}\frac{k(t+h-s)-k(t-s)}{h}f(s)ds \qquad \qquad (\,2\,) \\&= k(0)f(t) + \int_{0}^{t}k'(t-s)f(s)ds \qquad \qquad (\,3\,)\end{aligned}$$
And similarly $x''(t) = \int_{0}^{t}k''(t-s)f(s)ds + f(t) $
And finally we get $ x''(t) + px' + qx = \int_{0}^{t}[(k''+pk'+qk)(t-s)]f(s)ds + f(t) = f(t) $
I am confused as to how we get from $(2)$ to $(3)$ for the first term (i.e. $ \int_{t}^{t+h}\frac{k(t+h-s)}{h}f(s)ds = k(0)f(t) $ as we take $ h\rightarrow 0$). The lecturer mentioned that since $h\rightarrow0$, the integral is basically from $t$ to $t$ so $ k(t+h-s) = k(0)$ and he said that we can cancel the $h$ from the denominator and the upper bound of the integral $(t+h)$ ? And also how do we get $f(t)$ from it too?
Also, a student mentioned that we can get from $(2)$ to $(3)$ for the first term via Mean Value Theorem but I'm also confused about his remark
I am also confused how he can bring the $h$ into the integrals. He mentioned something about some implicit assumption/regularity condition and assumes that $k(t)$ is a 'nice' function.
 A: You could write
$$
x(t)=F(t,t)\text{ where }F(a,b)=\int_0^ak(b-s)f(s)ds
$$
Then
$$x'(t)=\partial_1F(t,t)+\partial_2F(t,t).$$
By the fundamental theorem of calculus
$$
\partial_1F(a,b)=[k(b-s)f(s)]_{s=a}=k(b-a)f(a)\implies \partial_1F(t,t)=k(0)f(t)=0
$$
The second term is a little more complicated, as you have to exchange the limit from the derivative with the limit from the integration. However, as the integration interval is compact and the integrand continuously differentiable, that exchange is admissible. This is meant with "$k$ being nice". Then
$$
\partial_2F(a,b)=\int_0^a\partial_bk(b-s)f(s)ds=\int_0^ak'(b-s)f(s)ds
\implies \partial_2F(t,t)=\int_0^tk'(t-s)f(s)ds
$$

If you formulate that with the difference quotients, then you get essentially the same kind of complications as with the product rule where
$$
\frac{u(x+h)v(x+h)-u(x)v(x)}{h}=\frac{u(x+h)-u(x)}{h}v(x+h)+u(x)\frac{v(x+h)-v(x)}{h}
$$
where in the first term you have to apply some limit rule to catch the moving target of $v(x+h)$.
