# My Epic Fail at Deriving an Equation with Lagrange

• Arm
In summary, the equation that models the velocity of the charge allowed to move after it is released from rest is found to be $$v = \sqrt{\frac{2k q_1 q_2}{mr}}$$.
Arm
Homework Statement
Two positive charges are placed one meter away from eachother. One is held in place and one is allowed to move. Find an equation that models the velocity of the charge allowed to move after it is released from rest.
Relevant Equations
$$KE = \frac{mv^2}{2}$$
$$U_E= \frac{k q_1 q_2}{r}$$
$$L = KE - PE$$
$$\frac{\partial L}{\partial x} - \frac{d}{dt} ( \frac{\partial L}{\partial \dot x} ) = 0$$
Here is my epic fail at trying to derive the equation using Lagrange (this was my first time trying to use lagrangian mechanics except for when I memorized the derivation for a pendulum)
$$L = \frac{m \dot r^2}{2} - \frac{k q_1 q_2}{r}$$
$$\frac{\partial L}{\partial r} = \frac{k q_1 q_2}{r^2}$$
$$\frac{\partial L}{\partial \dot r} = m \dot r$$
$$\frac{d}{dt} ( m \dot r ) = m \ddot r$$
$$\frac{k q_1 q_2}{r^2} - m \ddot r = 0$$
$$\ddot r = \frac{k q_1 q_2}{m r^2}$$
$$\dot r = \int \frac{k q_1 q_2}{m r^2}dr = \frac{2 k q_1 q_2}{mr}$$

Last edited:
Arm said:
Homework Statement:: Two positive charges are placed one meter away from eachother. One is held in place and one is allowed to move. Find an equation that models the velocity of the charge allowed to move after it is released from rest.
Relevant Equations:: $$KE = \frac{mv^2}{2}$$
$$U_E= \frac{k q_1 q_2}{r}$$
$$L = KE - PE$$
$$\frac{\partial L}{\partial x} - \frac{d}{dt} ( \frac{\partial L}{\partial \dot x} )$$
The last line needs to be completed as an equation.

Arm said:
$$L = \frac{m \dot r^2}{2} - \frac{k q_1 q_2}{r}$$
$$\frac{\partial L}{\partial r} = \frac{k q_1 q_2}{r^2}$$
$$\frac{\partial L}{\partial \dot r} = m \dot r$$
$$\frac{d}{dt} ( m \dot r ) = m \ddot r$$
$$\frac{k q_1 q_2}{r^2} + m \ddot r = 0$$
$$\ddot r = \frac{-k q_1 q_2}{m r^2}$$
OK.

Arm said:
$$\dot r = \int \frac{k q_1 q_2}{m r^2} = \frac{2 k q_1 q_2}{mr}$$
What is the variable of integration for the integral shown after the first = sign? It needs to be the same variable of integration that you used to get from ##\ddot r## to ##\dot r##.

Arm said:
$$\frac{k q_1 q_2}{r^2} + m \ddot r = 0$$
$$\ddot r = \frac{-k q_1 q_2}{m r^2}$$
These two equation have a sign error.

TSny said:
The last line needs to be completed as an equation
TSny said:
What is the variable of integration for the integral shown after the first = sign? It needs to be the same variable of integration that you used to get from r¨ to r˙.
fixed and fixed, thank you
But I pulled the dr out of nowhere, I don't know if this is allowed

TSny said:
These two equation have a sign error.
also fixed, thank you

OK. So you have ##\ddot r = \large \frac b {r^2}##, where ##b## is a constant. If I integrate both sides with respect to time, I get ##\dot r = \int \frac b {r^2} dt + C##, where ##C## is a constant of integration. The integral on the right is integrated with respect to time. We can't do this integral because we don't know ##r## as a function of time.

Go back to ##\ddot r = \large \frac b {r^2}##. There is a trick you can do. Multiply both sides by ##\dot r## to get $$\ddot r \dot r = \large \frac b {r^2} \dot r$$ which may be written as $$v \frac{dv}{dt} = \frac b {r^2} \frac {dr}{dt}$$ where ##v = \dot r##. Multiply both sides by ##dt## and proceed.

vanhees71
TSny said:
OK. So you have ##\ddot r = \large \frac b {r^2}##, where ##b## is a constant. If I integrate both sides with respect to time, I get ##\dot r = \int \frac b {r^2} dt + C##, where ##C## is a constant of integration. The integral on the right is integrated with respect to time. We can't do this integral because we don't know ##r## as a function of time.

Go back to ##\ddot r = \large \frac b {r^2}##. There is a trick you can do. Multiply both sides by ##\dot r## to get $$\ddot r \dot r = \large \frac b {r^2} \dot r$$ which may be written as $$v \frac{dv}{dt} = \frac b {r^2} \frac {dr}{dt}$$ where ##v = \dot r##. Multiply both sides by ##dt## and proceed.

$$v \frac{dv}{dt} = \frac b {r^2} \frac {dr}{dt}$$
$$v {\:} dv = \frac{b}{r^2} \frac{dr}{dt}dt$$
$$\int v {\:} dv = \int \frac{b}{r^2} v {\:} dt$$
Not sure how I would take an integral with position and with velocity in it

Arm said:
$$v \frac{dv}{dt} = \frac b {r^2} \frac {dr}{dt}$$
$$v {\:} dv = \frac{b}{r^2} \frac{dr}{dt}dt$$
$$\int v {\:} dv = \int \frac{b}{r^2} v {\:} dt$$
Not sure how I would take an integral with position and with velocity in it
Note that ## \frac{dr}{dt}dt = dr##

Arm
TSny said:
Note that ## \frac{dr}{dt}dt = dr##
$$\int v {\:} dv = \int \frac{b}{r^2} v {\:} dt$$
$$\int v {\:} dv = \int \frac{b}{r^2} \frac{dr}{dt} {\:} dt$$
$$\int v {\:} dv = \int \frac{b}{r^2} dr$$
$$\frac{v^2}{2} = \frac{-b}{r}$$
$$b = \frac{-k q_1 q_2}{m}$$
$$\frac{v^2}{2} = \frac{(-)(-)k q_1 q_2}{mr}$$
$$v^2 = \frac{2k q_1 q_2}{mr}$$
$$v = \sqrt{\frac{2k q_1 q_2}{mr}}$$
I think this is the correct final answer

Arm said:
$$\int v {\:} dv = \int \frac{b}{r^2} dr$$
$$\frac{v^2}{2} = \frac{-b}{r}$$
Does the second equation above satisfy the initial condition: ##v = 0## when ##r = 1## m?

Arm said:
$$b = \frac{-k q_1 q_2}{m}$$
Check to see if the sign is correct.

TSny said:
Does the second equation above satisfy the initial condition: ##v = 0## when ##r = 1## m?Check to see if the sign is correct.
I think the sign is correct

Arm said:
I think the sign is correct
In post #6 we defined ##b## such that ##\ddot r = \large \frac b {r^2}##.

In post #1 you have ##\ddot r = \large \frac{k q_1 q_2}{mr^2}##

TSny said:
Check to see if the sign is correct.
Arm said:
I think the sign is correct
I see where I made the mistake sign now
TSny said:
Does the second equation above satisfy the initial condition: v=0 when r=1 m?
Ignoring variable of integration and +C for the umpteenth time has gotten me the wrong answer yet again; when will I learn my lesson?

$$v^2 = \frac{-2k q_1 q_2}{mr} + C$$
The particle is released from rest ##x## meters away from the other particle. Velocity is 0 at this moment
$$0^2 = \frac{-2k q_1 q_2}{mx} + C$$
$$C = \frac{2k q_1 q_2}{mx}$$
$$v^2 = \frac{-2k q_1 q_2}{mr} + \frac{2k q_1 q_2}{mx}$$
$$v^2 = \frac{2k q_1 q_2}{mx} - \frac{2k q_1 q_2}{mr}$$

General solution:
$$v = \sqrt{ \frac{2 k q_1 q_2}{m}( \frac{1}{x} - \frac{1}{r} ) }$$

If x = 1 then r also = 1 so
$$v = \sqrt{ \frac{2 k q_1 q_2}{m}( \frac{1}{1} - \frac{1}{1} ) }$$
$$v = \sqrt{ \frac{2 k q_1 q_2}{m}( 1 - 1 ) }$$
$$v = \sqrt{ \frac{2 k q_1 q_2}{m}( 0 ) }$$
$$v = 0$$

Thanks for all the help!

TSny
Looks good. Of course using energy conservation is a quick way to get the answer. But it’s a good exercise using the Lagrangian approach.

Arm
Well, the Lagrangian approach also tells you to use symmetry principles, which are most effectively formulated using the action principle. Since ##\partial_t L=0## you know that ##H=p_r \dot{r}-L=\text{const}##. Using the general principles of the action formalism saves a lot of work!

Arm
vanhees71 said:
Well, the Lagrangian approach also tells you to use symmetry principles, which are most effectively formulated using the action principle. Since ##\partial_t L=0## you know that ##H=p_r \dot{r}-L=\text{const}##. Using the general principles of the action formalism saves a lot of work!
I have no idea what that means because I'm taking the equilivent of general college physics 2 right now but I'll look into it; if you have a recommended resource I'll read/watch it.

I don't know, what "general college physics 2" includes. You need a good grasp of multivariate calculus to understand variational calculus and the Hamilton-Lagrange formalism of mechanics. A standard introductory textbook is Goldstein, Mechanics, but it must be the older 2nd edition. The newer editions are spoiled by some authors thinking it would need some "modernization" ;-)).

Arm

Replies
2
Views
571
Replies
3
Views
618
Replies
11
Views
1K
Replies
8
Views
1K
Replies
6
Views
990
Replies
3
Views
499
Replies
0
Views
511
Replies
25
Views
3K
Replies
1
Views
929
Replies
9
Views
1K