Test of Point Symmetries of Ordinary or Partial Differential Equations

Run NTMF064.Package.m first!

Clear["Global`*"]

Variables and differential equations in the form R(x,u,∂u,...) = 0
(as an example it is used classical linear harmonic oscillator but try some different equation)

(* Independent variables *)
IndepVar={t};
(* Dependent variables *)
DepVar={x};
(* PDEs, only the functions R(...) without "== 0" *)
PDEs = {m D[x[t],t,t]+k x[t]}

Expression to substitute for in the infinitesimal criterion of invariance

subs = {D[x[t],t,t]};
sol=Solve[PDEs==0, subs]

Using the infinitesimal criterion to check that specified infinitesimals give a point symmetry
(try different infinitesimals ξ[t] and η[x] and see if you get zero)

(* Infinitesimals for all variables *)
ξ[t]=c[1];
η[x]=c[2]x[t];
(* Next expression should return zero(es) if infinitesimals give a point symmetry of PDEs *)
zero=CheckPointSymmetryOfDE[PDEs,subs, IndepVar, DepVar,ξ,η]

Infinitesimal generators, point transformations and commutator table from the last ansatz

ShowPointSymmetriesAndCommutationRelations[X,f,ϵ,IndepVar,DepVar,ξ,η,c,2,{}]