1

I am differentiating a function $f(x,y) = ax( \frac{y}{x} + b)$ with respect to $\frac{y}{x}$ (where $a$ and $b$ are constants). I am doing it in 2 ways and different results come up. What goes wrong?

  1. When $f(x,y) = ax(\frac{y}{x}+ b)$, then: $$\frac{df}{d(\frac{y}{x})} = a \frac{dx}{d(\frac{y}{x})}\Big(\frac{y}{x} + b\Big) + ax(1 + 0)$$ where the term $\frac{dx}{d(\frac{y}{x})}$ I obtain as: $$\frac{dx}{d(\frac{y}{x})} = \frac{1}{\frac{d(\frac{y}{x})}{dx}} = \frac{1}{\frac{-y}{x^2}} = \frac{x^2}{-y}$$ and plug into the expression before, obtaining: $$\frac{df}{d(\frac{y}{x})} = a \Big(\frac{x^2}{-y}\Big) \Big(\frac{y}{x} + b\Big) + ax = -ax - ab\frac{x^2}{y} + ax = - ab\frac{x^2}{y}$$
  1. However, when I first simplify: $f(x,y) = ax( \frac{y}{x} + b) = ay + abx$ and then differentiate, I get: $$\frac{df}{d(\frac{y}{x})} = a \frac{dy}{d(\frac{y}{x})} + ab\frac{dx}{d(\frac{y}{x})}$$ where the term $\frac{dy}{d(\frac{y}{x})}$ I obtain as: $$\frac{dy}{d(\frac{y}{x})} = \frac{1}{\frac{d(\frac{y}{x})}{dy}} = \frac{1}{\frac{1}{x}} = x$$ and plug into the expression before, obtaining: $$\frac{df}{d(\frac{y}{x})} = ax +ab \Big(\frac{x^2}{-y}\Big) = ax - ab\frac{x^2}{y}$$

This is clearly different from the result obtained in 1, so what went wrong ??

  • 4
    The problem is that for the first derivative you are assuming $y$ is constant but for the second you are assuming $x$ is constant. Both cannot be true, and this problem cannot be solved without more information about the relationship between $x$ and $y$ – Ninad Munshi Feb 12 '21 at 22:24
  • 2
    I assume you haven't studied partial derivatives yet, and that $y$ is a function of $x$. You need to use the product & chain rules correctly. I think you're confusing yourself with all those nested fractions. ;) If $u = \frac{y}{x}$, then $$\frac{du}{dx} = \frac{dy/dx}{x} - \frac{y}{x^2}$$ – PM 2Ring Feb 12 '21 at 22:32

0 Answers0