What does it mean to differentiate $f(\theta_1)/f(\theta_2) = C$ with respect to theta? In the book I am reading, at one point they differentiate Snell's Law with respect to ${\theta}$:
$$\frac{d}{d\theta}\Bigl(\frac{\sin(\theta_{1})}{\sin(\theta_{2})}=\frac{\eta_{2}}{\eta_{1}}\Bigr),$$
which they claim gives the result:
$$\frac{\cos(\theta_{1})d\theta_{1}}{\cos(\theta_{2})d\theta_{2}}=\frac{\eta_{2}}{\eta_{1}}.$$
I have no reason not to believe that this is true, but I really don't understand what it means to differentiate two different variables ($\theta_{1}$ and $\theta_{2}$) with respect to a third variable ($\theta$). I suppose the two variables aren't necessarily completely independent as they are both values on the axis of $\theta$, but I can't really grasp it. $\frac{\eta_{2}}{\eta_{1}}$ is also a constant, so why would it not go to $0$?
Here is a link to the section of the book in question:
http://www.pbr-book.org/3ed-2018/Reflection_Models/Specular_Reflection_and_Transmission.html#eq:spherical-L-transmitted
and their definition of Snell's Law:
http://www.pbr-book.org/3ed-2018/Reflection_Models/Specular_Reflection_and_Transmission.html#eq:snells-law
I am new here, so apologies in advance if I have done something incorrectly in this post. Any nudge in the right direction would be really appreciated!
EDIT: Actually, $\theta_{1}$ and $\theta_{2}$ are just functions of $\theta$ aren't they? Oops. So I guess I need to think of it like this:
$$\frac{d}{d\theta}\Bigl(\frac{f(g(\theta))}{f(h(\theta))}=C\Bigr),$$
 A: You have two functions of $\theta$:

*

*$\frac{f(g(\theta))}{f(h(\theta))}$, and


*$C$ (which is constant as a function of theta).
The derivative of the second one is zero, of course. The derivative of the first can be computed using the chain rule and quotient rule. It's a little simpler to rewrite as
$$
f(g(\theta)) = C f(h(\theta))
$$
We can then differentiate both sides, using the chain rule, to  get
$$
f'(g(\theta)) g'(\theta) = C f'(h(\theta)) h'(\theta)
$$
Dividing through a bit, that gives
$$
\frac{f'(g(\theta))}{f'(h(\theta))} \frac{g'(\theta)}{h'(\theta)} = C.
$$
Replacing $f$ by $\sin$, and$g$ and $h$ respectively by $\theta_1$ and $\theta_2$, that becomes
$$
\frac{\cos(\theta_1(\theta))}{\cos(\theta_2(\theta))} \frac{\theta_1'(\theta)}{\theta_2'(\theta)} = C.
$$
And then switching to Leibniz notation, and omitting the "theta" argument, we have
$$
\frac{\cos(\theta_1(\theta))}{\cos(\theta_2(\theta))} \frac{\frac{d\theta_1}{d\theta}}{\frac{d\theta_2}{d\theta}} = C.
$$
And finally, "cancelling" the $d\theta$s (a la the chain rule), this becomes
$$
\frac{\cos(\theta_1(\theta))}{\cos(\theta_2(\theta))} \frac{d\theta_1}{d\theta_2} = C.
$$
