When does the curve $y = {x^p}\cos \frac{\pi }{x}(0 < x \leqslant 1)$ have finite length? When does the curve $y = {x^p}\cos \frac{\pi }{x}(0 < x \leqslant 1)$ have finite length?
I cannot figure out how to solve this problem. Thanks for your help.

Thanks for everyone! With your hints I have figured out a solution.
We need to check if the integral
$\begin{gathered}
  \int_0^1 {\sqrt {1 + y'{{(x)}^2}} dx}  = \int_1^{ + \infty } {\frac{1}{{{t^2}}}\sqrt {1 + y'{{(\frac{1}{t})}^2}} dt}  \hfill \\
   = \int_1^{ + \infty } {\frac{1}{{{t^2}}}\sqrt {1 + \frac{1}{{{t^{2(p - 1)}}}}{{(p\cos \pi t + \pi t\sin \pi t)}^2}} dt}  \hfill \\ 
\end{gathered} $
is convergent.
If $p > 1$, we have an estimate
$\begin{gathered}
  \int_n^{n + 1} {\frac{1}{{{t^2}}}\sqrt {1 + \frac{1}{{{t^{2(p - 1)}}}}{{(p\cos \pi t + \pi t\sin \pi t)}^2}} dt}  \hfill \\
   \leqslant \int_n^{n + 1} {\frac{1}{{{t^2}}}(1 + \frac{{p + \pi t}}{{{t^{p - 1}}}})dt}  \leqslant \frac{1}{{{n^2}}}(1 + \frac{{p + 2\pi n}}{{{n^{p - 1}}}}) \hfill \\ 
\end{gathered} $
from which we know the integral is convergent.
If $p \leqslant 1$, we have an estimate
$\begin{gathered}
  \int_{2n + \frac{1}{6}}^{2n + \frac{1}{3}} {\frac{1}{{{t^2}}}\sqrt {1 + \frac{1}{{{t^{2(p - 1)}}}}{{(p\cos \pi t + \pi t\sin \pi t)}^2}} dt}  \hfill \\
   \geqslant \int_{2n + \frac{1}{6}}^{2n + \frac{1}{3}} {\frac{1}{{{t^2}}}(\frac{{p + \pi t}}{{2{t^{p - 1}}}} - 1)dt}  \geqslant \frac{1}{6}\frac{1}{{{{(3n)}^2}}}(\frac{{p + 2\pi n}}{{2{{(2n)}^{p - 1}}}} - 1) \hfill \\ 
\end{gathered} $
from which we know the integral is not convergent.
