Question: How to use jets package for calculus of variations

Trying to use the jets package from http://jets.math.slu.cz/ (file jets.s) for calculus of variations.

Test example -

coordinates([x,y],[f],3);
parameter(p);
g:=(f_x)^2+(f_y)^2-2*p*f;
vg:=variation(g,f);                  # first variation of g (from line 4354 of jets.s)

Now I want to find g from vg - inverse problem. The code for this starts on line 4367 of jets.s, command is lagrangian.

Tried -

Lg:=lagrangian(vg,f);
Lg:=lagrangian([vg,f]);
Lg:=lagrangian(vg,[f]);
Lg:=lagrangian(f=vg);

but all give syntax errors.

The authors of the package don't respond to query and the manual does't help.

Does anyone know what the correct syntax of lagrangian is. Or is there a better package to use for inverse problem.

Thank you.

Please Wait...