Derivative with respect to 2 multiplied variables Let $$u = vw^2 + sv^n.$$ I want to calculate $\frac{du}{d(vw)}$. I calculated it as  $$\frac{du}{d(vw)}=w,$$ but using symbolab I got $$\frac{du}{d(vw)} = \frac{vw^2 + sv^n}{vw}$$ I pretty sure I am right, but if I am not I'd like an explanation.
The link for symbolab: https://www.symbolab.com/solver/derivative-calculator/%5Cfrac%7Bd%7D%7Bd%5Cleft(vw%5Cright)%7D%5Cleft(vw%5E%7B2%7D%2Bsv%5E%7Bn%7D%5Cright)?or=input
Thanks!
 A: The answer depends on whether you view $w$ as a constant or whether you view $v$ as a constant when you vary $x \equiv vw$.  If you hold $w$ constant, then you have
$$
u = xw + sx^n/w^n \quad \Rightarrow \quad \left( \frac{\partial u}{\partial x} \right)_w = w + n \frac{s x^{n-1}}{w^n} = w + n s \frac{v^{n-1}}{w}
$$
but if you hold $v$ constant then you have
$$
u = \frac{x^2}{v} + sv^n = \quad \Rightarrow \quad \left( \frac{\partial u}{\partial x} \right)_v = \frac{2x}{v} = 2w.
$$
As you can see, the result depends on which variable you fix as constant when you take the derivative.  This feature of partial derivatives is (in my opinion) not really emphasized enough in multi-variable calculus courses.
A: It totally depends on whether $dvdw>0$ ($v$ and $w$ are both increasing or decreasing) or $dvdw<0$ (either $v$ or $w$ is increasing and the other is decreasing) or $dx=0$ where $x\in \{v,w\}$ (only either $v$ or $w$ is not changing; $du/d(vw)$ is undefined if $dv=0 \wedge dw=0$).
\begin{eqnarray}
dvdw&>&0\\
\dfrac{du}{d(vw)}&=&\lim_{h\to 0}{\dfrac{u(v-h,w-h)-u(v,w)}{(v-h)(w-h)-vw}}\\
&=&\lim_{-h\to 0}{\dfrac{u(v-h,w-h)-u(v,w)}{(v-h)(w-h)-vw}}\\
&\equiv&\lim_{h\to 0}{\dfrac{u(v+h,w+h)-u(v,w)}{(v+h)(w+h)-vw}}\\
&=&\lim_{h\to 0}{\dfrac{(v+h)(w+h)^2+s(v+h)^n-vw^2-sv^n}{(v+h)(w+h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{vh}}\\
&=&2w\\
&=&\dfrac{2vw}{v}\\
dw&=&0\\
\dfrac{du}{d(vw)}&=&\lim_{h\to 0}{\dfrac{u(v+h,w)-u(v,w)}{(v+h)w-vw}}\\
&=&\lim_{h\to 0}{\dfrac{(v+h)w^2-vw^2+s(v+h)^n-sv^n}{wh}}\\
&=&\dfrac{w^2+snv^{n-1}}{w}\\
\end{eqnarray}
We can notice that if we define:
$$
\gamma_{x\in \{v,w\}} :=\begin{cases}
0 &\text{if}& dx=0\\
-1 &\text{if}& dvdw<0\\
&& dvdw>0\wedge x=w\\
1 &\text{if}& dvdw>0\wedge x=v
\end{cases}\\
$$
We get:
$$
\dfrac{du}{d(vw)}=\dfrac{\gamma_v2vw-\gamma_w(w^2+snv^{n-1})}{\gamma_vv-\gamma_ww}
$$
A: Let $u=vw^2+sv^n.$
Assume that, $x=vw$, this implies that $sv^n=sx^nw^{-n}$ and $\dfrac{dw}{dx}=\dfrac{1}{\dfrac{dx}{dw}}=\dfrac{1}{v}$. Then we can write $u$ as:
$u=xw + sx^nw^{-n}$, now differentiate using product rule to have
\begin{equation*}
  \begin{split}
   \dfrac{du}{d(vw)}&=\dfrac{du}{dx}\\
     &=w\dfrac{dx}{dx}+x\dfrac{dw}{dx} + sw^{-n}\dfrac{dx^n}{dx} + sx^n\dfrac{dw^{-n}}{dx}\\
     &=w +x\dfrac{1}{v} + nsw^{-n}x^{n-1} -nsx^nw^{-n-1}\dfrac{dw}{dx}\\
     &=w +vw\dfrac{1}{v} + nsw^{-n}(vw)^{n-1} -ns(vw)^nw^{-n-1}\dfrac{1}{v}\\
     &=w + w + nsw^{-1}v^{n-1} -nsv^{n-1}w^{-1}\\
     &=2w
  \end{split}
 \end{equation*}
