Question: Solving Euler-Lagrange equation, syntax issues

Hey there, I´m new to maple and running into some syntax issues when calculating the Euler-Lagrange equation.

The Euler Lagrange equation in general looks like this:

I´ve got  the Lagrangian for my task figured out:

Here´s the code for this line, be aware that the function definition part of this is not working.

L:=((x),(varphi),t)->(J)/(2)*(((x))/(R))^(2)+(`m__R`)/(2)(*(x))^(2)+(`m__p`)/(2)(((x)+l*(varphi)*cos(varphi))^(2)+(l*(varphi)*sin(varphi))^(2))+`m__p`*g*l*cos(varphi)

phi is obviously a function of t, I´m not sure if I should have written phi(t)

 

In the first step to solve the Euler-Lagrange, I have to partially differentiate L w.r.t xdot. preferably with a command something like the following:

How do I do that, how do I set L up to be able to do that? The way I defined the function above is not correct because xdot and phidot cant be used an argument apparently.

If all is working perfectly I´d be able to partially differentiate L w.r.t xdot, phidot, x, phi and subsequently be able to differentiate the first two w.r.t t again.

I´ll spare you the detail but I´ve tried for hours now with redefining xdot as xdot:= diff(x(t),t) and all sorts of other ways but nothing seems to really work.

 

Thanks for your help.

Please Wait...