having trouble with limit of integral How do I solve the following?
$$\lim_{x\to 0} \int_0^1 \cos\left(\frac{1}{xt}\right)\, dt$$

Here's another take.  Since $\cos \left(\frac{1}{xt}\right)$ is an even function of $x$, we can take the limit from the right or from the left, and the result is the same.  So assume $x > 0$.  Then apply the $u = 1/(xt)$ substitution as in joriki's answer, followed by integration by parts in the opposite direction from joriki's answer.  Rewriting the result in terms of the sine integral produces the output from Wolfram Alpha mentioned by Eivind and Sivaram: 
$$ \lim_{x \to 0} \left(\frac{1}{x} \int_0^{1/x} \frac{\sin u}{u} du  - \frac{\pi}{2x} + \cos \left(\frac{1}{x}\right)\right).$$
Now, apply the following known series expansion for the sine integral $\int_0^x \frac{\sin u}{u} du$  (valid for large values of $x$):
$$\int_0^x \frac{\sin u}{u} du = \frac{\pi}{2} -\frac{\cos x}{x} \left(1 - \frac{2!}{x^2} + \frac{4!}{x^4} \pm \cdots \right) - \frac{\sin x}{x} \left(\frac{1}{x} - \frac{3!}{x^3} \pm \cdots \right).$$ 
After simplifying, we are left with 
$$\lim_{x \to 0} \left(-\cos \left(\frac{1}{x}\right) \left(- 2! x^2 + 4! x^4 \pm \cdots \right) - \sin\left(\frac{1}{x}\right) \left(x - 3! x^3 \pm \cdots \right) \right).$$
Since $\cos \left(\frac{1}{x}\right)$ and $\sin \left(\frac{1}{x}\right)$ are both bounded by $-1$ and $1$, the limit is $0$.
In addition, we can see that the dominant term in the limit is $- x\sin\left(\frac{1}{x}\right)$, which is clearly bounded by $|x|$, as conjectured by Sivaram in the comments.
