About the fundamental theorem of Calculus

calculusdefinite integralsintegration

I've came across the following equation in some proof:

$y(t) = \int_{-\pi}^t(t-s)y(s) ds + \int_t^{\pi}(s-t)y(s)ds$, where $s,t\in [-\pi, \pi]$ and $y$ is integrable on $[-\pi, \pi]$.

Then, they want to take the derivative of the equation above, and simply says that the result is:

$y'(t) = \int_{-\pi}^ty(s) ds – \int_t^{\pi}y(s) ds$

I can't understand – why is this the result? I know that the fundamental theorem of Calculus was used here (which states that if $F(x) = \int_a^xf(x)dx$ then $F'(x_0)=f(x_0) \forall x_0$ ), and I'm not sure how is it used in this case, where $t$ is the lower value in some of the integrals?

EDIT following the comments, I tried calculating it, knowing that $\int_a^b = -\int^a_b$:

$\int_{-\pi}^t(t-s)y(s) ds + \int_t^{\pi}(s-t)y(s)ds = t\int_{-\pi}^ty(s) ds – \int_{-\pi}^tsy(s) ds – t\int_{\pi}^ty(s) ds + \int_{\pi}^tsy(s) ds $.

So if I want to take the derivative of this equation, using the fundamental theorem (for general $t$), I'll get : $ty(t) – ty(t) -ty(t) + ty(t) = 0$. Where is my mistake? what did I miss?

Best Answer

Because there is also a function of $t$ inside the integral, you have two pieces to the differentiation. As @peek-a-boo commented, the result follows from the Leibniz rule, but we can do it directly with the product rule here.

If $f(t) = \int_a^t (t-s)y(s)\,ds$, then note that $$f(t) = t\int_a^t y(s)\,ds - \int_a^t sy(s)\,ds.$$ Using the fundamental theorem of calculus twice and the product rule on the first term, we get $$f'(t) = \int_a^t y(s)\,ds + ty(t) - ty(t) = \int_a^t y(s)\,ds.$$ The other term is similar, reversing the limits on the definite integral as I already pointed out.