Hi,

On Wed, Jul 22, 2009 at 11:49 PM, Bill Page<bill.p...@newsynthesis.org> wrote:

>> ---------
>> h = f(x^2).diff(x)*(x+1/x)
>>
>> sage: h.subs(f(x^2)==1)
>> 2*(x + 1/x)*x*D[0](f)(x^2)
>>
>> sage: h.subs(f(x^2).diff(x)==0)
>> 2*(x + 1/x)*x*D[0](f)(x^2)
>> ---------
>
> It does not make sense to ask to "substitute" 'f(x^2)=1' into 'h'
> because 'f(x^2)' is an expression - not a function.

May be I didn't understand you properly. Are you saying substituting
an expression (f(x^2)) within an expression (h) by a constant is
invalid?

If so, then isn't: "(x+x^2).subs(x==1)" invalid as well?

Anyway, it does not help whether you substitute by
a constant or by an expression, the problem remains.
Within sage the only way I  know, to do above substitution is
to do
-------
sage: h.subs(f(x^2).diff(x)/(2*x)==0)
0
-------
However, even using such ugly tricks, I have encountered issues in
substituting expression that contains new derivative.

Cheers,
Golam

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to