I tried this. Do I need include some package in Sage. I have
sage3.0.5dfsg-4ubuntu1 installed via apt-get. I got this output
sage: time pts = E.integral_model().integral_points()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call
last)

/home/jaakko/Desktop/<ipython console> in <module>()

/usr/lib/pymodules/python2.5/IPython/iplib.pyc in ipmagic(self, arg_s)
   1180         else:
   1181             magic_args = self.var_expand(magic_args,1)
-> 1182             return fn(magic_args)
   1183
   1184     def ipalias(self,arg_s):

/usr/lib/pymodules/python2.5/IPython/Magic.pyc in magic_time(self,
parameter_s)
   1969         else:
   1970             st = clk()
-> 1971             exec code in glob
   1972             end = clk()
   1973             out = None

/home/jaakko/Desktop/<timed exec> in <module>()

AttributeError: 'EllipticCurve_generic' object has no attribute
'integral_model'


On Dec 7, 1:42 am, Yann <yannlaiglecha...@gmail.com> wrote:
> From the example you give:
>
> 2x**3+385x**2+256x-58195=3y**2  , over the rational field
>
> it's not direct because sage does not handle general cubic equation
> yet.
> In sage, let's define:
> {{{
> sage: R.<x,y> = QQ[]
> sage: P = 2*x**3 + 385*x**2 + 256*x - 58195 - 3*y**2}}}
>
> Given an equation
>
> A6 + A4 x + A3 y + A2 x**2 + A1 xy + A5 y**2 + A7 x**3 = 0.
>
> You can obtain do by hand the change of variables Q(x' , y' ) = P( -
> x*A5*A7 , y * A7**2 * A5 ) / ( A5**3 * A7**4 )
> a simplified equation:
> {{{
> sage: Q = P( x=-x*(-3)*2 , y=y*2**2*(-3) ) / ( (-3)**3*2**4 )
> sage: Q
> -x^3 - 385/12*x^2 + y^2 - 32/9*x + 58195/432
>
> }}}
>
> You can then define the elliptic curve and compute integral points
> {{{
> sage: E = EllipticCurve(Q)
> sage: time pts = E.integral_model().integral_points()
> CPU times: user 2.74 s, sys: 0.02 s, total: 2.76 s
> Wall time: 7.58 s
>
> }}}
>
> at this point, you need to come back to the original curve, removing
> solutions not integral after the inverse change of variables
>
> {{{
> sage: x_coords = [ x/6 for x,y,z in pts if 6.divides(ZZ(x)) ]
> sage: x_coords
> [-191, -157, -67, -49, -23, -19, 19, 23, 61, 103, 521, 817, 3857,
> 10687, 276251]
>
> }}}
>
> On Dec 6, 6:41 pm, Jaakko Seppälä <jaakko.j.sepp...@gmail.com> wrote:
>
> > I read 
> > fromhttp://mathoverflow.net/questions/7907/elliptic-curves-integer-points
> > than Sage can determine the integer points of an elliptic curve. What
> > commands will do the trick?

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to