Some curves are described by equations of the form $$F(x,y)=0$$. For example, $$x^2+y^2=1$$ is the equation of circle of radius 1. For the upper semi-circle we can solved it for $$y$$ and write $$y=\sqrt{1-x^2}$$ and for the lower semi-circle $$y=-\sqrt{1-x^2}$$. There is no function $$y=f(x)$$ near $$(\pm 1,0)$$ that  satisfies $$F(x,f(x))=0$$.

Let $$F(x,y)=0$$. Suppose $$F(x_0,y_0)=0$$ and $$F$$ has continuous first partial derivatives and so is differentiable. There are two questions that we try to  answer:

1. Can we solve for $$y$$ as a function of $$x$$ near $$(x_0,y_0)$$? In other words, can we find a function $$y=f(x)$$ defined on some interval $$I=(x_0-h,x_0+h)$$ (for $$h>0$$) such that $$F(x,f(x))=0$$?
2. If such a function exists, what is $$f'(x_0)=\frac{dy}{dx}\Big|_{x=x_0}?$$

Suppose such a function exists. To find $$f'(x_0)$$

Method (a): We use the chain rule:
$\frac{dF}{dx}=\frac{\partial F}{\partial x}\underbrace{\frac{dx}{dx}}_{=1}+\frac{\partial F}{\partial y}\underbrace{\frac{dy}{dx}}_{=f'(x)}=0.$ so that

$\bbox[#F2F2F2,5px,border:2px solid black]{f'(x_0)=\frac{dy}{dx}\Big|_{x=x_0}=-\frac{\dfrac{\partial F}{\partial x}(x_0,y_0)}{\dfrac{\partial F}{\partial y}(x_0,y_0)},\quad\text{provided}\quad \frac{\partial F}{\partial y}(x_0,y_0)\neq 0.}$

Method (b): Because $$F$$ is constant and therefore its the total differential is zero.
$dF=\frac{\partial F}{\partial x} dx+\frac{\partial F}{\partial y} dy=0.$ If we divide the above equation by $$dx$$ and assume $$F_y(x_0,y_0)\neq 0$$, we obtain the same result as method (a).

We assumed that a function $$y=f(x)$$ existed and then showed the condition $$\frac{\partial F}{\partial y}(x_0,y_0)\neq 0$$ was required for calculation of $$f'(x_0)$$. In fact, it can be proved this condition, $$F_y(x_0,y_0)\neq 0$$, is sufficient for the existence of $$y=f(x)$$ with the aforementioned conditions. The condition $$F_y(x_0,y_0)\neq 0$$ means that the tangent line to the level curve $$F(x,y)=0$$ is not vertical, and therefore, a part of the level curve — close enough to the point $$(x_0,y_0)$$— can be the graph of the function $$y=f(x)$$. When $$F_y(x_0,y_0)=0$$, you may not be able to find such a function. For example in Fig. 1, if we just keep the shaded disk around $$(x_0,y_0)$$ and remove the rest of the level curve, what we get can be the graph of a function, because any vertical line now does not intersect this part of the curve more than once. However, at $$A$$ or $$B$$, where the tangent line is vertical, we cannot find a disk around them (to keep the curve and remove the rest) where a vertical line does not intersect the level curve twice. Therefore the level curve near $$A$$ or $$B$$ cannot be the graph of a function.

Noting $$F_x$$ and $$F_y$$ are both functions of $$x$$ and $$y$$, higher derivatives of $$y$$ with respect to $$x$$ can be found by successive differentiation with respect to $$x$$ provided higher partial derivatives of $$F(x,y)$$ exist:
$\frac{\partial F}{\partial x}+\frac{\partial F}{\partial y} y’=0 \Rightarrow \frac{\partial^2 F}{\partial x^2}+2\frac{\partial^2 F}{\partial x \partial y}y’+\frac{\partial^2 F}{\partial y^2} y’^2+\frac{\partial F}{\partial y} y”=0$ $\Rightarrow \frac{\partial^3 F}{\partial x^3}+3\frac{\partial^3 F}{\partial x^2 \partial y} y’+3 \frac{\partial^3 F}{\partial x \partial y^2}y’^2+\frac{\partial^3 F}{\partial y^3}y’^3+3\frac{\partial^2 F}{\partial y^2}y’ y”+3\frac{\partial^2 F}{\partial x \partial y}y”+\frac{\partial F}{\partial y} y”’=0$

Example 1
Given $$y^3 – x^3 – 3 y^2 – x^2 + 6=0$$, find $$dy/dx$$.

Solution
Let $$F(x,y)=y^3 – x^3 – 3 y^2 – x^2 + 6$$. Thus:
$F_x(x,y)=3x^2-2x,\quad F_y(x,y)=3y^2-6y,$ and it follows that
$\frac{dy}{dx}=-\frac{F_x}{F_y}=-\frac{3x^2-2x}{3y^2-6y}.$ We cannot use the above formula when $$3y^2-6y=0$$.
$3y^2-6y=3y(y-2)=0\Rightarrow y=0\ \text{or}\ y=2.$ As you can see in Fig. 2, when $$y=0$$ and $$y=2$$, the tangent line to the curve is vertical.

Now suppose the equation $$F(x,y,z)=0$$ is given, where $$F$$ has continuous partial derivatives. If $$F(x_0,y_0,z_0)=0$$ and $$\partial F/\partial z (x_0,y_0,z_0)\neq 0$$, $$z$$ near $$(x_0,y_0,z_0)$$ can be written as a function of $$x$$ and $$y$$, namely $$z=f(x,y)$$. In other words, the level surface $$F(x,y,z)=0$$ can be locally the graph of a function $$z=f(x,y)$$. To find the partial derivatives of $$f$$, we differentiate the equation $$F(x,y,z)=0$$ with respect to $$x$$ and $$y$$:
$\frac{\partial F}{\partial x}+\frac{\partial F}{\partial z}\frac{\partial z}{\partial x}=0,\quad \frac{\partial F}{\partial y}+\frac{\partial F}{\partial z}\frac{\partial z}{\partial y}=0.$ Therefore:

$\frac{\partial z}{\partial x}(x_0,y_0)=\frac{\partial f}{\partial x}(x_0,y_0)=-\dfrac{\frac{\partial F}{\partial x}(x_0,y_0,z_0)}{\frac{\partial F}{\partial z}(x_0,y_0,z_0)}$ and
$\frac{\partial z}{\partial y}(x_0,y_0)=\frac{\partial f}{\partial y}(x_0,y_0)=-\dfrac{\frac{\partial F}{\partial y}(x_0,y_0,z_0)}{\frac{\partial F}{\partial z}(x_0,y_0,z_0)}.$

Example 2
Given $$z^2-x^2-y^2=3$$, find $$\frac{\partial z}{\partial x}$$ and $$\frac{\partial z}{\partial y}$$.

Solution
Let $$F(x,y,z)=z^2-x^2-y^2-3$$. Then $\frac{\partial F}{\partial x}=-2x, \quad \frac{\partial F}{\partial y}=-2y,\quad \frac{\partial F}{\partial z}=2z.$ Therefore:
$\bbox[#F2F2F2,5px,border:2px solid black]{\frac{\partial z}{\partial x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial z}}=-\frac{-2x}{2z}=\frac{x}{z},\quad \frac{\partial z}{\partial y}=-\frac{\frac{\partial F}{\partial y}}{\frac{\partial F}{\partial z}}=-\frac{-2y}{2z}=\frac{y}{z}.}$ Note that $$\frac{\partial F}{\partial z}=2z\neq 0$$ and the above expressions are valid everywhere because for any point on the level surface, $$|z|\ge 3$$ (note $$z^2=3+x^2+y^2\geq 3$$).

In general we have the following theorem.

Theorem 1. (Implicit Function Theorem) Suppose $$F(x_1,\cdots,x_n,z)=0$$ and $$F$$ is of class $$C^1$$ (i.e., has continuous first partial derivatives). Assume:
$F(\mathbf{x}_0,z_0)=0\quad \text{and} \quad \frac{\partial F}{\partial z}(\mathbf{x}_0,z_0)\neq 0,$ where $$\mathbf{x}_0\in\mathbb{R}^n$$ and $$z_0\in\mathbb{R}$$. Then there is a neighborhood $$U$$ of $$\mathbf{x}_0$$ in $$\mathbb{R}^n$$, a neighborhood $$V$$ of $$z_0$$ in $$\mathbb{R}$$, and a function $$f:U\subseteq \mathbb{R}^n\to V$$ of class $$C^1$$ such that if $$\mathbf{x}=(x_1,\cdots,x_n)\in U$$ and $$z\in V$$ satisfy $$F(\mathbf{x},z)=0$$, then $$z=f(\mathbf{x})$$. The partial derivatives of $$f$$ are given by:
$\frac{\partial f}{\partial x_i}(\mathbf{x}_0)=-\dfrac{\dfrac{\partial F}{\partial x_i}(\mathbf{x}_0,z_0)}{\dfrac{\partial F}{\partial z}(\mathbf{x}_0,z_0)}.$