3

I just saw a video on the chain rule, and it stated that

$$\frac{\mathrm{d}}{\mathrm{d}x}\left[y(u(x))\right] = \frac{\mathrm{d}y}{\mathrm{d}x}$$

I don't understand this; if I let $y(x) = x^2$ and $u(x) = \sqrt x$ then

$$\frac{\mathrm{d}y}{\mathrm{d}x} = 2x$$

and

$$\frac{\mathrm{d}}{\mathrm{d}x}\left[y(u(x))\right] = \frac{\mathrm{d}}{\mathrm{d}x} \left[x\right] = 1$$

Clearly, I am completely misunderstanding something. What is it?

EDIT: It is my understanding right now that $y(u(x)) = (\sqrt x)^2 = x$. Is this wrong?

Vincent
  • 2,064
  • 2
    Could you link us to the YouTube video? – Cameron Williams May 13 '15 at 00:24
  • Sure, it's Khan Academy: https://www.khanacademy.org/math/differential-calculus/taking-derivatives/proving-the-chain-rule/v/chain-rule-proof He starts his definition of the chain rule like this, at 0:45 – Vincent May 13 '15 at 00:26
  • 1
    $y(u) = u^2$ and $u(x) = \sqrt{x}$ means $y(x) = x$, not $y(x) = x^2$. – shoover May 13 '15 at 00:34
  • @shoover but when $y(u) = u^2$ then surely $y(x) = x^2$ , no? Aren't those just variable names? Also see my edit to the question. – Vincent May 13 '15 at 00:37
  • @GFauxPas That makes sense, which is why I didn't write $y(u)$ in the question. Is it false that $y(u(x)) = y(\sqrt x) = (\sqrt x)^2 = x$? – Vincent May 13 '15 at 00:42
  • 1
    @pjs36 Haha, thank you! – Vincent May 13 '15 at 02:19
  • I deleted my previous comment that essentially said "That is a really misleading notation for an introduction to the chain rule" because I had second thoughts. But I am convinced now that it should at least be written as $\frac{d(y \circ u)}{dx}$, not the way it is in the video. – pjs36 May 13 '15 at 02:41

3 Answers3

3

But it is not $y(x)$, it is $y(u(x))$.

So, if $y(v) = v^2$ and $u(x) = \sqrt{x}$, then $y(u(x)) =y(\sqrt{x}) =(\sqrt{x})^2 =x $.

If we apply the chain rule, then, since $y'(v) = 2v$, $(y(u(x))' =y'(u(x))u'(x) =2u(x) (\sqrt{x})' =2\sqrt{x} (\frac12 x^{-{1/2}}) =1 $.

By the way, the proof in that video is incomplete. It fails to consider the possibility that $u'(x) = 0$. Hardy's classic "A Course of Pure Mathematics" has a discussion of this on page 217 (section 114) in the 10th edition. He says that this is a common error.

marty cohen
  • 107,799
  • Yes, I understand that, I actually did that same calculation beforehand. It is very clear to me using the tick-notation. My problem seems to be that $\frac{\mathrm{d}}{\mathrm{d}x}\left[y(u(x))\right] = \frac{\mathrm{d}y}{\mathrm{d}x}$ implies $\left[y(u(x))\right]' = y'(x)$. – Vincent May 13 '15 at 00:52
  • No. You can not make the "u" disappear. – marty cohen May 13 '15 at 00:54
  • Oh okay, so you're saying that we must define $y$ using $y(v) = v^2$ and not x, because x is what being used in our function $u$. Then $\frac{\mathrm{d}y}{\mathrm{d}x}$ can't be transformed to $y'(x)$ because $y$ is not a function of $x$. Correct? – Vincent May 13 '15 at 00:57
  • Correct. It's a common mistake when learning the chain rule. – marty cohen May 13 '15 at 01:02
  • Thank you. I have been wondering for a while what that x or v really is, do you maybe know a good link for that or could explain it to me? Also, do they have a generic name? – Vincent May 13 '15 at 01:05
  • 1
    A common term is "compound function." Having one function being the argument of another function is called the composition of the functions. – marty cohen May 13 '15 at 01:16
  • @Vincent try Googling bound variables vs free variables, maybe. I'm not sure it will help you. – GFauxPas May 13 '15 at 01:17
  • The only real problem with the statement $$\frac{d}{dx}[y(u(x))] = \frac{dy}{dx}$$ is that it kind of hides the chain rule in the second step. It isnt missing, the right hand side can then be expanded as $$\frac{dy}{dx} = \frac{dy}{du} \frac{du}{dx}$$ where the first term is the derivative of the outside and the second is the derivative of the inside. The thing is y is still globally a function of x so the first statement isnt technically wrong – Triatticus May 13 '15 at 01:51
3

Im going to use the following notation, hoping that it will be clearer for you.

$\frac{d}{dx}(f(x)) = f'(x)$. Using this notation the chain rule says that

$\frac{d}{dx}[y(u(x))]=[y(u(x))]'=u'(x)[y'(u(x))]=\frac{du}{dx}(x)\frac{dy}{dx}(u(x))$

I used to translate this symbol pattern to english in the following way, given a composite function $y(u(x))$, I call $y(x)$ the "outside" and $u(x)$ the "inside" function. Then, the derivative of a composite function $y(u(x))$ is the derivative of the "inside" function ($u'(x)$) times the derivative of the "outside" function, $evaluated$ in the "inside" function ($y'(u(x))$). I hope it helps!

  • Thank you very much, but the tick-notation is very clear to me. My problem is that $\frac{\mathrm{d}}{\mathrm{d}x}\left[y(u(x))\right] = \frac{\mathrm{d}y}{\mathrm{d}x}$ implies $\left[y(u(x))\right]' = y'(x)$. – Vincent May 13 '15 at 00:51
  • Yes! I know! that is not generally true! unless $u(x)=x$ – Joaquin Liniado May 13 '15 at 00:55
  • 1
    would it help to write this a little differently - $\frac{d}{dx}[y(u(x))]=[y(u(x))]'=u'(x)[y'(u(x))]=\frac{du}{dx}(x)\frac{dy}{dx}(u(x))$ – WW1 May 13 '15 at 00:56
  • absolutely, I edited over there – Joaquin Liniado May 13 '15 at 00:59
2

Your confusion is reading the abbreviation of $\frac{\mathrm d y}{\mathrm d x}$ as $\frac{\mathrm d y(x)}{\mathrm d x}$ instead of $\frac{\mathrm d y(u(x))}{\mathrm d x}$ as you ought.

$$\begin{align} u(x) & \mathop{:=} \surd x \\ y(u) & \mathop{:=} u^2 \\ \therefore y(u(x)) & = y(\surd x) \\ & = (\surd x)^2 \\ & = x \end{align}$$

The dependent variable $y$ is defined as a function of the dependent variable $u$, which is in turn defined as a function of the independent variable $x$. Thus $y$ is a composition function when expressed with respect to $x$.

It is to be understood that when we differentiate the dependent variable $y$ with respect to $x$ we are differentiating this composition.

For clarity let's use different letters for the dependent variables and the functions by which they are defined.   Then we have an independent variable $x$, and dependent variables $u$ and $y$ are defined as functions $f$ and $g$, such that $y=f(u)$ and $u=g(x)$.   When differentiating $y$ with respect to $x$ we apply the chain rule to the composition of $f$ and $g$ (that is $f\circ g).$

$\begin{align} u & \mathop{:=}g(x) \\[1ex] y & \mathop{:=} f(u) \\[1ex] & = [f\circ g](x) \\[3ex] \therefore \dfrac{\mathrm d y}{\mathrm d x} & = \dfrac{\mathrm d [f\circ g](x)}{\mathrm d x} \\[1ex] & = \dfrac{\mathrm d f(g(x))}{\mathrm d g(x)} \cdot \dfrac{\mathrm d g(x)}{\mathrm d x} \\[1ex] & = \frac{\mathrm d y}{\mathrm d u}\frac{\mathrm d u}{\mathrm d x} \\[2ex] & = \frac{\mathrm d u^2}{\mathrm d u}\frac{\mathrm d \surd x}{\mathrm d x} \\[1ex] & = 2u\cdot\frac {1}{2\surd x} \\[1ex] & = \frac{2\surd x}{2\surd x} \\[1ex] & = 1 \end{align}$

Graham Kemp
  • 129,094
  • Thank you for this nice wrap-up, that was really helpful. My only question is about this sentence: "The dependent variable y is defined as a function of the dependent variable u [...]." What about if I define $y(v) = v^2$, where $v$ is also an independent variable. It should still work, right? So I have $$\frac{\mathrm{d}}{\mathrm{d}x}\left[y(u(x))\right] = \frac{\mathrm{d}y}{\mathrm{d}u} \frac{\mathrm{d}u}{\mathrm{d}x}$$ Can I even compute $\frac{\mathrm{d}y}{\mathrm{d}u}$ if $y$ is not a function of $u$? Or do we just implicitly set $v = u(x)$ or something like that? – Vincent May 13 '15 at 02:06
  • @Vincent , if we define $y$ as a function in terms of $v$, then the abbreviation $\frac{\mathrm d y}{\mathrm d u}$ does not mean anything unless the implicit argument $v$ is explicitly defined elsewhere in terms of $u$. We'd have to be explicit and use $\frac{\mathrm d y(u)}{\mathrm d u}$. – Graham Kemp May 13 '15 at 03:13
  • Alright, that makes a lot of sense. Thank you! – Vincent May 13 '15 at 04:09