On Monday, 23 November 2015 19:38:39 UTC, Ondrej Certik wrote:
>
> On Mon, Nov 23, 2015 at 12:20 PM, Dima Pasechnik <[email protected]
> <javascript:>> wrote:
> >
> >
> > On Monday, 23 November 2015 00:43:02 UTC, William wrote:
> >>
> >> This definitely looks like a bug. In the meantime, a workaround is to
> >> use sympy:
> >>
> >> sage: var('m a0')
> >> (m, a0)
> >> sage: x=2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0;x
> >> 2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0
> >> sage: limit(x, m=oo)
> >> [BAD]
> >> sage: limit(x, m=oo, algorithm='sympy')
> >> 4000000
> >>
> >> I wonder -- to what extent should we be using maxima by default still
> >> for limits, instead of sympy...? At some point, presumably sympy will
> >> be uniformly better than maxima?
> >
> >
> > the bug is not really in maxima, it's in Sage's interface to maxima:
> >
> > (%i7) limit(2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m +
> > 2)*a0,m,inf);
> > (%o7) 400000
>
> Note that William's result has one more zero in the answer... Which
> one is correct?
>
one doesn't need a computer here :)
lim_{m->oo} 2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0 =
2/5*(0 - 1)*(a0 - 10^6) + 1/5*(0 + 2)*a0=2*10^6/5 = 400000
I don't know where extra 0 came from, I get the same answer as maxima or my
pen:
sage: x=2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0;x
2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0
sage: limit(x, m=oo, algorithm="sympy")
400000
Dima
>
> Ondrej
>
> >
> > (this is with 'sage --maxima')
> > probably extra maxima packages loaded along with maxima cause this OOM
> in
> > Sage.
> >
> >
> >>
> >>
> >> Public worksheet:
> >>
> >>
> >>
> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>
> >>
> >> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner <[email protected]>
> wrote:
> >> > Forwarded to the correct list
> >> >
> >> > ---------- Forwarded message ----------
> >> > From: G. M.-S. <[email protected]>
> >> > Date: Sun, Nov 22, 2015 at 4:34 PM
> >> > Subject: [sage-release] Bug in limit?
> >> > To: [email protected]
> >> >
> >> >
> >> >
> >> > Hello.
> >> >
> >> > This is my first post, please be indulgent.
> >> >
> >> > Is the following a bug?
> >> >
> >> > Thanks in advance.
> >> >
> >> > Guillermo Moreno-Socías
> >> >
> >> >
> ┌────────────────────────────────────────────────────────────────────┐
> >> > │ SageMath Version 6.9, Release Date: 2015-10-10
> │
> >> > │ Type "notebook()" for the browser-based notebook interface.
> │
> >> > │ Type "help()" for help.
> │
> >> >
> └────────────────────────────────────────────────────────────────────┘
> >> > sage: var('m a0')
> >> > (m, a0)
> >> > sage: x=2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0;x
> >> > 2/5*((3/4)^m - 1)*(a0 - 1000000) + 1/5*(3*(3/4)^m + 2)*a0
> >> > sage: limit(x,m=oo)
> >> >
> >> > ;;;
> >> > ;;; Detected access to protected memory, also kwown as 'bus or
> >> > segmentation fault'.
> >> > ;;; Jumping to the outermost toplevel prompt
> >> > ;;;
> >> >
> >> > (Note that if x is expanded then the limit is correctly calculated.)
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "sage-release" group.
> >> > To unsubscribe from this group and stop receiving emails from it,
> send
> >> > an email to [email protected].
> >> > To post to this group, send email to [email protected].
> >> > Visit this group at http://groups.google.com/group/sage-release.
> >> > For more options, visit https://groups.google.com/d/optout.
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "sage-support" group.
> >> > To unsubscribe from this group and stop receiving emails from it,
> send
> >> > an email to [email protected].
> >> > To post to this group, send email to [email protected].
> >> > Visit this group at http://groups.google.com/group/sage-support.
> >> > For more options, visit https://groups.google.com/d/optout.
> >>
> >>
> >>
> >> --
> >> William (http://wstein.org)
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > Visit this group at http://groups.google.com/group/sage-support.
> > For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.