# Why does this partial derivative gives this result?

I have to progress this partial derivative. $$\partial n^{1/2} e^{iφ} / \partial t$$

Using the rule $$(ab)' = a'b + ab'$$

I would guess that the result would be:

$$(1/2) n^{-1/2}e^{iφ} + n^{1/2}ie^{iφ}$$

But the result is this:

$$(1/2) n^{-1/2}e^{iφ} \partial n/\partial t+ n^{1/2}ie^{iφ} \partial φ/\partial t$$

So why were the two extra partial parts there?

• it seems like you are considering $n$ and $f$ "as functions of $t$", so after the product rule, you also need to make use of the chain rule; also I don't see a need for partial derivative... unless $n$ and $f$ depend on more things – peek-a-boo Jun 6 at 0:48
• I edited the question to avoid any confustion. – user1584421 Jun 6 at 0:58
• Do you see how you need to make use of the chain rule? – peek-a-boo Jun 6 at 1:00
• Not really..... – user1584421 Jun 6 at 1:04
• @AndrewLi: But the OP didn't differentiate with respect to $n$ only. He differentiated one term with respect to $n$ and the other with respect to $\varphi$. – Ted Shifrin Jun 6 at 1:24

Define $$a(n) = n^{1/2}$$, and $$b(\varphi) = e^{i \varphi}$$. The function you are interested in is a product of composite functions, defined by \begin{align} F(t) &= a(n(t)) \cdot b(\varphi(t)) \\ &= (a \circ n)(t) \cdot (b \circ \varphi)(t) \end{align}

The derivative you want to calculate is $$F'(t)$$: \begin{align} F'(t) &= (a \circ n)'(t) \cdot (b \circ \varphi)(t) + (a \circ n)(t) \cdot (b \circ \varphi)'(t) \\ &= \left[ a'(n(t)) \cdot n'(t) \right] \cdot (b \circ \varphi)(t) + (a \circ n)(t)\cdot \left[ b'(\varphi(t)) \cdot \varphi'(t) \right] \\ &= \left[ \dfrac{1}{2 \sqrt{n(t)}} \cdot n'(t) \right] \cdot e^{i \varphi(t)} + \sqrt{n(t)} \cdot \left[i e^{i \varphi(t)} \cdot \varphi'(t) \right] \end{align}

In the first $$=$$ sign, I made use of the product rule, and in the second $$=$$ sign, I made use of the chain rule, and hopefully the bracketing makes it clear which term is which, when going from the second to third $$=$$ sign.

The computation I performed above is the notationally precise way of doing things, because it makes all the compositions explicit, and it makes the point of evaluation of derivatives explicit. The "quicker", but imprecise way is to write all this is: $$$$\dfrac{d}{dt} \left( n^{1/2} \cdot e^{i \varphi}\right) = \left(\dfrac{1}{2 \sqrt{n}} \cdot \dfrac{dn}{dt} \right) \cdot e^{i \varphi} + n^{1/2} \cdot \left(i e^{i \varphi} \cdot \dfrac{d \varphi}{dt} \right)$$$$

The key difference between your result and the correct result is that you haven't considered that $$φ$$ and $$n$$ are also functions of $$t$$ in general. With that in mind, consider $$a = n^{1/2}$$ and $$b = e^{iφ}$$ and follow the chain rule from there as you did before.

Using $$'$$ as short hand for differentialion with respect to $$t$$:

\begin{align} (n^{1/2}e^{i\psi})' &= (n^{1/2})'(e^{i\psi})+(n^{1/2})(e^{i\psi})' &&\text{product rule} \\[2ex] &=(\tfrac 12n^{-1/2})(n)'(e^{i\psi})+( n^{1/2})(ie^{i\psi})(\psi)'&&\text{chain rule} \\[2ex] &= \tfrac 12n^{-1/2}e^{i\psi}\tfrac{\partial n}{\partial t}+i n^{1/2}e^{i\psi}\tfrac{\partial \psi}{\partial t} \end{align}

In long form

\begin{align} \tfrac{\partial (n^{1/2}e^{i\psi})}{\partial t} &= \tfrac{\partial (n^{1/2})}{\partial t}\cdot(e^{i\psi})+(n^{1/2})\cdot\tfrac{\partial (e^{i\psi})}{\partial t} &&\text{product rule} \\[2ex] &=\tfrac{\partial (n^{1/2})}{\partial n}\cdot\tfrac{\partial n}{\partial t}\cdot(e^{i\psi})+(n^{1/2})\cdot\tfrac{\partial (e^{i\psi})}{\partial\psi}\cdot\tfrac{\partial \psi}{\partial t}&&\text{chain rule} \\[2ex] &= \tfrac 12n^{-1/2}e^{i\psi}\tfrac{\partial n}{\partial t}+i n^{1/2}e^{i\psi}\tfrac{\partial \psi}{\partial t} \end{align}

• But [n^(1/2)]' gives 1/2n^(-1/2). Why do you also add the n' afterward? – user1584421 Jun 6 at 1:34
• Because $[n^{1/2}]'$ is being used as shorthand for differentiation with respect to $t$. That is $\dfrac{\partial n^{1/2}}{\partial t}$, and by the chain rule $[f\circ g]' = (f'\circ g)\cdot g'$ – Graham Kemp Jun 6 at 1:37

If we do what you think you have done, then $$\dfrac{\partial}{\partial t} \left( n^{1/2} \mathrm{e}^{\mathrm{i}\phi} \right) = 0$$ because there are no explicit "$$t$$"s in "$$n^{1/2} \mathrm{e}^{\mathrm{i}\phi}$$".

Then what you actually did is much weirder. You write $$\dfrac{\partial}{\partial t} \left( n^{1/2} \mathrm{e}^{\mathrm{i}\phi} \right) = (1/2) n^{-1/2}\mathrm{e}^{\mathrm{i}\phi} + n^{1/2} \, \mathrm{i} \, \mathrm{e}^{\mathrm{i}\phi}$$ but the first addend is $$\dfrac{\partial}{\partial n} \left( n^{1/2} \mathrm{e}^{\mathrm{i}\phi} \right) = (1/2) n^{-1/2}\mathrm{e}^{\mathrm{i}\phi}$$ and the second addend is $$\dfrac{\partial}{\partial \phi} \left( n^{1/2} \mathrm{e}^{\mathrm{i}\phi} \right) = n^{1/2} \, \mathrm{i} \, \mathrm{e}^{\mathrm{i}\phi}$$, neither of which is a (total or partial) derivative with respect to $$t$$.

A third (correct) thing to do is this: since you know the answer is not $$0$$, there must be some dependence on $$t$$ in the expression $$n^{1/2} \mathrm{e}^{\mathrm{i}\phi}$$. You don't know if $$n$$ depends on $$t$$, if $$\phi$$ depends on $$t$$, or both. If you don't include a dependency, then your result will be missing terms, so you assume both depend on $$t$$. (Later, if you find out that $$n$$ or $$\phi$$ does not depend on $$t$$, then the $$\partial n/\partial t$$ and/or $$\partial \phi/\partial t$$ will be zero, eliminating the term that came from assuming the dependence, so these extra terms are correct even if there is no actual dependence.) Let's explicitly write the dependence on $$t$$ so that we can more easily keep track of it. (The first line is your product rule.) \begin{align*} &\dfrac{\partial}{\partial t} \left( n(t)^{1/2} \mathrm{e}^{\mathrm{i}\phi(t)} \right) \\ \qquad &{}= \dfrac{\partial}{\partial t} \left(n(t)^{1/2} \right) \mathrm{e}^{\mathrm{i}\phi(t)} + n(t)^{1/2} \dfrac{\partial}{\partial t} \left( \mathrm{e}^{\mathrm{i}\phi(t)} \right) \\ \qquad &{}= (1/2) n(t)^{-1/2} \dfrac{\partial}{\partial t} \left( n(t) \right) \mathrm{e}^{\mathrm{i}\phi(t)} + n(t)^{1/2} \dfrac{\partial}{\partial t} \left( \mathrm{e}^{\mathrm{i}\phi(t)} \right) \\ \qquad &{}= (1/2) n(t)^{-1/2} \dfrac{\partial n(t)}{\partial t} \mathrm{e}^{\mathrm{i}\phi(t)} + n(t)^{1/2} \dfrac{\partial}{\partial t} \left( \mathrm{e}^{\mathrm{i}\phi(t)} \right) \\ \qquad &{}= (1/2) n(t)^{-1/2} \dfrac{\partial n(t)}{\partial t} \mathrm{e}^{\mathrm{i}\phi(t)} + n(t)^{1/2} \mathrm{e}^{\mathrm{i}\phi(t)} \dfrac{\partial}{\partial t} \left( \mathrm{i}\phi(t) \right) \\ \qquad &{}= (1/2) n(t)^{-1/2} \dfrac{\partial n(t)}{\partial t} \mathrm{e}^{\mathrm{i}\phi(t)} + n(t)^{1/2} \mathrm{e}^{\mathrm{i}\phi(t)} \,\mathrm{i}\, \dfrac{\partial \phi(t)}{\partial t} \text{.} \end{align*} Removing the explicit "$$(t)$$"s, to return to the initial notation, we have $$(1/2) n^{-1/2} \dfrac{\partial n}{\partial t} \mathrm{e}^{\mathrm{i}\phi} + n^{1/2} \mathrm{e}^{\mathrm{i}\phi} \,\mathrm{i}\, \dfrac{\partial \phi}{\partial t} \text{,}$$ which, after a little commuting of multiplicands, is literally the result you write.

If this seems unfamiliar, I recommend (re-)studying implicit differentiation and the chain rule.