How to find the derivative of one expression with respect to another expression

I've been trying to find a way to take the derivative of one expression with respect to another expression, but I can't think of any obvious way to do it, and I'm not even sure where I should start.

For example, would it be possible to find the derivative of $x^6$ with respect to $x^2$, or the derivative of $\sin(x)$ with respect to $cos(x)$?


If one knows the chain rule, $$\frac{df}{dg}\frac{dg}{dx}=\frac{df}{dx},$$ then one may solve for $$\frac{df}{dg}=\frac{\frac{df}{dx}}{\frac{dg}{dx}}.$$ For your one of your examples, $\frac{d\sin x}{d\cos x}$, we may compute this to be $$\frac{d\sin x}{d\cos x}=\frac{\frac{d \sin x}{dx}}{\frac{d\cos x}{dx}}=\frac{\cos x}{-\sin x}=-\cot x.$$

One should also note that we should define the derivative of $f$ with respect to $g$ as the following limit:

$$\lim_{h\to 0}\frac{f(x+h)-f(x)}{g(x+h)-g(x)}.$$


$$ \frac{d\ x^6}{d\ x^2} = \frac{\frac{d\ x^6}{d\ x}}{\frac{d\ x^2}{d\ x}} = \frac{6x^5}{2x} = 3x^4 $$