# How to partially differentiate following implicit equation of Z with respect to X?

I don't understand the logic behind this partial derivative and how it's derived. From equation 1, our objective function is written implicitly as a function of x,y. We treat y constant, and z a f(x).

Z is a function of x and y and implicitly written: $$x^{3}+y^{3}+z^{3}+6xyz=1$$

To find dz/dx(partial) we differentiate implicitly with respect to x, treating y as a constant: $$3x^{2}+3z^{2}\dfrac {\partial z}{\partial x}+6yz+6xy\dfrac {\partial z}{\partial x}=0$$

This is where I am lost. How and why is there a last component that includes x. It doesn't make sense and seems like the last component is being added twice.

Solving this equation for our partial:

$$\dfrac {\partial z}{\partial x}=-\dfrac {x^{2}+2yz}{z^{2}+2xy}$$

I'm confusing myself because it's written implicitly and somehow I don't think I have the correct formula; I understand how the 3rd z term got differentiated but this last 6xyz term being included twice isn't clicking

$$\dfrac{\partial}{\partial x}(u \cdot v) = u \cdot \dfrac{\partial v}{\partial x} + v \cdot \dfrac{\partial u}{\partial x}$$
The last term $6xyz$ can be split into two separate factors $6x$ and $yz$. Differentiating leads to:
$$\dfrac{\partial}{\partial x}6x \cdot yz + 6x \cdot \dfrac{\partial}{\partial x} yz = 6 \cdot yz + 6x \cdot y\dfrac{\partial z}{\partial x}$$