On Friday, March 25, 2011 9:35:13 PM UTC-7, Surendran Karippadath wrote:
>
> If the multiplication sign * is absent ( say by mistake!) what is SAGE 
> evaluating? 
> For example: 
> x=var('x');f=1/((x-1)(x-3)); 
> f.limit(x=1) returns -1/3 
> diff(f,x) returns -1/(x - 4)^2 
> plot(f,(x,0,10)) plots a smooth curve going through -1/3. 
>
> It is clear it is evaluating f =1/(x-4). How? Why is not pointing to 
> the possible error? 
>

I think it's taking the expression (x-1), treating it as a symbolic 
expression, and plugging in (x-3) for x, thus obtaining (x-3-1) = (x-4).  
Actually, here's what happens when I do this:

sage: x=var('x');f=1/((x-1)(x-3)); 
/Applications/sage/local/lib/python2.6/site-packages/IPython/iplib.py:2073: 
DeprecationWarning: Substitution using function-call syntax and unnamed 
arguments is deprecated and will be removed from a future release of Sage; 
you can use named arguments instead, like EXPR(x=..., y=...)
  exec code_obj in self.user_global_ns, self.user_ns
sage: f
1/(x - 4)

If you didn't see the warning, what version of Sage are you using?

-- 
John

-- 
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