6

I was given a problem, we define: $$z(x,y) = x\sin(y^2), y(x) = 2x+1.$$ We wish to use the chain rule to compute $\frac{\partial z}{\partial x}.$ I know, I can get the correct answer using the Jacobian; however, the tree diagram fails me I this regard because,

$$ \frac{\partial z}{\partial x} = \frac{\partial z}{\partial x} + \frac{\partial z}{\partial y}\frac{\partial y}{\partial x}.$$ Obviously, we have a problem here. Am I misunderstanding something?

  • 1
    Obviously, we have a problem here Can you explicit this problem? – mathcounterexamples.net Oct 06 '22 at 19:45
  • You have, "$\frac{\partial z}{\partial x} = \frac{\partial z}{\partial x} + \text{ another expression}$." Do you see the issue? – Accelerator Oct 06 '22 at 19:45
  • @Accelerator, yes I do indeed see the issue, I was just applying the chain rule tree diagram algorithm as an undergraduate student would. What is the subtle thing that makes such an expression not possible? – Tobias Rieper Oct 06 '22 at 19:49

2 Answers2

9

In fact, this is only a problem of abused notations. $z$ is a map of two variables, that we usually denote by $x$ and $y$.

Then to avoid any notation issue, we should denote with another letter the map $z(x,y(x))$. For example write $Z(x) = z(x,y(x))$. And what you're looking for is to compute, using the chain rule:

$$\begin{aligned}\frac{dZ}{dx}(x)&= \frac{\partial z}{\partial x}(x,y(x)) + \frac{\partial z}{\partial y}(x,y(x))\frac{\partial y}{\partial x}(x)\\ &=\sin y^2(x) + 2y(x) \cos y^2(x) \times 2\\ &= \sin((2x+1)^2)+ 4(2x+1)\cos((2x+1)^2) \end{aligned}$$ With the correct notation above, there is no issue at all.

5

Hopefully, this can clear things up.

If we have $z=f(x,y)$ and $y=g(x)$, then the chain rule for $\frac{dz}{dx}$ becomes

$$\frac{dz}{dx} = \frac{\partial f}{\partial x}\cdot \frac{dx}{dx} + \frac{\partial f}{\partial y}\cdot \frac{dy}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\cdot \frac{dy}{dx}$$

where we use the fact that $\frac{dx}{dx} = 1$.

Using that formula on $z=f(x,y)=x\sin{\left(y^2\right)}$, you should get

$$\frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\cdot \frac{dy}{dx} = \sin\left(y^{2}\right)+x\cos\left(y^{2}\right)\left(2y\right)\left(2\right).$$

Plug in $y=2x+1$ and it should be the same answer as using the Jacobian method.

Accelerator
  • 4,923
  • I see. I didn't think of it like that. I'll edit my post now. @ruakh – Accelerator Oct 07 '22 at 04:11
  • 1
    To really clarify the problem, the map $f(x,y(x))$ should not be denoted by $z(x)$. $z$ is a map of two variables. $f(x,y(x)$ of only one variable, namely $x$. This is why another symbol should be used for it. – mathcounterexamples.net Oct 07 '22 at 04:58