Singular does not really support fields of fractions.
But there are two ways to solve your special problem:
1) Multiply by the denominators before the computation.
In your example:
> ring r=real,(a11,a12,a21,a22),dp;
> matrix A[2][2]=a11,a12,a21,a22;
> division(det(A)*freemodule(2),A);
[1]:
_[1,1]=a22
_[1,2]=-a12
_[2,1]=-a21
_[2,2]=a11
...
Here we use the fact that the denominator is known to be
det(A).
2) Take the quotient field as basefield. In your example:
> ring r=(0,a11,a12,a21,a22),x,dp;
> matrix A[2][2]=a11,a12,a21,a22;
> list l=division(freemodule(2),A);
> l;
[1]:
_[1,1]=(a22)/(a11*a22-a12*a21)
_[1,2]=(-a12)/(a11*a22-a12*a21)
_[2,1]=(-a21)/(a11*a22-a12*a21)
_[2,2]=(a11)/(a11*a22-a12*a21)
...
But it is difficult to use this result for further
computations. This can be done as follows:
> matrix e[2][2]=1,1,1,1;
> e=l[1]*x-e;
> e;
e[1,1]=(a22)/(a11*a22-a12*a21)*x-1
e[1,2]=(-a12)/(a11*a22-a12*a21)*x-1
e[2,1]=(-a21)/(a11*a22-a12*a21)*x-1
e[2,2]=(a11)/(a11*a22-a12*a21)*x-1
> e[1,1]=cleardenom(e[1,1]);
> e[1,2]=cleardenom(e[1,2]);
> e[2,1]=cleardenom(e[2,1]);
> e[2,2]=cleardenom(e[2,2]);
> matrix a1=e/x;
> matrix a0=jet(e,0);
> a0;
a0[1,1]=(-a11*a22+a12*a21)
a0[1,2]=(-a11*a22+a12*a21)
a0[2,1]=(-a11*a22+a12*a21)
a0[2,2]=(-a11*a22+a12*a21)
> a1;
a1[1,1]=(a22)
a1[1,2]=(-a12)
a1[2,1]=(-a21)
a1[2,2]=(a11)
> ring s=0,(a11,a12,a21,a22),dp;
> def a0=imap(r,a0);
> def a1=imap(r,a1);
Now you can proceed to compute derivatives using the diff
command and the quotient rule. Singular does not support
differentiation of rational expressions at the moment.
email:
mschulze@mathematik.uni-kl.dePosted in old Singular Forum on: 2002-05-15 12:55:33+02