CoCalc Public FilesHigherOrder.ipynbOpen with one click!
Author: Bill Page
Views : 75
Description: Equation of Motion
Compute Environment: Ubuntu 18.04 (Deprecated)

Higher-Order Equation of Motion

Our goal is to solve the equation of motion for the high-order acceleration ff, a given higher-order Lagrangian LL.

Related worksheet: https://cloud.sagemath.com/projects/b04b5777-e269-4c8f-a4b8-b21dbe1c93c6/files/Two%20Equations%20of%20Lagrange.sagews

Calculations are done using SageManifolds.

In [1]:
%display latex from sage.manifolds.utilities import exterior_derivative as d def ev(N): return (lambda x: N.contract(x))

Variables

In [2]:
M = Manifold(5,'M') coord.<t, x, v, a, s> = M.chart()

Vectors (partial derivatives)

In [3]:
[Dt,Dx,Dv,Da,Ds] = coord.frame()

Forms

In [4]:
[dt,dx,dv,da,ds] = coord.coframe()

General Lagrangian

In [5]:
L = M.scalar_field(function('L')(*list(coord))); L.display()
MR(t,x,v,a,s)L(t,x,v,a,s)\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & L\left(t, x, v, a, s\right) \end{array}

Kinematics

ff is an unknown function that is the analogue of acceleration for a higher-order equation of motion.

In [6]:
f = M.scalar_field(function('f')(*list(coord))); f.display()
MR(t,x,v,a,s)f(t,x,v,a,s)\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & f\left(t, x, v, a, s\right) \end{array}
In [7]:
N = Dt + v*Dx + a*Dv + s*Da + f*Ds; N.display()
t+vx+av+sa+f(t,x,v,a,s)s\frac{\partial}{\partial t } + v \frac{\partial}{\partial x } + a \frac{\partial}{\partial v } + s \frac{\partial}{\partial a } + f\left(t, x, v, a, s\right) \frac{\partial}{\partial s }

The Equation of Lagrange can be defined with the aid of the following auxillary fields

In [8]:
r=Ds(L); r.display()
MR(t,x,v,a,s)Ls\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & \frac{\partial\,L}{\partial s} \end{array}
In [9]:
q=Da(L)-N(r); q.display()
MR(t,x,v,a,s)v2Lxsa2Lvss2Lasf(t,x,v,a,s)2Ls22Lts+La\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & -v \frac{\partial^2\,L}{\partial x\partial s} - a \frac{\partial^2\,L}{\partial v\partial s} - s \frac{\partial^2\,L}{\partial a\partial s} - f\left(t, x, v, a, s\right) \frac{\partial^2\,L}{\partial s ^ 2} - \frac{\partial^2\,L}{\partial t\partial s} + \frac{\partial\,L}{\partial a} \end{array}
In [10]:
p=Dv(L)-N(q); p.display()
MR(t,x,v,a,s)v23Lx2s+a23Lv2s+2as3Lvas+2af(t,x,v,a,s)3Lvs2+s23La2s+2sf(t,x,v,a,s)3Las2+f(t,x,v,a,s)23Ls3+(2a3Lxvs+2s3Lxas+2f(t,x,v,a,s)3Lxs2+2Ls2fx+23Ltxs2Lxa)v+2a3Ltvs+2s3Ltas+2f(t,x,v,a,s)3Lts2+a2Lxsa2Lva+s2Lvss2La2+(afv+sfa+f(t,x,v,a,s)fs+ft)2Ls2+3Lt2s2Lta+Lv\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & v^{2} \frac{\partial^3\,L}{\partial x ^ 2\partial s} + a^{2} \frac{\partial^3\,L}{\partial v ^ 2\partial s} + 2 \, a s \frac{\partial^3\,L}{\partial v\partial a\partial s} + 2 \, a f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial v\partial s ^ 2} + s^{2} \frac{\partial^3\,L}{\partial a ^ 2\partial s} + 2 \, s f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial a\partial s ^ 2} + f\left(t, x, v, a, s\right)^{2} \frac{\partial^3\,L}{\partial s ^ 3} + {\left(2 \, a \frac{\partial^3\,L}{\partial x\partial v\partial s} + 2 \, s \frac{\partial^3\,L}{\partial x\partial a\partial s} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial x\partial s ^ 2} + \frac{\partial^2\,L}{\partial s ^ 2} \frac{\partial\,f}{\partial x} + 2 \, \frac{\partial^3\,L}{\partial t\partial x\partial s} - \frac{\partial^2\,L}{\partial x\partial a}\right)} v + 2 \, a \frac{\partial^3\,L}{\partial t\partial v\partial s} + 2 \, s \frac{\partial^3\,L}{\partial t\partial a\partial s} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial t\partial s ^ 2} + a \frac{\partial^2\,L}{\partial x\partial s} - a \frac{\partial^2\,L}{\partial v\partial a} + s \frac{\partial^2\,L}{\partial v\partial s} - s \frac{\partial^2\,L}{\partial a ^ 2} + {\left(a \frac{\partial\,f}{\partial v} + s \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + \frac{\partial\,f}{\partial t}\right)} \frac{\partial^2\,L}{\partial s ^ 2} + \frac{\partial^3\,L}{\partial t ^ 2\partial s} - \frac{\partial^2\,L}{\partial t\partial a} + \frac{\partial\,L}{\partial v} \end{array}
In [11]:
eq1 = (N(p)-Dx(L)); eq1.display()
MR(t,x,v,a,s)v34Lx3s+a34Lv3s+3a2s4Lv2as+3a2f(t,x,v,a,s)4Lv2s2+3as24Lva2s+6asf(t,x,v,a,s)4Lvas2+3af(t,x,v,a,s)24Lvs3+s34La3s+3s2f(t,x,v,a,s)4La2s2+3sf(t,x,v,a,s)24Las3+f(t,x,v,a,s)34Ls4+(3a4Lx2vs+3s4Lx2as+3f(t,x,v,a,s)4Lx2s2+33Lxs2fx+2Ls22fx2+34Ltx2s3Lx2a)v2+3a24Ltv2s+6as4Ltvas+6af(t,x,v,a,s)4Ltvs2+3s24Lta2s+6sf(t,x,v,a,s)4Ltas2+3f(t,x,v,a,s)24Lts3+3a23Lxvs+3as3Lxas+3af(t,x,v,a,s)3Lxs2a23Lv2a+3as3Lv2s2as3Lva2s23La3+sf(t,x,v,a,s)3La2s+(3a24Lxv2s+6as4Lxvas+6af(t,x,v,a,s)4Lxvs2+3s24Lxa2s+6sf(t,x,v,a,s)4Lxas2+3f(t,x,v,a,s)24Lxs3+3a3Lvs2fx+3s3Las2fx+3f(t,x,v,a,s)3Ls3fx+6a4Ltxvs+6s4Ltxas+6f(t,x,v,a,s)4Ltxs2+3a3Lx2s2a3Lxva+3s3Lxvs2s3Lxa2+f(t,x,v,a,s)3Lxas+3(afv+sfa+f(t,x,v,a,s)fs+ft)3Lxs2+(2a2fxv+2s2fxa+2f(t,x,v,a,s)2fxs+fxfs+22ftx)2Ls2+33Lts2fx+34Lt2xs23Ltxa+2Lxv)v+3a4Lt2vs+3s4Lt2as+3f(t,x,v,a,s)4Lt2s2+3a3Ltxs2a3Ltva+3s3Ltvs2s3Lta2+f(t,x,v,a,s)3Ltas+3(afv+sfa+f(t,x,v,a,s)fs+ft)3Lts2a2Lxa+s2Lxs+a2Lv2+(3s2+af(t,x,v,a,s))3Lvas+2f(t,x,v,a,s)2Lvs+3(a2fv+asfa+af(t,x,v,a,s)fs+sf(t,x,v,a,s)+aft)3Lvs2f(t,x,v,a,s)2La2+(3asfv+3s2fa+3sf(t,x,v,a,s)fs+2f(t,x,v,a,s)2+3sft)3Las2+(a22fv2+2as2fva+2af(t,x,v,a,s)2fvs+s22fa2+2sf(t,x,v,a,s)2fas+sfafs+f(t,x,v,a,s)fs2+f(t,x,v,a,s)22fs2+2a2ftv+2s2fta+2f(t,x,v,a,s)2fts+afx+(afs+s)fv+f(t,x,v,a,s)fa+ftfs+2ft2)2Ls2+3(af(t,x,v,a,s)fv+sf(t,x,v,a,s)fa+f(t,x,v,a,s)2fs+f(t,x,v,a,s)ft)3Ls3+4Lt3s3Lt2a+2LtvLx\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & v^{3} \frac{\partial^4\,L}{\partial x ^ 3\partial s} + a^{3} \frac{\partial^4\,L}{\partial v ^ 3\partial s} + 3 \, a^{2} s \frac{\partial^4\,L}{\partial v ^ 2\partial a\partial s} + 3 \, a^{2} f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial v ^ 2\partial s ^ 2} + 3 \, a s^{2} \frac{\partial^4\,L}{\partial v\partial a ^ 2\partial s} + 6 \, a s f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial v\partial a\partial s ^ 2} + 3 \, a f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial v\partial s ^ 3} + s^{3} \frac{\partial^4\,L}{\partial a ^ 3\partial s} + 3 \, s^{2} f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial a ^ 2\partial s ^ 2} + 3 \, s f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial a\partial s ^ 3} + f\left(t, x, v, a, s\right)^{3} \frac{\partial^4\,L}{\partial s ^ 4} + {\left(3 \, a \frac{\partial^4\,L}{\partial x ^ 2\partial v\partial s} + 3 \, s \frac{\partial^4\,L}{\partial x ^ 2\partial a\partial s} + 3 \, f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial x ^ 2\partial s ^ 2} + 3 \, \frac{\partial^3\,L}{\partial x\partial s ^ 2} \frac{\partial\,f}{\partial x} + \frac{\partial^2\,L}{\partial s ^ 2} \frac{\partial^2\,f}{\partial x ^ 2} + 3 \, \frac{\partial^4\,L}{\partial t\partial x ^ 2\partial s} - \frac{\partial^3\,L}{\partial x ^ 2\partial a}\right)} v^{2} + 3 \, a^{2} \frac{\partial^4\,L}{\partial t\partial v ^ 2\partial s} + 6 \, a s \frac{\partial^4\,L}{\partial t\partial v\partial a\partial s} + 6 \, a f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t\partial v\partial s ^ 2} + 3 \, s^{2} \frac{\partial^4\,L}{\partial t\partial a ^ 2\partial s} + 6 \, s f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t\partial a\partial s ^ 2} + 3 \, f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial t\partial s ^ 3} + 3 \, a^{2} \frac{\partial^3\,L}{\partial x\partial v\partial s} + 3 \, a s \frac{\partial^3\,L}{\partial x\partial a\partial s} + 3 \, a f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial x\partial s ^ 2} - a^{2} \frac{\partial^3\,L}{\partial v ^ 2\partial a} + 3 \, a s \frac{\partial^3\,L}{\partial v ^ 2\partial s} - 2 \, a s \frac{\partial^3\,L}{\partial v\partial a ^ 2} - s^{2} \frac{\partial^3\,L}{\partial a ^ 3} + s f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial a ^ 2\partial s} + {\left(3 \, a^{2} \frac{\partial^4\,L}{\partial x\partial v ^ 2\partial s} + 6 \, a s \frac{\partial^4\,L}{\partial x\partial v\partial a\partial s} + 6 \, a f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial x\partial v\partial s ^ 2} + 3 \, s^{2} \frac{\partial^4\,L}{\partial x\partial a ^ 2\partial s} + 6 \, s f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial x\partial a\partial s ^ 2} + 3 \, f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial x\partial s ^ 3} + 3 \, a \frac{\partial^3\,L}{\partial v\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, s \frac{\partial^3\,L}{\partial a\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial s ^ 3} \frac{\partial\,f}{\partial x} + 6 \, a \frac{\partial^4\,L}{\partial t\partial x\partial v\partial s} + 6 \, s \frac{\partial^4\,L}{\partial t\partial x\partial a\partial s} + 6 \, f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t\partial x\partial s ^ 2} + 3 \, a \frac{\partial^3\,L}{\partial x ^ 2\partial s} - 2 \, a \frac{\partial^3\,L}{\partial x\partial v\partial a} + 3 \, s \frac{\partial^3\,L}{\partial x\partial v\partial s} - 2 \, s \frac{\partial^3\,L}{\partial x\partial a ^ 2} + f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial x\partial a\partial s} + 3 \, {\left(a \frac{\partial\,f}{\partial v} + s \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial x\partial s ^ 2} + {\left(2 \, a \frac{\partial^2\,f}{\partial x\partial v} + 2 \, s \frac{\partial^2\,f}{\partial x\partial a} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial x\partial s} + \frac{\partial\,f}{\partial x} \frac{\partial\,f}{\partial s} + 2 \, \frac{\partial^2\,f}{\partial t\partial x}\right)} \frac{\partial^2\,L}{\partial s ^ 2} + 3 \, \frac{\partial^3\,L}{\partial t\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, \frac{\partial^4\,L}{\partial t ^ 2\partial x\partial s} - 2 \, \frac{\partial^3\,L}{\partial t\partial x\partial a} + \frac{\partial^2\,L}{\partial x\partial v}\right)} v + 3 \, a \frac{\partial^4\,L}{\partial t ^ 2\partial v\partial s} + 3 \, s \frac{\partial^4\,L}{\partial t ^ 2\partial a\partial s} + 3 \, f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t ^ 2\partial s ^ 2} + 3 \, a \frac{\partial^3\,L}{\partial t\partial x\partial s} - 2 \, a \frac{\partial^3\,L}{\partial t\partial v\partial a} + 3 \, s \frac{\partial^3\,L}{\partial t\partial v\partial s} - 2 \, s \frac{\partial^3\,L}{\partial t\partial a ^ 2} + f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial t\partial a\partial s} + 3 \, {\left(a \frac{\partial\,f}{\partial v} + s \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial t\partial s ^ 2} - a \frac{\partial^2\,L}{\partial x\partial a} + s \frac{\partial^2\,L}{\partial x\partial s} + a \frac{\partial^2\,L}{\partial v ^ 2} + {\left(3 \, s^{2} + a f\left(t, x, v, a, s\right)\right)} \frac{\partial^3\,L}{\partial v\partial a\partial s} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,L}{\partial v\partial s} + 3 \, {\left(a^{2} \frac{\partial\,f}{\partial v} + a s \frac{\partial\,f}{\partial a} + a f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + s f\left(t, x, v, a, s\right) + a \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial v\partial s ^ 2} - f\left(t, x, v, a, s\right) \frac{\partial^2\,L}{\partial a ^ 2} + {\left(3 \, a s \frac{\partial\,f}{\partial v} + 3 \, s^{2} \frac{\partial\,f}{\partial a} + 3 \, s f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + 2 \, f\left(t, x, v, a, s\right)^{2} + 3 \, s \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial a\partial s ^ 2} + {\left(a^{2} \frac{\partial^2\,f}{\partial v ^ 2} + 2 \, a s \frac{\partial^2\,f}{\partial v\partial a} + 2 \, a f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial v\partial s} + s^{2} \frac{\partial^2\,f}{\partial a ^ 2} + 2 \, s f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial a\partial s} + s \frac{\partial\,f}{\partial a} \frac{\partial\,f}{\partial s} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s}^{2} + f\left(t, x, v, a, s\right)^{2} \frac{\partial^2\,f}{\partial s ^ 2} + 2 \, a \frac{\partial^2\,f}{\partial t\partial v} + 2 \, s \frac{\partial^2\,f}{\partial t\partial a} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial t\partial s} + a \frac{\partial\,f}{\partial x} + {\left(a \frac{\partial\,f}{\partial s} + s\right)} \frac{\partial\,f}{\partial v} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial a} + \frac{\partial\,f}{\partial t} \frac{\partial\,f}{\partial s} + \frac{\partial^2\,f}{\partial t ^ 2}\right)} \frac{\partial^2\,L}{\partial s ^ 2} + 3 \, {\left(a f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial v} + s f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right)^{2} \frac{\partial\,f}{\partial s} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial s ^ 3} + \frac{\partial^4\,L}{\partial t ^ 3\partial s} - \frac{\partial^3\,L}{\partial t ^ 2\partial a} + \frac{\partial^2\,L}{\partial t\partial v} - \frac{\partial\,L}{\partial x} \end{array}

Number of terms in this expression:

In [12]:
len(eq1.expr().expand())
116116

We want to solve this equation (eq1 = 0) for ff in terms of LL.

The equation can also be written in the following form:

In [13]:
eq2 = N(Dv(L)) - N(N(Da(L))) + N(N(N(Ds(L)))) - Dx(L)
In [14]:
eq1 == eq2
True\mathrm{True}

But we would prefer to write it as a polynomial in N(N(f))N(N(f)), N(f)N(f), and powers of ff. If we write ff instead of N(Ds(L))N(Ds(L)), N(Da(L))N(Da(L)) and N(Dv(L))N(Dv(L)) above then we get new coefficients and terms in powers of ff.

In [15]:
N(N(f)).display()
MR(t,x,v,a,s)v22fx2+a22fv2+2as2fva+2af(t,x,v,a,s)2fvs+s22fa2+2sf(t,x,v,a,s)2fas+sfafs+f(t,x,v,a,s)fs2+f(t,x,v,a,s)22fs2+(2a2fxv+2s2fxa+2f(t,x,v,a,s)2fxs+fxfs+22ftx)v+2a2ftv+2s2fta+2f(t,x,v,a,s)2fts+afx+(afs+s)fv+f(t,x,v,a,s)fa+ftfs+2ft2\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & v^{2} \frac{\partial^2\,f}{\partial x ^ 2} + a^{2} \frac{\partial^2\,f}{\partial v ^ 2} + 2 \, a s \frac{\partial^2\,f}{\partial v\partial a} + 2 \, a f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial v\partial s} + s^{2} \frac{\partial^2\,f}{\partial a ^ 2} + 2 \, s f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial a\partial s} + s \frac{\partial\,f}{\partial a} \frac{\partial\,f}{\partial s} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s}^{2} + f\left(t, x, v, a, s\right)^{2} \frac{\partial^2\,f}{\partial s ^ 2} + {\left(2 \, a \frac{\partial^2\,f}{\partial x\partial v} + 2 \, s \frac{\partial^2\,f}{\partial x\partial a} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial x\partial s} + \frac{\partial\,f}{\partial x} \frac{\partial\,f}{\partial s} + 2 \, \frac{\partial^2\,f}{\partial t\partial x}\right)} v + 2 \, a \frac{\partial^2\,f}{\partial t\partial v} + 2 \, s \frac{\partial^2\,f}{\partial t\partial a} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial t\partial s} + a \frac{\partial\,f}{\partial x} + {\left(a \frac{\partial\,f}{\partial s} + s\right)} \frac{\partial\,f}{\partial v} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial a} + \frac{\partial\,f}{\partial t} \frac{\partial\,f}{\partial s} + \frac{\partial^2\,f}{\partial t ^ 2} \end{array}

Terms 2nd^\textit{nd} order in ff arise from the Liebniz rule applied to the differential operator N2N^2 on the term Ds fDs\ f in N(Ds(L))N(Ds(L)). For example

In [16]:
t2 = eq1.expr().coefficient(diff(f.expr(),t,t))*diff(f.expr(),t,t); M.scalar_field(t2).display()
MR(t,x,v,a,s)2Ls22ft2\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & \frac{\partial^2\,L}{\partial s ^ 2} \frac{\partial^2\,f}{\partial t ^ 2} \end{array}

The necessary coefficient can be read from the above.

In [17]:
c2 = (Ds(Ds(L))*N(N(f))); c2.display()
MR(t,x,v,a,s)v22Ls22fx2+(2a2fxv+2s2fxa+2f(t,x,v,a,s)2fxs+fxfs+22ftx)v2Ls2+(a22fv2+2as2fva+2af(t,x,v,a,s)2fvs+s22fa2+2sf(t,x,v,a,s)2fas+sfafs+f(t,x,v,a,s)fs2+f(t,x,v,a,s)22fs2+2a2ftv+2s2fta+2f(t,x,v,a,s)2fts+afx+(afs+s)fv+f(t,x,v,a,s)fa+ftfs+2ft2)2Ls2\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & v^{2} \frac{\partial^2\,L}{\partial s ^ 2} \frac{\partial^2\,f}{\partial x ^ 2} + {\left(2 \, a \frac{\partial^2\,f}{\partial x\partial v} + 2 \, s \frac{\partial^2\,f}{\partial x\partial a} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial x\partial s} + \frac{\partial\,f}{\partial x} \frac{\partial\,f}{\partial s} + 2 \, \frac{\partial^2\,f}{\partial t\partial x}\right)} v \frac{\partial^2\,L}{\partial s ^ 2} + {\left(a^{2} \frac{\partial^2\,f}{\partial v ^ 2} + 2 \, a s \frac{\partial^2\,f}{\partial v\partial a} + 2 \, a f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial v\partial s} + s^{2} \frac{\partial^2\,f}{\partial a ^ 2} + 2 \, s f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial a\partial s} + s \frac{\partial\,f}{\partial a} \frac{\partial\,f}{\partial s} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s}^{2} + f\left(t, x, v, a, s\right)^{2} \frac{\partial^2\,f}{\partial s ^ 2} + 2 \, a \frac{\partial^2\,f}{\partial t\partial v} + 2 \, s \frac{\partial^2\,f}{\partial t\partial a} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,f}{\partial t\partial s} + a \frac{\partial\,f}{\partial x} + {\left(a \frac{\partial\,f}{\partial s} + s\right)} \frac{\partial\,f}{\partial v} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial a} + \frac{\partial\,f}{\partial t} \frac{\partial\,f}{\partial s} + \frac{\partial^2\,f}{\partial t ^ 2}\right)} \frac{\partial^2\,L}{\partial s ^ 2} \end{array}

After removing the term c2c2 above, the remaining terms are at most first-order in ff.

In [18]:
eq1a = eq1-c2; eq1a.display()
MR(t,x,v,a,s)v34Lx3s+a34Lv3s+3a2s4Lv2as+3a2f(t,x,v,a,s)4Lv2s2+3as24Lva2s+6asf(t,x,v,a,s)4Lvas2+3af(t,x,v,a,s)24Lvs3+s34La3s+3s2f(t,x,v,a,s)4La2s2+3sf(t,x,v,a,s)24Las3+f(t,x,v,a,s)34Ls4+(3a4Lx2vs+3s4Lx2as+3f(t,x,v,a,s)4Lx2s2+33Lxs2fx+34Ltx2s3Lx2a)v2+3a24Ltv2s+6as4Ltvas+6af(t,x,v,a,s)4Ltvs2+3s24Lta2s+6sf(t,x,v,a,s)4Ltas2+3f(t,x,v,a,s)24Lts3+3a23Lxvs+3as3Lxas+3af(t,x,v,a,s)3Lxs2a23Lv2a+3as3Lv2s2as3Lva2s23La3+sf(t,x,v,a,s)3La2s+(3a24Lxv2s+6as4Lxvas+6af(t,x,v,a,s)4Lxvs2+3s24Lxa2s+6sf(t,x,v,a,s)4Lxas2+3f(t,x,v,a,s)24Lxs3+3a3Lvs2fx+3s3Las2fx+3f(t,x,v,a,s)3Ls3fx+6a4Ltxvs+6s4Ltxas+6f(t,x,v,a,s)4Ltxs2+3a3Lx2s2a3Lxva+3s3Lxvs2s3Lxa2+f(t,x,v,a,s)3Lxas+3(afv+sfa+f(t,x,v,a,s)fs+ft)3Lxs2+33Lts2fx+34Lt2xs23Ltxa+2Lxv)v+3a4Lt2vs+3s4Lt2as+3f(t,x,v,a,s)4Lt2s2+3a3Ltxs2a3Ltva+3s3Ltvs2s3Lta2+f(t,x,v,a,s)3Ltas+3(afv+sfa+f(t,x,v,a,s)fs+ft)3Lts2a2Lxa+s2Lxs+a2Lv2+(3s2+af(t,x,v,a,s))3Lvas+2f(t,x,v,a,s)2Lvs+3(a2fv+asfa+af(t,x,v,a,s)fs+sf(t,x,v,a,s)+aft)3Lvs2f(t,x,v,a,s)2La2+(3asfv+3s2fa+3sf(t,x,v,a,s)fs+2f(t,x,v,a,s)2+3sft)3Las2+3(af(t,x,v,a,s)fv+sf(t,x,v,a,s)fa+f(t,x,v,a,s)2fs+f(t,x,v,a,s)ft)3Ls3+4Lt3s3Lt2a+2LtvLx\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & v^{3} \frac{\partial^4\,L}{\partial x ^ 3\partial s} + a^{3} \frac{\partial^4\,L}{\partial v ^ 3\partial s} + 3 \, a^{2} s \frac{\partial^4\,L}{\partial v ^ 2\partial a\partial s} + 3 \, a^{2} f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial v ^ 2\partial s ^ 2} + 3 \, a s^{2} \frac{\partial^4\,L}{\partial v\partial a ^ 2\partial s} + 6 \, a s f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial v\partial a\partial s ^ 2} + 3 \, a f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial v\partial s ^ 3} + s^{3} \frac{\partial^4\,L}{\partial a ^ 3\partial s} + 3 \, s^{2} f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial a ^ 2\partial s ^ 2} + 3 \, s f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial a\partial s ^ 3} + f\left(t, x, v, a, s\right)^{3} \frac{\partial^4\,L}{\partial s ^ 4} + {\left(3 \, a \frac{\partial^4\,L}{\partial x ^ 2\partial v\partial s} + 3 \, s \frac{\partial^4\,L}{\partial x ^ 2\partial a\partial s} + 3 \, f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial x ^ 2\partial s ^ 2} + 3 \, \frac{\partial^3\,L}{\partial x\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, \frac{\partial^4\,L}{\partial t\partial x ^ 2\partial s} - \frac{\partial^3\,L}{\partial x ^ 2\partial a}\right)} v^{2} + 3 \, a^{2} \frac{\partial^4\,L}{\partial t\partial v ^ 2\partial s} + 6 \, a s \frac{\partial^4\,L}{\partial t\partial v\partial a\partial s} + 6 \, a f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t\partial v\partial s ^ 2} + 3 \, s^{2} \frac{\partial^4\,L}{\partial t\partial a ^ 2\partial s} + 6 \, s f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t\partial a\partial s ^ 2} + 3 \, f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial t\partial s ^ 3} + 3 \, a^{2} \frac{\partial^3\,L}{\partial x\partial v\partial s} + 3 \, a s \frac{\partial^3\,L}{\partial x\partial a\partial s} + 3 \, a f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial x\partial s ^ 2} - a^{2} \frac{\partial^3\,L}{\partial v ^ 2\partial a} + 3 \, a s \frac{\partial^3\,L}{\partial v ^ 2\partial s} - 2 \, a s \frac{\partial^3\,L}{\partial v\partial a ^ 2} - s^{2} \frac{\partial^3\,L}{\partial a ^ 3} + s f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial a ^ 2\partial s} + {\left(3 \, a^{2} \frac{\partial^4\,L}{\partial x\partial v ^ 2\partial s} + 6 \, a s \frac{\partial^4\,L}{\partial x\partial v\partial a\partial s} + 6 \, a f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial x\partial v\partial s ^ 2} + 3 \, s^{2} \frac{\partial^4\,L}{\partial x\partial a ^ 2\partial s} + 6 \, s f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial x\partial a\partial s ^ 2} + 3 \, f\left(t, x, v, a, s\right)^{2} \frac{\partial^4\,L}{\partial x\partial s ^ 3} + 3 \, a \frac{\partial^3\,L}{\partial v\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, s \frac{\partial^3\,L}{\partial a\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial s ^ 3} \frac{\partial\,f}{\partial x} + 6 \, a \frac{\partial^4\,L}{\partial t\partial x\partial v\partial s} + 6 \, s \frac{\partial^4\,L}{\partial t\partial x\partial a\partial s} + 6 \, f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t\partial x\partial s ^ 2} + 3 \, a \frac{\partial^3\,L}{\partial x ^ 2\partial s} - 2 \, a \frac{\partial^3\,L}{\partial x\partial v\partial a} + 3 \, s \frac{\partial^3\,L}{\partial x\partial v\partial s} - 2 \, s \frac{\partial^3\,L}{\partial x\partial a ^ 2} + f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial x\partial a\partial s} + 3 \, {\left(a \frac{\partial\,f}{\partial v} + s \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial x\partial s ^ 2} + 3 \, \frac{\partial^3\,L}{\partial t\partial s ^ 2} \frac{\partial\,f}{\partial x} + 3 \, \frac{\partial^4\,L}{\partial t ^ 2\partial x\partial s} - 2 \, \frac{\partial^3\,L}{\partial t\partial x\partial a} + \frac{\partial^2\,L}{\partial x\partial v}\right)} v + 3 \, a \frac{\partial^4\,L}{\partial t ^ 2\partial v\partial s} + 3 \, s \frac{\partial^4\,L}{\partial t ^ 2\partial a\partial s} + 3 \, f\left(t, x, v, a, s\right) \frac{\partial^4\,L}{\partial t ^ 2\partial s ^ 2} + 3 \, a \frac{\partial^3\,L}{\partial t\partial x\partial s} - 2 \, a \frac{\partial^3\,L}{\partial t\partial v\partial a} + 3 \, s \frac{\partial^3\,L}{\partial t\partial v\partial s} - 2 \, s \frac{\partial^3\,L}{\partial t\partial a ^ 2} + f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial t\partial a\partial s} + 3 \, {\left(a \frac{\partial\,f}{\partial v} + s \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial t\partial s ^ 2} - a \frac{\partial^2\,L}{\partial x\partial a} + s \frac{\partial^2\,L}{\partial x\partial s} + a \frac{\partial^2\,L}{\partial v ^ 2} + {\left(3 \, s^{2} + a f\left(t, x, v, a, s\right)\right)} \frac{\partial^3\,L}{\partial v\partial a\partial s} + 2 \, f\left(t, x, v, a, s\right) \frac{\partial^2\,L}{\partial v\partial s} + 3 \, {\left(a^{2} \frac{\partial\,f}{\partial v} + a s \frac{\partial\,f}{\partial a} + a f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + s f\left(t, x, v, a, s\right) + a \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial v\partial s ^ 2} - f\left(t, x, v, a, s\right) \frac{\partial^2\,L}{\partial a ^ 2} + {\left(3 \, a s \frac{\partial\,f}{\partial v} + 3 \, s^{2} \frac{\partial\,f}{\partial a} + 3 \, s f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + 2 \, f\left(t, x, v, a, s\right)^{2} + 3 \, s \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial a\partial s ^ 2} + 3 \, {\left(a f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial v} + s f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right)^{2} \frac{\partial\,f}{\partial s} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial t}\right)} \frac{\partial^3\,L}{\partial s ^ 3} + \frac{\partial^4\,L}{\partial t ^ 3\partial s} - \frac{\partial^3\,L}{\partial t ^ 2\partial a} + \frac{\partial^2\,L}{\partial t\partial v} - \frac{\partial\,L}{\partial x} \end{array}

Similarly the first-order terms arise from NN applied to the term Ds fDs\ f in N(Da(L))N(Da(L)).

In [19]:
N(f).display()
MR(t,x,v,a,s)vfx+afv+sfa+f(t,x,v,a,s)fs+ft\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & v \frac{\partial\,f}{\partial x} + a \frac{\partial\,f}{\partial v} + s \frac{\partial\,f}{\partial a} + f\left(t, x, v, a, s\right) \frac{\partial\,f}{\partial s} + \frac{\partial\,f}{\partial t} \end{array}

For example:

In [20]:
t1 = eq1a.expr().coefficient(diff(f.expr(),t))*diff(f.expr(),t); M.scalar_field(t1).display()
MR(t,x,v,a,s)3(v3Lxs2+a3Lvs2+s3Las2+f(t,x,v,a,s)3Ls3+3Lts2)ft\begin{array}{llcl} & M & \longrightarrow & \mathbb{R} \\ & \left(t, x, v, a, s\right) & \longmapsto & 3 \, {\left(v \frac{\partial^3\,L}{\partial x\partial s ^ 2} + a \frac{\partial^3\,L}{\partial v\partial s ^ 2} + s \frac{\partial^3\,L}{\partial a\partial s ^ 2} + f\left(t, x, v, a, s\right) \frac{\partial^3\,L}{\partial s ^ 3} + \frac{\partial^3\,L}{\partial t\partial s ^ 2}\right)} \frac{\partial\,f}{\partial t} \end{array}