Update the ChangeLog for bug #4008
[maxima.git] / share / diff_form / poisson.mac
blob6eb41d73292e13bff835bd602ac8de3bd2d37201
1 /* written by Furuya <go.maxima@gmail.com> 
2 #  This program is free software; you can redistribute it and/or modify        
3 #  it under the terms of the GNU General Public License as published by        
4 #  the Free Software Foundation; either version 2 of the License, or           
5 #  (at your option) any later version.                
6 */
8 /* need to do load("diag") */
9 /* poisson braket operator */
11 p_braket(_f,_g):= block([_x,_a,_b,_j,_jj:[],basis ],
12         mode_declare([_x,_a,_b],any),
13         basis:[],
14         for i:1 thru dim do (
15         basis:endcons('basis[i],basis)
16         ),
17         _x:coefmatrix([d(_f)],basis),
18         _j:matrix([0,1],[-1,0]),
19         for i:1 thru dim/2 do (
20         _jj:cons(_j,_jj)),
21         _b:(_x.diag(_jj)).basis,
22         inner(d(_g),_b));