Hello Jorge,
When you make a function with := , the right-hand side
of the definition is not evaluated at the time you make
the definition. So g(x):=diff(f(x), x); doesn't make
g(x) equal to 2 x.
There are two ways to evaluate the right-hand side of
a function definition --
(%i1) f(x) := x^2$
(%i2) g(x) := ''( diff (f(x), x) );
(%o2) g(x) := 2 x
(%i3) define (g(x), diff (f(x), x));
(%o3) g(x) := 2 x
Notice in both cases the right-hand side of g is 2 x.
In line %i2, notice the quote marks. Those are two single
quotes, not a double quote character. The two single quotes
cause the evaluation of the stuff in the parentheses.
(The placement of the parentheses is important. Try the
example with and without the parentheses and note the
difference.)
"define" is a function which defines a function. It is
like := , but it always evaluates the right-hand side.
Hope this helps,
Robert Dodier
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide