2

I have $f(\theta,b) = 1 - \theta x - b$. I want to find $$\frac{df(\theta,b)}{d[\frac{1-b}{\theta}]}$$

i.e. the change in $f$ wrt $\frac{1-b}{\theta}$. In the language of limits, $$ \lim_{h \to 0, a \to 0} \frac{f(\theta + h, b + a) - f(\theta, b)}{\frac{1 - b - a}{\theta + h} - \frac{1 - b}{\theta}} $$

I saw this How to find the derivative of one expression with respect to another expression

which made me think I could try $$\frac{df(\theta,b)}{d[\frac{1-b}{\theta}]} = \frac{\frac{df(\theta,b)}{d\theta}}{\frac{d[\frac{1-b}{\theta}]}{d\theta}} = \frac{\theta^2 x}{1 - b}$$

But if I do the same strategy wrt the other variable, I get $$\frac{df(\theta,b)}{d[\frac{1-b}{\theta}]} = \frac{\frac{df(\theta,b)}{db}}{\frac{d[\frac{1-b}{\theta}]}{db}} = \theta$$ which is a contradiction.

  • 1
    What does the expression $df(\theta,b)/dg(\theta,b)$ even mean?!? What exactly is it that you want to compute, and why? – Hans Lundmark Mar 14 '21 at 20:03
  • I believe I got the right answer below, but I want the derivative of f wrt infinitesimal changes in $\frac{1-b}{\theta}$. Is this not well-defined? – Charlie Hou Mar 15 '21 at 00:47
  • Apologies if my notation was nonstandard or unclear. – Charlie Hou Mar 15 '21 at 00:58
  • 1
    Ah, I see the issue. If f isn't shown to be a function of $(1-b)/\theta$ then this expression has no meaning. – Charlie Hou Mar 15 '21 at 01:49
  • As I recall, I think that I always solved this sort of thing via differentials and Jacobians. If you want I will try to write it up. It leads to obvious results but requires setup. There are pitfalls but can usually be done. – rrogers Mar 16 '21 at 21:28

1 Answers1

-1

The thing about decomposing $\frac{df(\theta,b)}{dg(\theta,b)}$ into two separate expressions, and then calculate the product is a fundamentally flawed way to calculate multivariate derivatives. It does often work, but not all the time. This article goes into more detail about it.

To respond to your question, with

$$g(\theta,b)=\frac{1-b}{\theta}$$ we know that $$\theta=\frac{1-b}{g(\theta,b)}$$

Therefore, we plug it into $f$ and get

$$f(\theta,b)=1-\frac{1-b}{g(\theta,b)} x-b$$

And so,

$$\frac{df(\theta,b)}{dg(\theta,b)} = \frac{(1-b)x}{g(\theta,b)^2}$$

which when plugging in for $g(\theta,b)$, gets us the answer you found first, $$\frac{\theta^2 x}{1-b}$$

veryverde
  • 252
  • Sorry, I don't understand this solution. How come you can do a substitution for $\theta$ but not for $b$? Intuitively if $(1-b)/\theta$ is changing, then so is $b$, right? – Charlie Hou Mar 15 '21 at 01:24
  • One of the requirements of using the method you have proposed, is that the function is invertible. Because your functions use two variables, the functions need to be invertible for both variables for it to work for both variables. If you take the derivative with respect to $b$, you are losing information, as $\theta^2$, is non-invertible ($\sqrt(\theta) = \theta, -\theta$). When taking the derivative with respect to $\theta$, because no information is lost (i.e. $b$ has no even power), you get the desired outcome. – veryverde Mar 15 '21 at 06:18