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 <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > *From: *David Bailey <javascript:> > *Sent: *04 January 2020 16:36 > *To: *[email protected] <javascript:> > *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] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/3ee75111-deca-b796-b400-79068e928745%40dbailey.co.uk > > <https://groups.google.com/d/msgid/sympy/3ee75111-deca-b796-b400-79068e928745%40dbailey.co.uk?utm_medium=email&utm_source=footer> > . > > > -- 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/df0445ea-8997-490e-80f5-7b9cc57d64a7%40googlegroups.com.
