Wait, why is x.diff(f(x)) not 0? We discussed this quite at length
when we first implemented the ability to do this (you can probably
find the discussion on the mailing list if you search for it), and we
came to the conclusion that dF(x, f(x))/df(x) as used in variational
calculus means nothing more than dF(x, y)/dy|y=f(x). On other words,
the fact that f(x) depends on x is irrelevant. You are just taking the
derivative with respect to the second "variable" in the expression,
which happens to be evaluated at f(x). See also the docstring of
Derivative.

Aaron Meurer

On Sat, Nov 2, 2013 at 2:16 PM, F. B. <franz.bona...@gmail.com> wrote:
>
>
> On Saturday, November 2, 2013 5:48:30 PM UTC+1, Aaron Meurer wrote:
>>
>> But in general, you can't invert formulas (and even if you
>> mathematically can, it doesn't mean that solve() can do it).
>>
>
> I was just thinking about this, and about the more general case where you
> are deriving by unknown expression.
>
> I suggest that in such cases the differentiation returns an unevaluated
> derivative.
>
> It would be nice to handle derivation by another function, for example:
>
>>>> x.diff(f(x))
> Derivative(x, f(x))
>>>> x.diff(f(y))
> Derivative(x, f(y))
>>>> f(x).diff(g(x))
> Derivative(f(x), g(x))
>>>> f(x).diff(g(y))
> Derivative(f(x), g(y))
>
> At least, I would start be leaving the derivative unevaluated, so in the
> future it will be easier to add tools to handle functional derivatives.
>
> Saullo, do you think you can add something like this?
>
>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to