# Find the derivative of I(x) = $\int _{\sin\left(x\right)}^{\cos\left(x\right)}\arctan\left(t^2\right)\,dt$

$$I'(x)= \frac{d}{dx}\left(\int_{\sin\left(x\right)}^{\cos\left(x\right)}\arctan\left(t^2\right)\,dt\right)$$

I'm not sure how to approach this problem, initially I thought to use the Fundamental theorem with the substitution $u = \cos(x)$ but then I still can't use the Fundamental theorem because of the $\sin(x)$. A point in the right direction would be appreciated.

FTC $1$ States that if $f:[0,b]\to\mathbb{R}$ is integrable and $F(x)=\int_0^xf(t)dt$, then $F$ is diferentiable and $$F'(x)=f(x)$$ Now, we have $$I(x)=\int_0^{\cos x}\arctan(t^2)dt-\int_0^{\sin x}\arctan(t^2)dt$$ Using the Chain Rule and TFC $1$ we get: \begin{align*} I'(x)&=\arctan(\cos^2 x)\frac{d}{dx}(\cos x)-\arctan(\sin^2 x)\frac{d}{dx}(\sin x)\\ &=\arctan(\cos^2 x)\cdot(-\sin x)-\arctan(\sin^2 x)\cdot(\cos x)\\ &=-(\sin x)\arctan(\cos^2 x)-(\cos x)\arctan(\sin^2 x) \end{align*}

Simply apply Newton-Leibnitz theorem, according to which

Let f(x, t) be a function such that the partial derivative of f with respect to t exists, and is continuous. Then, (click this link for formula). Hope this helps.

just use it with chain rule \begin{align} \int_{b}^{a}f(x)dx&=F(b)-F(a)\\ I(x)&=\int_{\sin x}^{\cos x}\overbrace{\arctan(t^2)}^{f(t)}dt\\ I'(x)&=\frac{d}{dx}\int_{\sin x}^{\cos x}f(t)dt=\frac{d}{dx}[F(\cos x)-F(\sin x)]\\ &=(\cos x)'f(\cos x)-(\sin x)'f(\sin x)\\ &=-\sin x\arctan\cos^2x-\cos x\arctan\sin^2x \end{align}

Use Leibniz's rule:

$$b'(x) = (\cos x)' = -\sin x, a'(x) = (\sin x)' = \cos x$$

which gives you

$$I'(x) = - \sin x \arctan(\cos^2 x) - \cos x \arctan(\sin^2 x)$$

EDIT: I got the signs mixed up