What is the partial derivative of $f(x,y(x))$? What is the total derivative of $f(x,y(x,z))$ with respect to $x$? Is it $$\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial x}?$$
If this is correct, what is $\frac{\partial f}{\partial x}$? It seems to me that partial $f$ partial $x$ is equal to the derivative of $f$ with respect to $x$. What is the difference? I mean, suppose $f(x,y(x,z))=x^2+y(x,z)$ and $y(x,z)=x^2+z.$ So we have $f(x,y(x,z))=2x^2+z.$ Hence $\frac{\partial f}{\partial x}=4x.$ On the other hand, $\frac{df}{dx}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial x}=4x+1\cdot 2x=6x.$ Am I making a mistake?
 A: The mistake is that $\frac{\partial f}{\partial x}$ means two different things in these cases. In the first case, we assume that $z$ does not depend on $x$, meaning $\frac{\partial z}{\partial x} = 0$. We can write $f(x,z) = 2x^2 + z$. So we get $$\frac{df}{dx} = \frac{\partial f}{\partial x} = 4x.$$
In the second case, we have $f(x,y) = x^2 + y$ with $y(x,z) = x^2 + z$ Whether or not $y$ depends on $x$, we always get $\frac{\partial{f}}{{\partial x}} = 2x$. For the total derivative however, we have to take implict dependencies into account, giving
$$\frac{df}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial x} = 2x + 1\cdot 2x = 4x.$$  
A: Your computation of $\frac{\partial}{\partial x}f(x,y(x,z))$ is correct, but I think what you're stumbling on in your subsequent example is that
$$
\frac{\partial}{\partial x}f(x,y(x,z)) \neq \frac{\partial f}{\partial x}.
$$
The expression on the left is a composition of functions. The expression on the right is a shorthand for $\frac{\partial f}{\partial x}(x,y)$, which is the derivative of $f$ with respect to $x$ at the point $(x,y)$, where neither $x$ nor $y$ are given in terms of other variables.
It might help conceptually to write down the composition as a separate function. In the case of $f(x,y(x,z)) = x^2 + y(x,z)$ for $y(x,z) = x^2 + z$, you really have a new function $g(x,z) = f(x,y(x,z))$, and the chain rule indeed says that
$$
\frac{\partial g}{\partial x} = \frac{\partial f}{\partial x}(x,y(x,z)) + \frac{\partial f}{\partial y}(x,y(x,z))\cdot\frac{\partial y}{\partial x}(x,z),
$$
but this is very different from and does not say that $\frac{\partial f}{\partial x} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial x}$. To verify that this is true, note that we can calculate the lefthand side directly as
$$
    \frac{\partial g}{\partial x} = \frac{\partial}{\partial x}(2x^2 + z) = 4x,
$$
and the righthand side as
\begin{align*}
    \frac{\partial f}{\partial x}(x,y(x,z)) + \frac{\partial f}{\partial y}(x,y(x,z))\cdot\frac{\partial y}{\partial x}(x,z)
   &= \frac{\partial}{\partial x}(x^2+y)|_{y = x^2 + z} + \frac{\partial}{\partial y}(x^2 + y)|_{y = x^2 + z}\cdot \frac{\partial}{\partial x}(x^2 + z)\\
   &= 2x + 1 \cdot 2x = 4x.
\end{align*}
