How to solve $\left(\int_0^x t\sin(\frac{1}{t})dt\right)’_{x=0}$? 
How to solve $\left(\int_0^x t\sin(\frac{1}{t})dt\right)’_{x=0}$?

I’m not sure if I can use Newton-Leibniz Theorem 
$$\dfrac{d}{dx}\left(\int_a^xf(t) dt=f(x)\right)$$ because $f(x)=x\sin(\frac{1}{x})$ is undefined where $x=0$. Is it correct that let $f(0)=0$?
 A: The fundamental theorem of calculus only requires your function to be continuous over a closed domain ; in our case $f : t \mapsto t \sin(1 / t)$ is continuous on $(0, a]$ for any $a$, so we can instead use the continuous continuation $\widetilde{f}$ which is equal to $f$ over $\mathbb{R}^*_+$ and is $0$ for $x = 0$ (this is indeed the limit of $f$, as $\sin$ is bounded by $1$). It turns out that $f$ and $\widetilde{f}$ have the same integral over any closed interval of $\mathbb{R}^*_+$ ; can you take it from there ?
A: Hint. Let $F(x):=\int_0^x t\sin(1/t)dt$, then  $F(0)=0$ (note that  $\lim_{t\to 0^+} t\sin(1/t)=0$ which means that the integrand function is bounded in a neighbourhood of $0$). Hence $F$ is a continuous function and
$$\left(\int_0^x t\sin(1/t)dt\right)’_{x=0}=\lim_{x\to 0}\frac{F(x)-F(0)}{x-0}=\lim_{x\to 0}\frac{1}{x}\int_0^x t\sin(1/t)dt.$$
Now we may use L'Hopital rule (and Newton-Leibniz Theorem  for $x\not=0$). You may also use the Mean Value Theorem: for any $x\not=0$ there is $t_x$ between $0$ and $x$ such that
$$\frac{1}{x}\int_0^x t\sin(1/t)=t_x\sin(1/t_x).$$
P.S. More generally if a derivative of a continuous function has a limit, it must agree with that limit. See prove that $f'(a)=\lim_{x\rightarrow a}f'(x)$.
A: Let , $$f(x) = \int_0^x t\sin(1/t)dt$$
$$\left(\int_0^x t\sin(1/t)dt\right)’_{x=0}=f'(0)=\lim_{x\to 0}\frac{f(x)-f(0)}{x-0}=\lim_{x\to 0}\frac{1}{x}\int_0^x t\sin(1/t)dt.$$
But since, $|\sin(1/t)|\le 1$
$$\left|\lim_{x\to 0}\frac{1}{x}\int_0^x t\sin(1/t)dt\right|\le  \lim_{x\to 0}\frac{1}{x}\int_0^x tdt = \lim_{x\to 0}\frac{x}2 =0$$
Thus, $$f'(0)=\left(\int_0^x t\sin(1/t)dt\right)’_{x=0} = 0$$
Also see here for similar problem: Compute $f'(0)$ and check if $f'$ is continuous or not
