I'm having trouble wrapping my head around the functions involved in the derivation of the Euler-Lagrange equation.
Although, as a sidenote, I'm deriving it by trying to prove that the shortest path between two points ($x_a$ and $x_b$) on a plane ($\mathbb{R}^2$), is a straight line.
I understand that a path between two points can be defined as a set of points. A variable in this set is a point $(x, f(x))$, for some $x\in\mathbb{R}$, and function $f:\mathbb{R}\rightarrow\mathbb{R}$.
I also understand that using both the Pythagorean theorem, and the fundamental theorem of calculus, the length of a path is: $L=\int_{x_a}^{x_b}\sqrt{(1+f'(x_i))} dx$.
What I don't understand is how to express $L$ as a function, specifically, what the input and ouput sets of the function are.
Here's what I'm getting at first glance. Let's first denote $\mathsf{F}$ as the set of all possible functions describing the paths joining $x_a$ and $x_b$. Then, the total length $L$ is a function $L: \mathsf{F}\rightarrow\mathbb{R}$. That is, the total length, $L$ relates a function/path to a real number representing its length.
However, firstly, books represent the function $L$ as a multivariate function with output $L(f, f', x)$. This seems unnecessarily cumbersome (why use a triple $(f, f', x)$ as an input, when just the single input $f$ will suffice?)
Secondly, and more importantly, there is no order on $\mathsf{F}$ unlike how there is an order on $\mathbb{R}$. That is, it doesn't make sense to talk about some function in $\mathsf{F}$ being "lesser than" (or "prior to") some other function in the set $\mathsf{F}$. Conversely, it is meaningful to say that some real number is lesser than another.
Without such an order on its sets, from what I understand, we can't talk about differentiating or integrating $L$.
As a sidenote, I am learning this proof from John Taylor's Classical Mechanics. I'm having trouble as its description of a function is a little off. It talks about $f(x)$ being a function of $x$ if it `depends' on $x$, which is pretty vague. A function is really, a relation between elements in one set, with elements in another, and it's unclear what the sets are in this case, for the function $L$.