# Integral of derivative squared

1. Nov 21, 2013

### SgrA*

How do I perform this integration:
$\int \left (\frac{dy}{dx}\right)^{2} dx$

Thanks!

2. Nov 21, 2013

### Staff: Mentor

The best way to calculate this depends on your function y(x). Integration by parts can be interesting, substitution might help, ...

3. Nov 21, 2013

### D H

Staff Emeritus
… but there is no general rule.

You could express the integral as a Taylor series. Whether that series converges, YMMV.

4. Nov 21, 2013

### SgrA*

I wanted to integrate kinetic energy $\frac{1}{2}mv^{2}$ with respect to time $dt$. $v$ would be $\frac{dx}{dt}$, but I'm not sure how I'd do it.

5. Nov 21, 2013

### Staff: Mentor

I don't think this integral has a physical meaning.
The integral over the change in kinetic energy has one, it just gives differences in kinetic energy.
As posted before, this is not possible in a general way. If you know v(t) or x(t), there could be a solution.

6. Nov 21, 2013

### SgrA*

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 $v$, which has an associated kinetic energy $\frac{1}{2}mv^{2}$. It's Lagrangian $L = T - V$ would be $L = \frac{1}{2}mv^{2}$, as there are no associated potentials in the (ideal) case that I'm considering. The action would be $S = \int^{t2}_{t1} L \ dt$. It is to calculate $S$ that I was trying to evaluate the integral $\int \left(\frac{dy}{dx}\right)^{2} \ dx$. 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 $S$ 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 $\frac{dx}{dt}$ 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 $x(t)$?

Last edited: Nov 21, 2013
7. Nov 21, 2013

### Staff: Mentor

There is no reason to assume that an arbitrary integral can be evaluated analytically.

A constant v^2 is indeed the minimum of S, but I'm not sure how to show this based on the integral, without the method of variations.

8. Nov 22, 2013

### SgrA*

I understand that, but why is it so? Rather, how can you tell that there is no point in trying to evaluate it?

9. Nov 22, 2013

### JJacquelin

Hi SgrA !
What do you mean by "evaluated" ?
If you mean "numericaly evaluater", i.e. evaluated by numerical methods, of course it is possible, in so far the fonction to be integrated is continuous.
If you mean "analytically evaluated", i.e. in order to express the result on the form of an analytic formula, this is possible only for some functions. Many functions don't have known antiderivative. Of course, a few functions have known antiderivative. The integrals of some combination of elementary functions can be be expressed in terms of "Special functions". But this is far to be always the case.
Do you know about "Special functions" and how to use them ?
That is why one cannot answer to your question if you don't say exactly what the function y(x) is.

Last edited: Nov 22, 2013
10. Nov 22, 2013

### SgrA*

I wanted to evaluate it analytically, but apparently that's not possible. I'd like to know what tells you that, though, so I don't waste time again, trying to evaluate integrals like the one mentioned above.

11. Nov 22, 2013

### JJacquelin

Apparently, you don't understand.
Read again my preceeding post : In some cases that is possible. In other cases that is not possible. The answer "possible" or "not possible" depends on the kind of function y(x). So, the wording of your question is too general and nobody can give you a general answer.

Last edited: Nov 22, 2013
12. Nov 22, 2013

### SgrA*

Oh, alright. Thanks, everyone!

13. Sep 1, 2014

### Cruikshank

And yet, the very first problem in Feynman and Hibbs is "Go from the 1/2 mv^2 Lagrangian to the following action: S = m/s (xb-xa)^2/(tb-ta). I have absolutely no idea how to do this--integration by parts leads nowhere good. I tried "guessing" the form of the S and taking derivatives trying to get 1/2 m v^2 and didn't get far. It's very demoralizing, as the text seemed okay but I can't do a single problem in it! (The next few are the same kind of thing.) So how did Feynman do it if it's impossible to do generally?