On Tue, Apr 15, 2008 at 3:35 AM, Pablo <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I have the following piece of code :
>
>  function('f',x)
>  function('g',x)
>  equation1 = (f(x) + g(x) == x^3)
>  equation2 = (f(x) ==  x^3)
>  substitutions = {f: log, g:exp}
>
>
>
>  Then I would like to substitute variables in the equations :
>
>  equation1.substitute(substitutions)   ->  log(x) + exp(x) = x^3
>  equation2.substitute(substitutions)   -> f(x) = x^3
>  equation2.substitute(f=log)              -> log(x) = x^3
>
>  Why is there no substitution in the second line ? How can I be assured
>  that the substitution has effectively taken place when I substitute
>  for many functions ?
>

I think this is a bug:

  http://trac.sagemath.org/sage_trac/ticket/2933

One nasty workaround thing that does work is

sage: substitutions = {'f': log, 'g':exp}
sage: equation2.substitute(**substitutions)
log(x) == x^3

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to