I came across the following partial derivative exercise:
Exercise:
Let $F(x,y) = f(x^2+g(x+2y))$, where $f$ and $g$ are differentiable functions of one variable. Given that the equation $F(x,y)=0$ defines a function $ y(x)$, show that:
$$\frac{dy}{dx} = \frac{2x+g'(w)}{2g'(w)}$$
where $w=x+2y$.
My try:
$$F(x,y)=0$$
Differentiating both sides,
$$\frac{\partial F}{\partial x} + \frac{\partial F}{\partial y}\frac{dy}{dx} = 0$$
So
$$\frac{dy}{dx} = - \frac{\partial F}{\partial x} \bigg/ \frac{\partial F}{\partial y}$$(for $\frac{\partial F}{\partial y}$ different than $0$)
We just need to compute the partials: $$1. \qquad \frac{\partial F}{\partial x} = \frac{\partial f}{\partial u} \bigg( 2x + \frac{\partial g}{\partial w} \big( 1 + 2 \frac{dy}{dx} \big) \bigg)$$ where $u = x^2 + g(x+2y)$. $$2. \qquad \frac{\partial F}{\partial y} = 2 \frac{\partial f}{\partial u} \cdot \frac{\partial g}{\partial w} $$ Applying this in our formula, $$\frac{dy}{dx} = - \frac{2x + \partial_w g\big( 1 + 2 \cdot dy/dx \big)}{2 \partial_w g}$$ $$\frac{dy}{dx} = - \frac{2x + \partial_w g }{2 \partial_w g} - \frac{dy}{dx}$$ $$2 \frac{dy}{dx} = - \frac{2x + \partial_w g }{2 \partial_w g}$$ $$\frac{dy}{dx} = - \frac{2x + \partial_w g }{4 \partial_w g}$$ To me $g'(w) = g_w$ or $\partial_w g$. I think that this is the only possibility, really. Then I must be wrong somewhere. I've been looking over these equations again and again and I know I am missing something, but I do not know what.
First, you should get out of the habit of writing partial derivatives when a function (here $f$ and $g$) is a function of a single variable. Second, you've forgotten when you compute your $\partial F/\partial x$ and $\partial F/\partial y$ that we're treating $x$ and $y$ as independent variables throughout this computation. Thus, \begin{align*} \frac{\partial F}{\partial x} &= f'(x^2+g(x+2y))\big(2x + g'(x+2y)\big) \\ \frac{\partial F}{\partial y} &= f'(x^2+g(x+2y))\big(2g'(x+2y)\big) \end{align*} So, $$\frac{dy}{dx} = - \frac{f'(x^2+g(x+2y))\big(2x + g'(x+2y)\big)}{f'(x^2+g(x+2y))\big(2g'(x+2y)\big)} = -\frac{2x+g'(x+2y)}{2g'(x+2y)}.$$ Ah, note there's a negative missing in the "given answer."