TITLE: Existence of an Infinite Length Path
QUESTION [6 upvotes]: I came across the following simple definition

A path $\gamma$ in $\mathbb{R}^n$ that connects the point $a \in \mathbb{R}^n$ to the point $b \in \mathbb{R}^n$, is a continuous $\gamma : [0, 1] \to \mathbb{R}^n$ such that $\gamma(0) = a$ and $\gamma(1) = b$. We denote by $\ell(\gamma)$ the (Euclidean) length of $\gamma$. $\ell(\gamma)$ is always defined and is either a non-negative realnumber or $\infty$.

However, I cannot seem to think of a path, defined in this manner (specifically, where the domain is compact), the length of which is infinite.
Can anyone provide an example ?

REPLY [5 votes]: $\ell(\gamma)$ can still be infinite even if $\gamma$ is differentiable. Take any differentiable function $f:[0,1]->\mathbb R$ that is of unbounded variation; for instance, $f(x) = x^2\sin(1/x^2)$ (with $f(0) = 0$). Now just define $\gamma(t) = (t,f(t))$.
If $\gamma$ is continuously differentiable, on the other hand, then $d\gamma/dt$ is bounded on $[0,1]$, so $\ell(\gamma) = \int_0^1|d\gamma/dt|dt$ is finite.
Updated to show unbounded arc length:
$f$ crosses the $x$-axis at $x_n=(\pi n)^{-1/2}$ for $n = 1,2,3,...$ For large $n$, the arc length of the curve between $x_n$ and $x_{n+1}$ is about $2x_n^2 = 2/\pi n$, and is certainly greater than $1/\pi n$. So the total arc length is greater than $\sum_{n=1}^\infty1/\pi n$, which is unbounded.