# Help setting up a lagrangian problem NOT SOLVING IT

1. Dec 1, 2012

### troytroy

1. The problem statement, all variables and given/known data
A particle of mass m slides frictionlessly down a smooth track defined by the function y=f(x)=((-x^3)/a^2) where a is a constant with units of length. The particle is also in a uniform gravitational field. Set the lagrangian up in cartesian coordinates x and y

2. Relevant equations
L=T-U

T=kinetic energy
U=potential energy

3. The attempt at a solution

Since L=T-U, I know the solution will looking something close to (1/2)m(x'^2+y'^2)=mg(f(x)) but I am having difficulty determining what my x and y should be so I can apply them to the equation. I assume y=((-x^3)/a) so would I just need to solve for x and say x=(-y*a^2)^(1/3) and differentiate both x and y to find my x' and y'.

2. Dec 1, 2012

### andrien

I think it should be something similar to,
(1/2)m{(dx/dt)2+(dy/dt)2)} -mgy,you can elliminate something here.

3. Dec 1, 2012

### McCoy13

You only have one degree of freedom in the problem. If you specify the x-coordinate position and velocity, the motion of the particle is fully determined. Therefore you should start with

$$L=\frac{1}{2}m(\frac{dx}{dt}^2+\frac{dy}{dt}^2)-mgy$$

recognize that $y=f(x)\Rightarrow ^{dy}/_{dt}=f'(x)^{dx}/_{dt}$ and make the appropriate substitutions into your Lagrangian. If this is what you're doing (which it sounds like you are from your attempted solution), then there should be no problem. If you post your resulting Lagrangian, I can compare it to mine.

4. Dec 1, 2012

### troytroy

McCoy13 for your lagrangian shouldnt the potential mgy be added because it is already negative (U=-mgy) and I am a little confused about how to obtain dx/dt and dy/dt. I think the first derivative of f(x) = dx/dt but what about dy/dt? is dy/dt=f(x)?

5. Dec 1, 2012

### troytroy

I'm sorry I read what you typed wrong, what I wrote makes no sense. So if y=(-x^3)/(a^2)) then dy/dt=(x'*(-3x^2)/(a^2)) and rearranging the equation so that x= (-y(a^2))^(1/3) we can say dx/dt=(1/3)((-y(a^2))^(-2/3))*y' is this what you were getting at?

6. Dec 1, 2012

### troytroy

so dx/dt=(f(x)/f(x)')

7. Dec 1, 2012

### McCoy13

As an object is raised (an increase in y-coordinate) its gravitational potential goes up, so U=mgy. To get dy/dt, we simply apply the chain rule.

$$y=f(x)$$
$$\Rightarrow \frac{dy}{dt}=\frac{df}{dx}\frac{dx}{dt}$$

The first derivative of f(x) is $\frac{df}{dx}$. Is this clear? I will explain it another way.

We want to know $\frac{dy}{dt}$. However, y=f(x). Therefore it is an identical question to find $\frac{df}{dt}$. Note however that f(x) is not an explicit function of t. This is very important.

$$\frac{d}{dt}f(x)=\frac{d}{dt}f(x(t))=\frac{df}{dx}\frac{dx}{dt}$$

I have simply applied the chain rule where x=x(t). Another way of writing this is $f'(x)*dx/dt$ where ' denotes differentiation with respect to x.

8. Dec 1, 2012

### McCoy13

If $y=f(x)=\frac{-x^3}{a^2}$ then $\frac{dy}{dt}=\frac{df}{dx}\frac{dx}{dt}$ where $\frac{df}{dx}=\frac{-3x^2}{a^2}$. I do not think I can make this more clear without depriving you of a learning opportunity.

9. Dec 1, 2012

### McCoy13

I think this is correct provided that y' means dy/dt. However, you are given y as a function of x, which suggests you find dy/dt in terms of dx/dt. There is no reason to invert y(x) to get x(y) except to have a simpler expression for your potential, but making your potential U(x)=mgf(x) would not be so bad in this case.

10. Dec 1, 2012

### troytroy

so for my dy/dt I got -((3x^2)/(a^2))*(dx/dt) and I understand your example but I don't know why I am have trouble see how to actually solve for (dx/dt)?

11. Dec 1, 2012

### McCoy13

Why do you want to solve for dx/dt?

12. Dec 1, 2012

### troytroy

would dx/dt just be 1/f(x)'?

13. Dec 1, 2012

### troytroy

To plug it into the lagrangian for the kinetic energy term

14. Dec 1, 2012

### McCoy13

Why don't you plug in the formula you've found for dy/dt into the Lagrangian? And you can replace y with f(x).

If you really have your heart set on using y and replacing dx/dt, then what you need to do is invert f(x), so that you have $x=f^{-1}(y)$, and then you can calculate dx/dt using the chain rule.

15. Dec 1, 2012

### troytroy

I am confused about the (1/2)m(((dx/dt)^2)+(dy/dt)^2) I understand that we solved for dy/dt by differentiating the f(x) but I dont see what we can plug in for the dx/dt term

16. Dec 1, 2012

### troytroy

Wait are you saying we can just leave dx/dt in as it is? wow I can believe I did not realize it because now the lagrangian L will be in terms of only x and x'(x'=dx/dt) so L(x,x')=T-U

17. Dec 1, 2012

### McCoy13

You don't need to plug in something for the dx/dt term. You may choose to plug in something for dx/dt.

We are describing the motion of a particle on a track. Because it is on the track, if you know its x-coordinate then you know its y-coordinate. Similarly (because the track is not U-shaped) if you know its y-coordinate then you know its x-coordinate. Therefore, we can choose to describe the motion of the particle in terms of either it's x-coordinate or its y-coordinate. It is this choice that determines if you should replace dx/dt or dy/dt.

18. Dec 1, 2012

### troytroy

Okay I get it now, thank you very much for taking the time to help me out I really do appreciate it. I will post my final result for my lagrangian to see if they match up!

19. Dec 1, 2012

### troytroy

(18(x^3)((dx/dt)^2))+((3gb^2)((dx/dt)^2))-(b^4)((dx^2/dt^2))-(9x^4)(dx^2/dt^2)=0

20. Dec 1, 2012

### McCoy13

I don't really understand what equation you've written down here. Why is this expression equal to 0? What is b? Is dx^2/dt^2 the second derivative of x with respect to t or is it (dx/dt)^2?