What is $\frac{\mathrm{d}f(x,x)}{\mathrm{d}x}$ 
Related: Is $\frac{\partial}{\partial x} f(x,y(x))$ ambiguous?

If $f(x,x) = x^2$, is it correct to say that $\dfrac{\mathrm{d}f(x,x)}{\mathrm{d}x} = 4x$?
I know that $\dfrac{\mathrm{d}f(x,y)}{\mathrm{d}x} = \dfrac{\partial f(x,y)}{\partial x}+\dfrac{\partial f(x,y)}{\partial x}\dfrac{\mathrm{d}y}{\mathrm{d}x}$, and setting $y=x$ would indeed let this equal $4x$. It seems a bit awkward to me, but I don't see why it would be wrong, however I don't see if this is ever useful. Is it correct?
 A: You can't really just write $f(x,x)=x^2$, that doesn't define $f$ fully (it only defines it on the "diagonal" of the domain). You would need to write something else, like $f(x,y)=xy$ and then $g(x)=f(x,x)=x^2$. Then $g'(x)$ will turn out to be $2x$ still, even if you use the multivariable chain rule. Indeed $g'(x)=\frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \frac{dy}{dx}$ where $y=x$ so you have $y+x \cdot 1=2x$.
A: $f(x,x) = x^2$ that is the same thing as saying $f(x) = x^2$
It would really help if you told us what $f(x,y)$ equaled.
Suppose $f(x,y) = xy$ and $y = x.$ 
$\dfrac{\mathrm{d}f(x,y)}{\mathrm{d}x} = \dfrac{\partial f(x,y)}{\partial x}+\dfrac{\partial f(x,y)}{\partial y}\dfrac{\mathrm{d}y}{\mathrm{d}x}$
$\frac{\partial f(x,y)}{\partial x} = y\\
\frac{\partial f(x,y)}{\partial y} = x\\
\frac{\mathrm{d}y}{\mathrm{d}x} = 1\\
\frac{\mathrm{d}f(x,x)}{\mathrm{d}x} = x + x = 2x\\
$ 
A: you likely mean $=2x$ not $=4x$.
Yes it is correct and the chain rule would indeed apply the way you tried.
