Why exactly do we write $\mathcal{L}(x(t),x'(t),t)$ instead of simply $\mathcal{L}(x(t),t)$? I have many times seen Lagrangian written as $\mathcal{L}(x(t),x'(t),t)$. I understand this is a function of $x(t)$, $x'(t)$ and $t$.
So it can theoretically look something like
$$\mathcal{L}(x(t),x'(t),t) = 5\cdot x(t)+(x'(t))^2+2\cdot t$$
(and therefore
$\mathcal{L}(a,b,c) = 5\cdot a+b^2+2\cdot c$)
But why don't we simply write
$$\mathcal{L}(x(t),t) = 5\cdot x(t)+(x'(t))^2+2\cdot t$$
(and therefore
$\mathcal{L}(a(t),b) = 5\cdot a(t)+(a'(t))^2+2\cdot b$)
Is the $x'(t)$ there just to make it clear that Lagrangian has it or are there other reasons?
 A: The reason is because what you are considering is not exactly the Lagrangian. The Lagrangian would usually be a function
$$\mathcal{L}:\mathbb{R}^3\supset\kern{-3px}\to\mathbb{R}, \quad (x_1,x_2,x_3)\mapsto\mathcal{L}(x_1,x_2,x_3).$$
When you then consider a functional on the form
$$J[y]=\int_a^b \mathcal{L}(x,y(x),y'(x))\,\mathrm{d}x,$$
you are actually first composing your Lagrangian with the function $x\mapsto(x,y(x),y'(x))$. If you view it like this, then it should be clear why $\mathcal{L}$ must depend on three variables, and not just two, as in the definition of the Lagrangian itself, $x_2$ and $x_3$ (which we later replace with $y(x)$ and $y'(x)$ under the composition) have nothing to do with each other.
A: To expand a little bit on the point made by Lorago: the expression you've written isn't usually described as a function (and specifically it's not a function from $\mathbb{R^n}\mapsto\mathbb{R}$) but instead is generally called an operator: something that's applied to a function to return another function; your version of the Lagrangian function would have to be written as a mapping $f(): C^1(\mathbb{R})\mapsto C^0(\mathbb{R})$. By contrast, if we treat $x(t)$ and $x'(t)$ as 'independent' variables to be plugged in later, the Lagrangian just takes the form of a function from $\mathbb{R^3}\mapsto\mathbb{R}$ which we then compose with our function $x(t)$ and its derivatives. This is a much easier function space to handle.
