<s>[INST] Derivative of a definite integral (exercise) 
Let, $$G(x)= \int_{x}^{\frac{1}{x}}\left (s+\frac{1}{s}\right)^9 ds$$
Find the derivative of $G(x)$.

Here is my work:
$$\frac{d}{dx}G(x)= \frac{d}{dx}\int_{x}^{\frac{1}{x}}\left (s+\frac{1}{s}\right)^9 ds=$$
$$=-\frac{d}{dx}\int_{0}^{x}\left (s+\frac{1}{s}\right)^9 ds+\frac{d}{dx}\int_{0}^{\frac{1}{x}}\left (s+\frac{1}{s}\right)^9 ds=$$
Now let $u=\frac{1}{x}$, and so $du=-\frac{1}{x^2}dx$.
$$=-\frac{d}{dx}\int_{0}^{x}\left (s+\frac{1}{s}\right)^9 ds+\frac{d}{du}\int_{0}^{u}\left (s+\frac{1}{s}\right)^9 ds=$$
Now applying the chain rule for differenciation:
$$=-\left (x+\frac{1}{x}\right)^9+\left (u+\frac{1}{u}\right)^9 \cdot \frac{du}{dx}=-\left (x+\frac{1}{x}\right)^9+\left (\frac{1}{x}+x\right)^9 \cdot \frac{d}{dx}\frac{1}{x}=$$
$$=-\left (x+\frac{1}{x}\right)^9-\left (\frac{1}{x}+x\right)^9 \cdot \frac{1}{x^2}= G'(x)$$
Is this right? Thanks
 [/INST] Let $f(s)=(s+\frac{1}{s})^{9}$ and let $F(s)$ be a primitive function of $f(s)$.
$G(x)=F(1/x)-F(x)$
$G'(x)=f(1/x)\left(-\frac{1}{x^{2}}\right)-f(x)=$
$=-(x+\frac{1}{x})^{9}\cdot (\frac{1}{x^{2}}+1)$
wich corresponds to your answer.
</s>