Robert, Taking the derivative with respect to a function is something like
diff(L,u(x,t)); and also diff(L,diff(u(x,t),t)); where L may contain terms with u(x,t) and diff(u(x,t),t). So, u(x,t) is a function, not just a symbolic variable. These terms pop up in the Euler-Lagrange equation which is at the heart of Calculus of Variations. I haven't tried to do it in Sage, but I haven't seen any examples that use it and I couldn't find any Maxima examples either. Cheers, Tim.
smime.p7s
Description: S/MIME cryptographic signature