On Thu, Aug 21, 2008 at 4:44 AM, Andelf <[EMAIL PROTECTED]> wrote: > I am a starter, so I don't understand why this goes wrong > > I typed: > > x = var('x') > f = log(2+sqrt(arctan(x)*sin(1/x))) > lim(f, x=0) > > and got: > Traceback (click to the left for traceback) > ... > Is sin(1/x)*atan(x) positive or zero? > actually I should get a log(2). > > who can help me explain it?
Use the assume command, as illustrated below. You'll eventually get log(2): sage: x = var('x') sage: f = log(2+sqrt(arctan(x)*sin(1/x))) sage: lim(f, x=0) Traceback (most recent call last): ... TypeError: Computation failed since Maxima requested additional constraints (use assume): Is sin(1/x)*atan(x) positive or zero? sage: assume(sin(1/x)*atan(x) > 0) sage: x = var('x') sage: f = log(2+sqrt(arctan(x)*sin(1/x))) sage: lim(f, x=0) Traceback (most recent call last): ... TypeError: Computation failed since Maxima requested additional constraints (use assume): Is sin(1/x) positive or zero? sage: assume(sin(1/x)>0) sage: x = var('x') sage: f = log(2+sqrt(arctan(x)*sin(1/x))) sage: lim(f, x=0) Traceback (most recent call last): ... TypeError: Computation failed since Maxima requested additional constraints (use assume): Is atan(x) positive or zero? sage: assume(atan(x) > 0) sage: x = var('x') sage: f = log(2+sqrt(arctan(x)*sin(1/x))) sage: lim(f, x=0) log(2) --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---