Getting the derivative of a function in an integral form

$$g(x) =\int_x^{\frac{\pi}{2}}\cos(t)dt %(https://i.stack.imgur.com/xoun0.png)$$

How do i get the derivative of this function?

I know that it is not about finding the integral of the function because it is asking for the derivative. But how do I progress from here on out?

I have an answer but i just don't know if it is correct. Basically i have

$-\cos(e^x) \sin x + \cos(\sin x) \sin x$

What i did was

$\cos(e^x) dt - \cos(\sin x) dt$

Which got me to

$-\cos(e^x) \sin x + \cos(\sin x) \sin x$

• Please, use MathJax (i.e. LaTeX commands) for mathematical notations. – Taroccoesbrocco Jan 28 '18 at 15:12
• Where do all those $\cos e^x$ and $\cos(\sin x) \sin x$ come from? Did you make them up? – user228113 Jan 28 '18 at 15:13
• I followed the one from here math.stackexchange.com/questions/37656/… but I don't know if what I'm doing is correct. – Ken Jan 28 '18 at 15:16
• If the derivative is w.r.t. $x$ then just apply the fundamental theorem of calculus. – coffeemath Jan 28 '18 at 15:16

\begin{align} g(x) &=\int_x^{\pi/2}\cos(t) \,dt \\ &= -\int_{\pi/2}^{x}\cos(t)\,dt \\ g’(x) &= -\cos(x) \end{align} 