What does a function of its own arc length look like? Introduction
What does a function of its own arc length look like?
A strange question for sure, but first let me elaborate:
Imagine a function that starts at the point $\left( 0, 0 \right)$. If we now assume that the two closest (from the left and right) points also have $y = 0$, then we can take the closest point of the function with a value which has the distance between the two points. If we now want to have the point after this, it has the value of the length of the previous curve (from $0$). This goes on and on, so we can say that the $y$-value of a point of the function is the length of that function from $0$ to the point infinitely close to the point.
Now you might ask yourself why you should look for something. I don't have a plan but it looks like fun and I couldn't find anything online about it.


My Thoughts
$f\left( n \right) \in \mathbb{R}$ and $2 < n \in \mathbb{N}$
Since I don't see an obvious solution, I would first try to find such a function for $f\left( n \right) \in \mathbb{R}$ and $n \in \mathbb{N}$.
Since the starting point is $\left( 0, 0 \right)$ aka $f\left( 0 \right) = 0$, we can already take $\left( 0, 0 \right)$ as a point of the function. The next point would be at $n = 1$, which due to the function having no length (which has length $0$) also gets the function value $0$ aka $f\left( 1 \right) = 0$, so we get $\left( 1, 0 \right)$. The next point would be at $n = 2$, which by virtue of the function having length as the distance between the two previous two points also has the function value as that length. With this we'll get $\left( 3, 1 \right)$ aka $f\left( 3 \right) = 1$. For the next points we do the same, only that instead of just calculating the newly added length, we also add it to the existing one, which gives us a recursiv formula:
$$
\begin{align*}
f\left( n \right) &= f\left( n - 1 \right) + \sqrt{\left( \left( n - 1 \right) - \left( n - 2 \right) \right)^{2} + \left( f\left( n - 1 \right) - f\left( n - 2 \right) \right)^{2}}\\
f\left( n \right) &= f\left( n - 1 \right) + \sqrt{\left( n - n - 1 + 2 \right)^{2} + \left( f\left( n - 1 \right) - f\left( n - 2 \right) \right)^{2}}\\
f\left( n \right) &= f\left( n - 1 \right) + \sqrt{\left( 1 \right)^{2} + \left( f\left( n - 1 \right) - f\left( n - 2 \right) \right)^{2}}\\
f\left( n \right) &= f\left( n - 1 \right) + \sqrt{1 + \left( f\left( n - 1 \right) - f\left( n - 2 \right) \right)^{2}}\\
\\
f\left( n \right) &= f\left( n - 1 \right) + \sqrt{1 + \left( f\left( n - 1 \right) - f\left( n - 2 \right) \right)^{2}} \tag{1.}\\
\end{align*}
$$
with the graph (from $0$ to $4$):


$f\left( x \right) \in \mathbb{R}$, $\Delta x \in \mathbb{Q}$ and $x - \Delta x > 2$ where $\Delta x$ is the distance between $x$-values ​​of the two closest points
Since the principle worked well for $f\left( n \right) \in \mathbb{R}$ and $n \in \mathbb{N}$ I would simply want to apply it to $\lim_{{\Delta x} \to {0}^{+}} \Delta x, \Delta x \in \mathbb{Q}$ for decreasing distances between $x$-values ​​of the two closest points.
With some work, the logic behind $\left( 1. \right)$ and the help of some more vector addition I found the generalized recursive formula:
$$
\begin{align*}
f\left( x \right) &= f\left( x - \Delta x \right) + \sqrt{\left( \Delta x \right)^{2} + \left( \Delta f \right)^{2}}\\
f\left( x \right) &= f\left( x - \Delta x \right) + \sqrt{\left( \left(  x - 1 \cdot \Delta x \right) - \left(  x - 2 \cdot \Delta x \right) \right)^{2} + \left( f\left( x - 1 \cdot \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}}\\
f\left( x \right) &= f\left( x - \Delta x \right) + \sqrt{\left( \left(  x - \Delta x \right) - \left(  x - 2 \cdot \Delta x \right) \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}}\\
f\left( x \right) &= f\left( x - \Delta x \right) + \sqrt{\left( x - x - \Delta x + 2 \cdot \Delta x \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}}\\
f\left( x \right) &= f\left( x - \Delta x \right) + \sqrt{\left( \Delta x \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}}\\
\\
f\left( x \right) &= f\left( x - \Delta x \right) + \sqrt{\left( \Delta x \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}} \tag{2.}\\
\end{align*}
$$
with the graph: (from $x = 0$ to $x = 4$, from $y = 0$ to $y = 8$ and $\Delta x \in \left\{ {\color{Red} 1}, {\color{Blue} 0} {\color{Blue} .} {\color{Blue} 5}, {\color{Purple} 0} {\color{Purple}.} {\color{Purple} 2} {\color{Purple} 5}, {\color{Black} 0} {\color{Black} .} {\color{Black} 1} {\color{Black} 2} {\color{Black} 5} \right\})$:

It seems to me that if we let $\Delta x \to 0^{+}$, $f\left( x \right)$ with $x \to 1^{+}$ itself goes to $+\infty$, which I think is kinda cool as I wasn't expecting it.

$y\left( x \right) \in \mathbb{R}$, $x \in \mathbb{R}$, $\lim_{{\Delta x} \to {0}^{+}} \Delta x$ and $\Delta x \in \mathbb{R}$ where $\Delta x$ is the distance between $x$-values ​​of the two closest points
If we now extend the formula from $\left( 2. \right)$ by the fact that $\Delta x$ should approach $0$, we get the recursive formula:
$$
\begin{align*}
y\left( x \right) &:= \lim_{{\Delta x} \to {0^{+}}} f\left( x \right) = \lim_{{\Delta x} \to {0^{+}}} \left[ f\left( x - \Delta x \right) + \sqrt{\left( \Delta x \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}} \right]\\
y\left( x \right) &\equiv \lim_{{\Delta x} \to {0^{+}}} \left[ f\left( x - \Delta x \right) + \sqrt{\left( \Delta x \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}} \right]\\
\\
y\left( x \right) &\equiv \lim_{{\Delta x} \to {0^{+}}} \left[ f\left( x - \Delta x \right) + \sqrt{\left( \Delta x \right)^{2} + \left( f\left( x - \Delta x \right) - f\left( x - 2 \cdot \Delta x \right) \right)^{2}} \right] \tag{3.}\\
\end{align*}
$$
Now comes the challenge... Finding an explicit function formula.
I know that we can calculate the length of a function $f$ in $\left[ a, b \right]$ using "the arc length" formula $\operatorname{arc length}\left( a, b, \frac{\operatorname{d}y}{\operatorname{d}x} \right) = \int_{a}^{b} \sqrt{1 + \left( \frac{\operatorname{d}y}{\operatorname{d}x} \right)^{2}} \operatorname{d}x$ if $y$ is continuously differentiable in $x \in \left[ a, b \right]$ but I don't know how to deal with it here.
I am grateful for every help, correction and suggestion.
 A: No such function exists.
(Well, but see below ...)
A starting point which you've essentially gotten to already is to ask whether there is a continuously differentiable (or even nicer) function $f$ satisfying for all $x>0$ that $$\int_0^x\sqrt{1+f'(t)^2}dt=f(x).$$ Well, let's attack that expression! Differentiating both sides with respect to $x$ we get by FTC the much nicer equation $$\sqrt{1+f'(x)^2}=f'(x),$$ which after squaring both sides ... gives $1=0$.
Wait, what?
Taking a step back from calculus to geometry, we can see more easily why the goal is in fact impossible. Pick some $a>0$ and suppose $f(a)=b$. The shortest possible path connecting the origin to $(a,b)$ has length $\sqrt{a^2+b^2}$ ... but that is strictly greater than $b$, the supposed length of the graph of $f$ from $x=0$ to $x=b$. So we'll always fall short.
Incidentally, this also explains why you're seeing "shooting-to-infinity" behavior in your discretized version of the question as you shrink the "mesh" size. Conversely, this should reinforce the sense that numerical experimentation is good: even before the problem was solved you had a clear indicator that something was wonky about it.

But it's no fun to leave well enough alone ...
In some sense it might feel like the above description isn't complete. The specific details of how we measure distance and arclength in the plane matter a lot. What would happen if we change the geometry on $\mathbb{R}^2$?
There are various "nice" ways to measure distance on $\mathbb{R}^2$. Formally, I'm talking about metrics which induce the usual topology; informally, these are just functions $d:\mathbb{R}^2\rightarrow\mathbb{R}_{\ge0}$ between pairs of points that behave broadly how we would expect "distance notions" to behave and don't look crazy-bonkers. For example, we have:

*

*The taxicab metric $d_{taxi}((a,b),(c,d))=\vert a-c\vert+\vert b-d\vert$. (As we all know, taxis can go straight through buildings but can't move diagonally due to an agreement with the Vatican.)


*The max metric $d_{max}((a,b),(c,d))=\max\{\vert a-c\vert, \vert b-d\vert\}$.


*The elliptical metric $d_{ell}((a,b),(c,d))=\sqrt{(a-c)^2+{\color{red}{17}}(b-d)^2}$.


*The let's squish Pythagoras metric $d_{squish}((a,b),(c,d))=\sqrt[{\color{red}{42}}]{(a-c)^{{\color{red}{42}}}+(b-d)^{{\color{red}{42}}}}$.
And there are many others. Now we next need a definition of arclength. Here's the one I think is nicest:

Suppose I have a path in the plane, thought of as the image of a function $p:[0,1]\rightarrow\mathbb{R}^2$ (intuitively $p(t)$ is the point on the path at time $t$). We'll restrict attention to "nice" functions $p$; in particular, $p$ should be injective. For $d$ a "nice" metric, we say that the $d$-arclength of (the range of) $p$ is $L$ iff for all $\epsilon>0$ there is some finite sequence of points $0\le a_1<...<a_n\le 1$ such that, for every finite sequence of points $0\le b_1<...<b_k\le 1$ with each $a_i$ appearing as some $b_j$, we have $$\vert L-\sum_{1\le i< k}d(p(b_i), p(b_{i+1}))\vert<\epsilon.$$

A fun exercise: which, if any, of the above metrics (or any of your favorite alternatives) admits a function $f$ that "computes its own $d$-arclength"? (And if such a function exists, need it be unique? There's a lot to play with here!)
