dy(x)/dy



On Sunday 30 November 2008 20:01:41 N.A.Beishuizen at ctw.utwente.nl 
wrote:

> I try to take the next derivative:
> d/dy(y(x))
>
> (%i) d: diff(y(x),x);
> (%o) d/dy(y(x))

I guess you confuse diff(y(x),x) and diff(y(x),y).

> Why?
> I expect this expression to be 1, like in the following:
> (%i) d: diff(y,x);
> (%o) 1

  diff(y,x) => 0

unless you assigned y : x + %c.

> I then try to fix this by substitution:
>
> (%i) d: subst(y,y(x),d);
> (%o) 1
>
> but this does not work for double derivatives:
> (%i) d: diff(diff(y(x),y),x);
> (%i) d: subst(y,y(x),d);
> (%o) d^2y/dxdy

  diff(y(x),y) => 'diff(y(x),y,1)
  diff(y(x),y,2) => 'diff(y(x),y,2)
  diff(y(x),y(x)) => 1
  diff(y(x),y(x),2) => 0

> Why this behaviour and how can I make it work the way I want
> without explicitly declaring dependencies?

  depends(y,x) ?

-- 
Prickle Prickle, Aftermath 42 YOLD 3174
Alexey Beshenov  http://beshenov.ru/