I have got confused about this problem, what I have thought was differentiating this with respect to $x$ gives -
$\frac{dz}{dx} = 2x + x \frac{dy}{dx} + y + 2y \frac{dy}{dx}$
But, I came across an online video which did it in this way-
$\frac{dz}{dx} = 2x + y$
How is this possible? What am I missing?
This is a three dimensional equation, so $y$ is not a constant, so this person cant treat $y$ as a constant I believe.