TITLE: What is the difference between $\frac{\mathrm{d}}{\mathrm{d}x}$ and $\frac{\partial}{\partial x}$?
QUESTION [15 upvotes]: Is there not any difference between $\frac{\mathrm{d}}{\mathrm{d}x}$ and $\frac{\partial}{\partial x}$ as long as your function has one variable?
$f(x) = x^3\implies \left\{\begin{align}&\dfrac{\mathrm{d}}{\mathrm{d}x}f = \dfrac{\mathrm{d}f}{\mathrm{d}x}=\dfrac{\mathrm{d}(x\mapsto x^3)}{\mathrm{d}x} = x\mapsto 3x^2&\color{green}{\checkmark}\\&\dfrac{\partial}{\partial x}f = \dfrac{\partial f}{\partial x}= \dfrac{\partial(x\mapsto x^3)}{\partial x} = x\mapsto 3x^2&\color{green}{\checkmark}\end{align}\right.$
And if so, why does this change with two (or more) variables?
$\require{cancel}
f(x,y) = yx^3\implies \left\{\begin{align}&\color{grey}{\cancel{\dfrac{\mathrm{d}}{\mathrm{d}x}f = }} \dfrac{\mathrm{d}f}{\mathrm{d}x}=\dfrac{\mathrm{d}((x,y)\mapsto yx^3)}{\mathrm{d}x} \neq x\mapsto 3yx^2&\color{green}{\checkmark}\\&\dfrac{\partial}{\partial x}f = \dfrac{\partial f}{\partial x} =\dfrac{\partial((x,y)\mapsto x^3)}{\partial x} = x\mapsto 3yx^2&\color{red}{\mathcal{X}}\end{align}\right.$
I get that it is supposed to be something like this
$f(x,y) = yx^3\implies \left\{\begin{align}&\color{grey}{\cancel{\dfrac{\mathrm{d}}{\mathrm{d}x}f = }} \dfrac{\mathrm{d}f}{\mathrm{d}x}=\dfrac{\mathrm{d}((x,y)\mapsto yx^3)}{\mathrm{d}x} \neq\\&\cdots\quad (x,y)\mapsto 3y\dfrac{\mathrm{d}\color{red}{(x\mapsto x^3)}}{\mathrm{d}x}+\dfrac{\mathrm{d}\color{red}{(y\mapsto y)}}{\mathrm{d}x}x^3 =\\&\cdots\quad (x,y)\mapsto 3y\color{red}{(x\mapsto x^2)}+\dfrac{\mathrm{d}\color{red}{(y\mapsto y)}}{\mathrm{d}x}x^3&\color{green}{\checkmark}\\&\dfrac{\partial}{\partial x}f = \dfrac{\partial f}{\partial x} = \dfrac{\partial(x,y)\mapsto x^3)}{\partial x} = x\mapsto 3yx^2&\color{green}{\checkmark}\end{align}\right.$

REPLY [3 votes]: In the following  we  consider real-valued functions 
\begin{align*}
&f:\mathbb{R}\rightarrow\mathbb{R}&\text{and}\qquad\quad&g:\mathbb{R}^2\rightarrow\mathbb{R}\\
&x\mapsto f(x)&&(x,y)\mapsto g(x,y)
\end{align*}
We denote with $\frac{\partial}{\partial x}$ the partial derivative of a function $f$ with respect to the variable $x$ and with $\frac{d}{dx}$ the  total derivative of a function $f$ with respect to the variable $x$.

A short answer is:

In the one-variable case there is no difference between the total derivative and the partial derivative of $f$ with respect to $x$.
In the multi-variable case there is in general a difference between the total and the partial derivative.


$$ $$

Multivariable case: We consider the total  derivative   of $g=g(x,y)$  with  respect   to $x$. It is defined as
  \begin{align*}
\frac{dg}{dx}&=\frac{\partial  g}{\partial x}\cdot\frac{dx}{dx}+\frac{\partial  g}{\partial y}\cdot\frac{dy}{dx}\\
&=\frac{\partial g}{\partial x}+\frac{\partial g}{\partial y}\cdot\frac{dy}{dx}\tag{1}
\end{align*}
  and this is generally not the same as
  \begin{align*}
\frac{\partial  g}{\partial x}
\end{align*}

Example: $g(x,y)=yx^3$
We obtain
\begin{align*}
\frac{d}{dx}g(x,y)&=\frac{\partial }{\partial x}g(x,y)+\frac{\partial }{\partial y}g(x,y)\cdot\frac{dy}{dx}\\
&=\frac{\partial }{\partial x}(yx^3)+\frac{\partial }{\partial y}(yx^3)\cdot\frac{dy}{dx}\\
&=3x^2y+x^3\frac{dy}{dx}\\
\end{align*}
whereas
\begin{align*}
\frac{\partial }{\partial x}g(x,y)&=\frac{\partial }{\partial x}(yx^3)\\
&=3x^2y
\end{align*}
We observe the total derivative and the partial derivative are different in general. They are the same in the example above only when
\begin{align*}
\frac{dy}{dx}\equiv 0
\end{align*}

Single variable case: 
In this case the total derivative and the partial derivative are the same since applying (1) in the single variable case is
  \begin{align*}
\frac{df}{dx}&=\frac{\partial  f}{\partial x}\cdot\frac{dx}{dx}=\frac{\partial f}{\partial x}
\end{align*}