I think I'm on the totally wrong way then. I'm trying to get familiar with Lagrangian mechanics, so after figuring out the basics, I wanted to try numerically verifying that it is consistent with Newton's first law. I considered a particle moving with a constant velocity [itex]v[/itex], which has an associated kinetic energy [itex]\frac{1}{2}mv^{2}[/itex]. It's Lagrangian [itex]L = T - V[/itex] would be [itex]L = \frac{1}{2}mv^{2}[/itex], as there are no associated potentials in the (ideal) case that I'm considering. The action would be [itex]S = \int^{t2}_{t1} L \ dt[/itex]. It is to calculate [itex]S[/itex] that I was trying to evaluate the integral [itex]\int \left(\frac{dy}{dx}\right)^{2} \ dx[/itex]. I'm aware that the calculus of variations would be required to rigorously show that Lagrangian mechanics is consistent with Newton's first (and second) law, but I only intend to satisfy myself by considering a few values of [itex]S[/itex] and observing that a stationary value of action is associated with the predictions of Newton's first law. Would it be acceptable to plug in [itex]\frac{dx}{dt}[/itex] as a constant in the integration? (It doesn't sound like a good idea to me, because I'd be deriving the equation considering constant velocity, to obtain the same as a result; this isn't particularly impressive. It'd be better if I had a general equation, which yields a stationary value when I plug in constant velocity and no potentials.) Where am I going wrong?
Secondly, why is it that the the integral cannot be evaluated for a general [itex]x(t)[/itex]?