| 1 | initial version |
The input f(x) = cos(x) is preparsed by Sage as follows.
sage: preparse('f(x) = cos(x)')
'__tmp__=var("x"); f = symbolic_expression(cos(x)).function(x)'
The following definition
sage: f = lambda x: 1
is synonymous with
sage: def f(x): return 1
If you want a symbolic function returning 1, see the discussion at
https://groups.google.com/d/topic/sage-devel/thSpls984Ik/discussion
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.