Then use simplistic rules of derivative like d(x+c) = dx, d(ax+c) = a dx.

 

Sent from Mail for Windows 10

 

From: JS S
Sent: 04 January 2020 21:28
To: sympy
Subject: Re: Re: [sympy] Suggestion on Derivative and Expr._diff_wrt

 

Your suggestion is true. However, using ``Derivative(f(x), x) * 1/Derivative(x+1, x)`` explicitly every time is not very systematic approach.

If we know "Hey, df(x)/d(x+1) equals (df(x)/dx)/(d(x+1)/dx)!", then why don't we let SymPy know to automatically deal with this case with same approach?

 

Let me put this in another word. We know that ``dsin(x)/dx == cos(x)``. Then, how can we use this to evaluate ``expr = 1+Derivative(sin(x), x)``?

Although we can evaluate this by manually substituting like ``expr.subs(Derivative(sin(x), x), cos(x))``, we let SymPy know that  ``dsin(x)/dx == cos(x)``, so that we can just use ``expr.doit()``.

 

My idea is same: ``f(x).diff(x+1)`` is better than ``(Derivative(f(x), x) * 1/Derivative(x+1, x)).doit()``. If we can do something explicitly, then it would be better to do it implicitly.

 


2020 1 5 일요일 오전 12 27 17 UTC+9, Vishesh Mangla 님의 :

Why don’t you use the chain rule (d f(x) / dx) * (dx/d(x+1)). For first order derivative you can use the reciprocal therefore dx/d(x+1) = 1/(d(x+1)/dx).

 

Sent from Mail for Windows 10

 

From: David Bailey
Sent: 04 January 2020 16:36
To: [email protected]
Subject: Re: [sympy] Suggestion on Derivative and Expr._diff_wrt

 

On 04/01/2020 10:08, Francesco Bonazzi wrote:

It's suggest to subclass Derivative if this feature is needed. 
 

I'd like to know what d f(x)/d(x+1) means exactly. It isn't too easy to GOOGLE.

David

 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/3ee75111-deca-b796-b400-79068e928745%40dbailey.co.uk.

 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/52688c3f-9ccc-483a-87be-063d65846560%40googlegroups.com.

 


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/5e10cfa4.1c69fb81.38abf.24a3%40mx.google.com.

Reply via email to