I'm having trouble determining the arclength of $x\sin(\pi/x)$ in the interval $(0, 1)$ (that is, determining if it converges or not). My first attempt was to write $$ \begin{aligned} \int_0^1\sqrt{1+(f'(x))^2}\text{d}x & = \int_0^1\sqrt{1 + \left(\sin\frac \pi x - \frac \pi x\cos\frac \pi x\right)^2}\text{d}x \\ & = \pi\int_1^\infty\sqrt{1 + (\sin x - x\cos x)^2}\frac{\text{d}x}{x^2} \end{aligned} $$
Then I wanted to consider the asymptotics function $\sqrt{1 + (\sin x - x\cos x)^2}$, but I can't find an easy way in. One thought was to write
$$ \int_1^\infty\sqrt{1+(\sin x - x\cos x)^2}\frac{\text{d}x}{x^2} > \int_1^\infty\left|\frac{\sin x}{x^2} - \frac{\cos x}x\right|\text{d}x $$
Next, we notice that $x\cos x + \sin x = 0$ occurs approximately when $x = (k+1/2)\pi$ ($k\in\mathbb{N}$), since these points are the points where $x = \tan x$, and as $x$ increases (so that the function $x$ is higher along the $y$-axis), the function $\tan x$ gets closer and closer to its vertical asymptote, which occurs at $(k+1/2)\pi$, so the intersection of the two functions also occurs close to that asymptote. So we consider $$ \int_{(k-1/2)\pi}^{(k+1/2)\pi}\frac{|\sin x - x\cos x|}{x^2}\text{d} x \ge \frac1{[(k+1/2)\pi]^2}\int_{(k-1/2)\pi}^{(k+1/2)\pi}|\sin x - x\cos x|\text{d} x $$
This is where I get stuck, as I'm not sure how to estimate that integrand. I assume it will be approximately linear in $k$, but I'm not sure how to prove that. If that's true, then the integral is greater than a term that behaves like $\frac 1k$, meaning the original integral is greater than a harmonic sum, and so diverges. So first question: how can I evaluate the integral on the RHS of the inequality above?
Second question: I also feel like there's an easier way of thinking about this problem that I'm missing. Any ideas?
Edit: I just realized that using $\int |f| \ge |\int f|$, we get $$ \int_{(k-1/2)\pi}^{(k+1/2)\pi}|\sin x - x\cos x|\text{d} x \ge \left|\int_{(k-1/2)\pi}^{(k+1/2)\pi}(\sin x - x\cos x)\text{d}x\right| = |2\pi k\cos(\pi k)| = 2\pi k $$
However, this doesn't completely answer my question. Yes, it's a solution to the integral, but the argument that we should only look at the intervals $[(k-1/2)\pi, (k+1/2)\pi]$ is kind of handwavy, and it still feels like there should be an easier solution.
Expanding the integrand, we have the arclength to be $$ \int_1^\infty\sqrt{\frac2{x^2}-\frac1x\sin\left(2\pi{x}\right)+\left(1-\frac1{x^2}\right)\cos^2\left(\pi{x}\right)}\,\,\frac{\mathrm{d}x}{x} $$ For $x\ge2$, the integrand is greater than $$ \sqrt{\frac34\cos^2(\pi x)-\frac12} $$ For any $k\in\mathbb{Z}$ and $k-\frac16\le x\le k+\frac16$, $$ \sqrt{\frac34\cos^2(\pi x)-\frac12}\ge\frac14 $$ Thus, the arclength is at least $$ \begin{align} \sum_{k=3}^\infty\frac14\cdot\frac13\cdot\frac1{k+\frac16} &=\sum_{k=3}^\infty\frac1{12k+2}\\ &\ge\sum_{k=4}^\infty\frac1{12k} \end{align} $$ which diverges by comparison to the tail of $\frac1{12}$ the Harmonic Series.