Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - computations in a ring of fractions
Author Message
  Post subject:   Reply with quote
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.de
Posted in old Singular Forum on: 2002-05-15 12:55:33+02
Post Posted: Wed Sep 21, 2005 8:52 pm
  Post subject:  computations in a ring of fractions  Reply with quote
Can SINGULAR do computations in a ring of fractinos of some
polynomial ring? How do I define a ring of fractions? Id
like for instance to define a

ring r=real,(a11,a12,a21,a22),dp;
matrix A[2][2]=a11,a12,a22,a21;

then to compute inverse(A). Then take derivatives of A^(-1)
with respect to aij. Is this possible with singular?



email: minutsil@cps.msu.edu
Posted in old Singular Forum on: 2002-03-28 16:28:30+01
Post Posted: Thu Aug 11, 2005 5:31 pm


It is currently Fri May 13, 2022 11:00 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group