Hi,

On Thu, Jan 21, 2010 at 2:14 AM, Stochastix
<laurent.decreusef...@gmail.com> wrote:

<SNIP>

> In other words, how can we substitute x=2 to the expression 8*x ?
>  I guess this is somewhere in the docs but I didn't find where.

Is the following what you want?

[mv...@mod primroots]$ sage
----------------------------------------------------------------------
| Sage Version 4.3, Release Date: 2009-12-24                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: a = 2*x
sage: b = a^2
sage: g = diff(b, x)
sage: g
8*x
sage: g(x=2)
16

The documentation on symbolic expressions [1] might help, or the
section on substitution [2].

[1] 
http://www.sagemath.org/doc/reference/sage/symbolic/expression.html#sage.symbolic.expression.Expression.subs

[2] 
http://www.sagemath.org/doc/reference/sage/symbolic/relation.html#substitution

-- 
Regards
Minh Van Nguyen
-- 
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