I am working with Poisson brackets of Angular momentum, and I want Mathematica to be able to return the angular momentum function if the Poisson bracket yields that result. I.e. provided
PoissonBracket[a_ , b_] :=
Module[{position, momentum},
position = {x, y, z};
momentum = {px, py, pz};
result =
D[a, {position}].D[b, {momentum}] - D[a, {momentum}].D[b, {position}]]
FLx[x_, y_, z_, px_, py_, pz_] := y*pz - z*py;
Lx = FLx[x, y, z, px, py, pz];
FLy[x_, y_, z_, px_, py_, pz_] := z*px - x*pz;
Ly = FLy[x, y, z, px, py, pz];
FLz[x_, y_, z_, px_, py_, pz_] := x*py - y*px;
Lz = FLz[x, y, z, px, py, pz];
(I did this to be able to compute actual values later on and to take Jacobians in an easier way)
If I compute
PoissonBracket[Lx, Ly]
I get pz y - py z
, but I want to get Lz
straight away instead. I have tried using simplify with assumptions in various ways, but
FullSimplify[PoissonBracket[Ly, Lz], Lx]
returns True
FullSimplify[PoissonBracket[Ly, Lz], Lx == pz y - py z]
returns pz y - py z
, so it does nothing.
What am I doing wrong?