I need help with a partial derivative

175 Views Asked by At

I was given a function and I need to find a partial derivative of it. The result I got is different from the answer, and I don't know why. Here's the function:

$$sin(\theta_{a}) = \frac{\sqrt{[R_Y\sin(a) - R_Z\cos(a)\cos(A)]^2 + [R_X\sin(a) + R_Z\sin(A)\cos(a)]^2 + [R_Y\sin(A)\cos(a) + R_X\cos(A)\cos(a)]^2}}{\mid R \mid}$$

where $$ R = \sqrt{R_X^2 + R_Y^2 + R_Z^2} $$

Here's what I need to do:

$$ \frac{\partial \sin(\theta_{a})}{\partial R_Z} $$

The correct answer is:

$$ \frac{\partial \sin(\theta_{a})}{\partial R_Z} = \frac{1}{2} \frac{1}{\mid R \mid} \frac{1}{\sqrt{...}}\big\{-2\cos(a)\sin(A)[R_Y\sin(a)-R_Z\cos(a)\cos(A)] + 2\sin(A)\cos(a)[R_X\sin(a)+R_Z\sin(A)\cos(a)]\big\}$$

Where $ \sqrt{...} $ is the numerator of the function.

My result fallows this derivation principle:

$$ \frac{f'(x) \cdot g(x) - f(x) \cdot g'(x)}{g(x)^2}$$

However the only way to get the result shown above is by not deriving the denominator $\mid R \mid $ by $ R_Z $ but considering it instead as constant. Is there a reason why I shouldn't do it or am I mistaken somewhere?