Question

I'm playing around integrating differential forms in maxima, and this is my program:

init_cartan([x,y]);

omega:1/(sqrt(x-y))*dx~dy;

phi:[u^2+v^2,2*u*v];
diff(phi,u);
diff(phi,v);

scalar:diff(phi,v)|(diff(phi,u)|omega);

integrand:subst(u^2+v^2,x,subst(2*u*v,y,scalar));

integrand:radcan(integrand);
integrate(integrate(integrand,u,0,1),v,0,1);

In the subst bit I have to give the relations between u,v and x,y again. This seems redundant. Is there a more natural expression?

Was it helpful?

Solution 2

load(cartan);
init_cartan([x,y]);

omega:1/sqrt(x-y)*dx~dy;
def_xy:[x=u^2+v^2,y=2*u*v];

phi:subst(def_xy,[x,y]);
scalar:subst(def_xy,(diff(phi,u)|(diff(phi,v)|omega)));
integrand:radcan(scalar);

integrate(integrate(integrand,v,0,u),u,0,1);

OTHER TIPS

Consider this two examples:

load("cartan");
init_cartan([x,y]);

omega:1/(sqrt(x-y))*dx~dy;

/* declare functional dependencies ... */
depends([x, y], [u, v]);
/* this definition can be used latter */
def_xy: [x=u^2+v^2, y=2*u*v];

phi: [x, y];
scalar: diff(phi,v)|(diff(phi,u)|omega);
/* substitute ... */
scalar: subst(def_xy, scalar);
/* and force re-evalution of 'diff */
scalar: ev(scalar, diff);

integrand:radcan(scalar);
integrate(integrate(integrand,u,0,1),v,0,1);

and

load("cartan");
init_cartan([x,y]);

omega:1/(sqrt(x-y))*dx~dy;

/* declare functional dependencies ... */
depends([x, y], [u, v]);
/* give "numeric values" */
numerval(x, u^2+v^2, y, 2*u*v);

phi: [x, y];
scalar: diff(phi,v)|(diff(phi,u)|omega);
/* evaluate to numeric values (also switches `float' to true so 1/2 evaluates to 0.5) ... */
scalar: ev(scalar, numer=true);
/* and force re-evalution of 'diff */
scalar: ev(scalar, diff);

integrand:radcan(scalar);
integrate(integrate(integrand,u,0,1),v,0,1);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top