# Derivative of an integral function with variable bound that appears in integrand $y(t) = \int_{t_0}^t \sin(t-s)g(s)ds$

I have a function: $$y(t) = \int_{t_0}^t \sin(t-s)g(s)ds$$

I want to calculate $$y',y''$$. I tried to use fundamental theorem of Calculus but I don't know how to apply it here. because the bound of integration is present in the function itself and the integrand doesn't have a constant form for different t.

How should I use Fundamental theorem of Calculus in this situtaion?

Use the following property: $$\dfrac{d}{dt}\left(\int_{a(t)}^{b(t)}g(x,t) dx\right) = \int_{a(t)}^{b(t)}\dfrac{\partial g(x,t)}{\partial t} dx+ b'(t)g(b(t),t)-a'(t)g(a(t),t)$$

I do it like this:

use the formula

$$\sin (t - s) = \cos t \sin (-s) + \cos(-s) \sin t = \cos s \sin t - \cos t \sin s \tag 1$$

to write

$$y(t) = \displaystyle \int_{t_0}^t \sin (t - s) g(s) \; ds$$ $$= \displaystyle \int_{t_0}^t ( \cos s \sin t - \cos t \sin s ) g(s) \; ds = \sin t \int_{t_0}^t (\cos s) g(s) \; ds - \cos t \int_{t_0}^t (\sin s) g(s) \; ds, \tag 2$$

which may then be differentiated via the usual Leibniz product rule:

$$y'(t) = \displaystyle \cos t \int_{t_0}^t (\cos s) g(s) \; ds + (\sin t \cos t) g(t)$$ $$+ \displaystyle \sin t \int_{t_0}^t (\sin s) g(s) \; ds - (\cos t \sin t) g(t)$$ $$= \displaystyle \cos t \int_{t_0}^t (\cos s) g(s) \; ds + \sin t \int_{t_0}^t (\sin s) g(s) \; ds; \tag 3$$

and again,

$$y''(t) = \displaystyle -\sin t \int_{t_0}^t (\cos s) g(s) \; ds + (\cos^2 t) g(t) + \cos t \int_{t_0}^t (\sin s) g(s) \; ds + (\sin^2 t) g(t)$$ $$= \displaystyle -\sin t \int_{t_0}^t (\cos s) g(s) \; ds + \cos t \int_{t_0}^t (\sin s) g(s) \; ds + g(t). \tag 5$$

(4) and (5) present $$y'(t)$$ and $$y''(t)$$ as per request. It should further be noted that we may also bring $$\sin t$$ and $$\cos t$$ under the integral signs and then using the standard angle-addition formulas from elementary trigononetry to obtain

$$y'(t) = \displaystyle \int_{t_0}^t (\cos (s - t)) g(s) \; ds \tag 6$$

and

$$y''(t) = \displaystyle \int_{t_0}^t \sin (s - t) g(s) \; ds + g(t); \tag 7$$

the process of taking dervatives may be continued; from (5) we find

$$y'''(t)$$ $$= \displaystyle -\cos t \int_{t_0}^t (\cos s) g(s) \; ds - (\sin t \cos t) g(t) - \sin t \int_{t_0}^t (\sin s) g(s) \; ds + (\cos t \sin t) g(t) + g'(t)$$ $$= \displaystyle -\cos t \int_{t_0}^t (\cos s) g(s) \; ds - \sin t \int_{t_0}^t (\sin s) g(s) \; ds + g'(t)$$ $$=\displaystyle -\int_{t_0}^t (\cos (t + s)) g(s) \; ds + g'(t); \tag 8$$

evidently this differentiation process may be indefinitely continued with analogous results, e.g.

$$y^{(4)}(t) = \sin t \displaystyle \int_{t_0}^t (\cos s) g(s) \; ds - (\cos^2 t) g(t) - \cos t \int_{t_0}^t (\sin s) g(s) \; ds - (\sin^2 t)g(t) + g''(t)$$ $$= \sin t \displaystyle \int_{t_0}^t (\cos s) g(s) \; ds - \cos t \int_{t_0}^t (\sin s) g(s) \; ds - g(t) + g''(t). \tag 9$$

The reader will note that we have made consistent use of the Fundamental Theorem of Calculus in evaluating the derivatives of the integrals occurring in the above, such as

$$\dfrac{d}{dt} \left ( \displaystyle \int_{t_0}^t (\cos s) g(s) \; ds \right) = (\cos t) g(t), \tag{10}$$

which occurs in the transition from (2)-(3), and so forth.