Question: Differentiating with respect to a function

I'm having a few problems with differentiating in Maple. I have a potential function U given by:

U[c] := (1/2)*r^2+M[1]/r[1]+M[2]/r[2];

U[r] := r^2*(M[1]*M[2]-3)/(2*c^2)+((x(tau)+diff(y(tau), tau))^2+(y(tau)-(diff(x(tau), tau)))^2)^2/(8*c^2)+3*(M[1]/r[1]+M[2]/r[2])*((x(tau)+diff(y(tau), tau))^2+(y(tau)-(diff(x(tau), tau)))^2)/(2*c^2)-(M[1]/r[1]+M[2]/r[2])^2/(2*c^2)-M[1]*M[2]*(1/r[1]+(1/r[1]-1/r[2])*(1-3*mu-7*x(tau)-8*(diff(y(tau), tau)))+y(tau)^2*(M[2]/r[1]^3+M[1]/r[2]^3))/(2*c^2);

U := U[c]+U[r]

Now, what I would like to do is treat x(tau) as 'x', and get a partial derivative of U wrt x, treating diff(x(tau),tau) as a completely separate variable.

I'm not really sure how you would do this, though, as you would be essentially differentiating wrt a function...

Please Wait...