Confusion regarding partial derivatives

This is probably  very silly question, but I am slightly unsure and would appreciate clarification.

Suppose $f(t),g(t)$ are functions of $t$ and $\phi(f,g)$ is some function of $f(t),g(t)$.

What then would $\partial \phi\over \partial f$? Now my first reckoning is that it is not necessarily $0$. However, in variational calculus, for an integrand $F(x,y,y')$ say equal to $y$, we would have ${\partial F\over \partial x}=0$ even though $y$ is a function of $x$. What is the difference here? Also can we not consider $\phi$ as just another function of $t$...?

-
$\frac{\partial\phi}{\partial f}$ can certainly be equal to $0$. For example, what if $\phi(f,g) = g$? –  Arturo Magidin Mar 27 '12 at 21:52
Isn't this impossible to answer? We are only given two general functions $f(t)$, $g(t)$, and $\phi(f,g)$. This strikes me as similar to asking something like: $$\text{What's } \frac{df(x)}{dx}\text{ ?}$$ Also, yes--$\phi$ is just another function of $t$. –  000 Mar 27 '12 at 21:59
It is often helpful to draw a diagram of the dependency graph, (hopefully) a so-called DAG or directed acyclic graph. It is best to start with the independent variables at the top, and have each level of dependency down one row, therefore making [math.stackexchange.com/questions/109265/… example of mine a bad example, but maybe you get the idea. From these diagrams, it becomes simple to apply the chain rule (just sum over all paths between two nodes), which is the fundamental tool. –  bgins Mar 27 '12 at 22:15
@ArturoMagidin: I missed out the adjective "necessarily" for the $0$. Also, what if $g$ despite being a function of $t$ can also be expressed as function of $f$? Then do we still take the partial derivative as 0? –  partial Mar 27 '12 at 22:18
@partial: Yes. The fact that $f$ and $g$ are "really" functions of $t$ is irrelevant for the computation of the partial with respect to $f$. If, in one variable, $f(x)=x$, then $\frac{df}{dx}=1$, even if $x$ is a function of $t$ and $x(t) = t^2$; of course, it will matter if you try to compute $\frac{df}{dt}$, but not for $\frac{df}{dx}$. Similarly, the fact that $f$ and $g$ are functions of $t$ is irrelevant for the purposes of computing $\partial(\phi)/\partial f$: you are just asking how $\phi$ changes relative to changes in its first argument, when the second argument is fixed. –  Arturo Magidin Mar 27 '12 at 22:22

I think the problem is in your equivocal use of the term "function of". A function is something that assigns each value in its domain a value in its range (where the domain may consist of tuples of values if the function takes several arguments). Now by "$\phi(f,g)$ is some function of $f(t),g(t)$" one might mean one of three quite different things:

1. $\phi$ assigns a real value to any two functions $f$ and $g$.
2. $\phi$ assigns a real value to any two real values $f$ and $g$.
3. $\phi$ assigns a real value to any real value $t$, which is computed by substituting $f(t)$ and $g(t)$ into a formula $\phi(f,g)$.

In the first case, $\phi$ is usually called a functional, and one considers its variation $\delta\phi$. In the second case, $\phi$ is a function of two real arguments, and one considers its partial derivatives $\partial\phi/\partial f$ and $\partial\phi/\partial g$. In the third case, $\phi$ is a function of one real argument, and one considers its total derivative $\mathrm d\phi/\mathrm dt$.

You're mixing up cases 2 and 3. In variational calculus, $F(x,y,y')$ is considered as a function of three variables, and then of course its partial derivative with respect to the first of those arguments is $0$ if its value is given by the second argument. Here $y$ is not being considered as a function of $x$, but as one of three arguments of $F$.

When we form an integral like $\int F(x,y(x),y'(x))\mathrm dx$, we do consider the integrand as a function of $x$, but that doesn't mean we consider $F$ as a function of $x$. Likewise, we can form the total derivative of the expression $F(x,y(x),y'(x))$ with respect to $x$, but that doesn't make $F$ a function of $x$. You might read things like "thus we can consider $F$ as a function of $x$", possibly in conjunction with somewhat confusing notation like $\mathrm dF/\mathrm dx$, but then a different function $F(x)$ is being considered, a function of one real argument which assigns to each real value $x$ the value $F(x,y(x),y'(x))$, and this function of one argument is not the function $F(x,y,y')$ of three arguments; in particular it's not the function we're talking about when we form $\partial F/\partial x$.

-
Thank you very much!! –  partial Mar 28 '12 at 11:42
Suppose the system is of the form $x(t), y(t)$ are functions of $t$, and $f(x,y)$ is a function of the $x,y$ which are in turn dependent on $t$. Now I have a differential equation $\ddot{y}={\partial f\over \partial x}$ then what is the RHS? The thing is, the equation is really in $t$ right? So is it $0$? –  partial Mar 28 '12 at 11:49
@partial: The fact that you're using the same sort of ambiguous expressions as in the question makes me wonder whether you've understood the answer :-). You're switching between regarding $x$ and $y$ as variables and regarding them as functions. When you say "$f(x,y)$ is a function of the $x,y$", then you're regarding $x$ and $y$ as variables. It's not clear what it would then mean to say "which are in turn dependent on $t$". What you probably mean by that is that you can substitute the values of functions $x(t)$ and $y(t)$ at $t$ for the variables $x$ and $y$ in $f(x,y)$. –  joriki Mar 28 '12 at 11:59
@partial: That is what's usually meant by the short-hand notation $\ddot y=\frac{\partial f}{\partial x}$: Form the partial derivative of the function $f$ with respect to one of its variables, $x$, then substitute $x(t)$ for $x$ and $y(t)$ for $y$, and equate this to $\ddot y(t)$ (a function of $t$). –  joriki Mar 28 '12 at 12:02
@partial: Your idea that the partial derivative should be $0$ seems to result from some confusion in which you're considering both $x$ and $t$ simultaneously as variables on which $f$ depends. There is no such $f$; there is only a function $f(x,y)$ of two variables, $x$ and $y$, and an expression $f(x(t),y(t))$ that you can consider as a function of one variable, $t$. –  joriki Mar 28 '12 at 12:04