Newton and Lagrangian relation ,peter.vlasschaert@gmail.com,07/08/2017
=> one particle with mass , one dimension = q
general coordinates                                        .  (qi ,i=1,2  ) = q
time derivative from general coordinates  .  (qi_t,i=1,2) = q_t =dq/dt
Second Law Newton: m*d^2(q)/dt = m*a =a*m

assume(m>0,g>0);
depends(lag,[q,q_t],[q,q_t],t);

kE = (k)inetic (E)nergy  (particle with mass (m)  and q)

p1: kE=1/2*m*(q_t)^2;

pE= (p)otential (E)nergy 

p2:pE=m*g*q;

Lagrangian = kE - pE

lag:part(p1,2)-part(p2,2);

euler - lagrange equation (without constraint).

p3:diff(lag,q)-diff(diff(lag,q_t),t)=0;

p4:ev(p3,q_t = diff(q,t));

rem : m*g (weight of particle)
           replace   g->-a

p5:part(p4,1)-part(p4,1,2)=0-part(p4,1,2);

Second Law from Newton

p6:(-1)*p5;
p7:ev(p6,g=-a);