On Thursday, September 3, 2015 at 8:54:54 AM UTC+3, Carl Sandrock wrote:
>
> If I do
>
> import sympy
> k, V, Vprime = sympy.symbols('k, V, Vprime')
> print sympy.diff(k + V(t), t)
>
> I get Derivative(V(t), t) as I expect - the derivative distributes and 
> the constant term has zero derivative.
>
> However, if I construct an equivalent expression via substitution, 
> simplify does not distribute the derivative. How can I get the same 
> result via substitution as when I evaluate the expression directly?
>
> sympy.diff(Vprime(t)).subs({Vprime(t): k + V(t)}).simplify()
>
> returns Derivative(k + V(t), t).
>
>
> Perhaps you could use ``doit()``` instead of ``simplify()``. 

>  
>
>

-- 
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/9b6ed804-e080-4a70-9433-1ed44475069c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to