The problem is as follows,
Show that
$$f(x)=\sin\left(\dfrac{1}{x}\right)-\left(\dfrac{1}{x}\right)\cos\left(\dfrac{1}{x}\right)$$
is improper integrable on $(0,1]$ and find the value of
$$\int_0^1 f(x) \,dx$$
How can i solve? I think the substitution of $\frac{1}{x}$ as $t$. Please give me a detailed explanation.
$$ \frac{d}{dx} \left( x\sin{\left(\frac{1}{x}\right)} \right)= \sin{\left(\frac{1}{x}\right)}-\frac{1}{x}\cos{\left(\frac{1}{x}\right)}$$ Therefore, $$\int_0^1 \sin{\left(\frac{1}{x}\right)}-\frac{1}{x}\cos{\left(\frac{1}{x}\right) \; dx = x\sin{\left(\frac{1}{x}\right)} \bigg \rvert_0^1=\boxed{\sin{1}}}$$