Hello
I have this derivative of a function that has an argument which is also a
function
# Declaration
x = symbols('x')
U, Theta = symbols('U Theta', cls=Function)
# Function to derive
obj_function = Theta(U(x),x)
# Derivative
gradient_obj_function = obj_function.diff(x)
And this is the output I obtain
Derivative(Theta(U(x), x), x) + Derivative(U(x),
x)*Subs(Derivative(Theta(_xi_1, x), _xi_1), (_xi_1,), (U(x),))
How can I replace Subs(Derivative(Theta(_xi_1, x), _xi_1), (_xi_1,),
(U(x),)) with Derivative(Theta(U(x), x), U(x)) ?
I found this post,
https://groups.google.com/forum/#!searchin/sympy/"chain$20rule"/sympy/OfF5PklJtmY/t1FPWt3n8xIJ,
but it was not clear to me how this has to be done.
Thanks
Miguel
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/5d9dfd23-be1a-4a08-9289-43562d0062f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.