I'm vey confused by this.

$\frac{df^2}{df}=2f$, by the power rule.

If $f=x+y$, it turns into $\frac{d(x+y)^2}{d(x+y)} = 2(x+y)$.

With the chain rule and expanding, this equals $\frac{\partial (x^2+2xy+y^2)}{\partial x} \frac{\partial x}{\partial (x+y)} + \frac{\partial (x^2+2xy+y^2)}{\partial y} \frac{\partial y}{\partial (x+y)}$.

$\frac{\partial (x+y)}{\partial x} = 1$, so $\frac{\partial x}{\partial (x+y)} = 1$.

Plugging this in gives $\frac{\partial (x^2+2xy+y^2)}{\partial x} + \frac{\partial (x^2+2xy+y^2)}{\partial y} = (2x+2y) + (2x+2y) = 4x + 4y$, which is twice the correct answer.

I've tried this with more than two variables and differentiating w.r.t. more complex functions, and each time it is equal to the correct answer multiplied by the number of variables, even if x, y, etc. are treated differently.

I don't think it's an issue with the chain rule, as it's used verbatim in this, and I looked up the rule for the reciprocals of partial derivatives and that is valid too, so I can't find the issue.

Any insights?

Edit: Actually, I'm still confused.

If $u=x+y$, then $x=u-y$. This seems to say that $\frac{\partial x}{\partial u}=1$. Also, according to the implicit function theorem (I think), $\frac{\partial x}{\partial u}=1$: $F(u, x, y) = u-(x+y) = 0 \rightarrow \frac{\partial x}{\partial u} = -\frac{\partial F / \partial u}{\partial F / \partial x} = -\frac{1}{-1} = 1$.

This brings me right back to the initial issue that I had.


The issue was actually with the partial derivatives.

For the original problem with $\frac{d(x+y)^2}{d(x+y)}$, it can be manipulated into the form $\frac{2x+2y}{1+\frac{dy}{dx}} + \frac{2x+2y}{1+\frac{dx}{dy}}$ through a combination of total derivatives and differentials.

This is where the issue is. Partial derivatives assume that $\frac{d x}{d y}=\frac{d y}{d x}=0$ if both variables are independent. In this case, plugging in $0$ for each gives $\frac{2x+2y}{1+\frac{dy}{dx}} + \frac{2x+2y}{1+\frac{dx}{dy}} = \frac{2x+2y}{1+0} + \frac{2x+2y}{1+0} = 4x+4y$

In this form however, treating the derivatives as ratios of differentials, the expression can be further manipulated into just $2x + 2y$, the correct answer.

(This is part of why I don't like partial derivatives.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.