Ask Your Question

Revision history [back]

First, you can simplify the symbolic expression you obtained:

sage: b.full_simplify()
(5*a + 3)/(8*a + 5)

Then you can indeed work on the genuine fraction field of a polynomial ring:

sage: R.<a> = QQ[]
sage: F = R.fraction_field()
sage: b = 1/F(a)
sage: for i in (1..5):
....:     c = b+1
....:     b = 1/c
....:     print b,",", c
....:     
a/(a + 1) , (a + 1)/a
(a + 1)/(2*a + 1) , (2*a + 1)/(a + 1)
(2*a + 1)/(3*a + 2) , (3*a + 2)/(2*a + 1)
(3*a + 2)/(5*a + 3) , (5*a + 3)/(3*a + 2)
(5*a + 3)/(8*a + 5) , (8*a + 5)/(5*a + 3)

You can see this page for a short presentation.

First, you can simplify the symbolic expression (which is not an algebraic object, just a formula) you obtained:

sage: b.full_simplify()
(5*a + 3)/(8*a + 5)

Then you can indeed work on the genuine fraction field of a polynomial ring:

sage: R.<a> = QQ[]
sage: F = R.fraction_field()
sage: b = 1/F(a)
sage: for i in (1..5):
....:     c = b+1
....:     b = 1/c
....:     print b,",", c
....:     
a/(a + 1) , (a + 1)/a
(a + 1)/(2*a + 1) , (2*a + 1)/(a + 1)
(2*a + 1)/(3*a + 2) , (3*a + 2)/(2*a + 1)
(3*a + 2)/(5*a + 3) , (5*a + 3)/(3*a + 2)
(5*a + 3)/(8*a + 5) , (8*a + 5)/(5*a + 3)

You can see this page for a short presentation.