> I like that you've made it clear in the docstring that it can't handle Lagrangians with higher derivatives.

It does not seems to be difficult, I'm just not sure if we need this.  I'll try to show how to do this in new commits.

> This isn't handling the special case where you can integrate directly is it?

Nothing special, AFAIK.  I've removed the special case when `dL/df=0`.  So, there is no integration even for trivial cases.  Just a stupid and simple equation generation.