# Find $dy/dx$ using the fundamental theorem of calculus

I have recently posted about solving a much easier problem using the theorem in question. Now, I decided to try and tackle a much more tricky problem. Namely:

$$f(x) = \frac{d}{dx} \int_{\sin(x)}^{2x}\cos(t) dt$$ Find $\frac{df}{dx}$

This is my solution:
1. Rewrite this integral as a sum of two more-easily-computable ones: $$f(x) = \frac{d}{dx}\int_{\sin(x)}^0 \cos(t) dt + \frac{d}{dx} \int_0^{2x}\cos(t)dt$$ 2. Evaluate the first integral: $$f'(\sin(x)) = \cos(x) \frac {df}{d\sin(x)}$$ $$\int_{\sin(x)}^0 \cos(t) dt = \cos(x)\cos(\sin(x))$$ 3. Evaluate the second integral: $$\int_0^{2x}\cos(t)dt = 2\cos(2x)$$ 4. Find the derivative: $$\frac{d}{dx}\left(\cos(x)\cos(\sin(x))+ 2\cos(2x) \right)= \dots$$ The computation of this derivative is not the kernel of my problem and so I can skip it here.
Do you think that my method / solution is correct?

You have done every thing right except for $$\frac {d}{dx} \int_{sin(x)}^0 \cos(t) dt = \cos(x)\cos(\sin(x))$$ where you missed a negative sign.
The correct answer should be $$\frac {d}{dx} \int_{sin(x)}^0 \cos(t) dt = -\cos(x)\cos(\sin(x))$$
your integral is given by $$\sin(2x)-\sin(\sin(x))$$ and the first derivative is $$2 \cos (2 x)-\cos (x) \cos (\sin (x))$$