# Derivative Transformation with Law of Cosines

1. Nov 17, 2012

### Solidmozza

Hi there,

The Law of Cosines can be stated as

$a^2 = b^2 + c^2 - 2bccos(A)$

where $a$,$b$, and $c$ are the sides of a triangle, and $A$ is the angle opposite the side $a$. I have a function, $f(b,c,A)$, with an associated set of partial derivatives $(\frac{∂f}{∂c})_{b,A}$ etc. What I want to do is to use a coordinate transformation to get the related derivatives $(\frac{∂f}{∂c})_{b,a}$ etc. This looks like a multivariable partial derivative problem with a constraint. Using the chain rule, it seems to me that

$(\frac{∂f}{∂c})_{b,A}=\frac{∂f}{∂c}+\frac{∂f}{∂a} \frac{∂a}{∂c}$

$(\frac{∂f}{∂c})_{b,a}=\frac{∂f}{∂c}+\frac{∂f}{∂A} \frac{∂A}{∂c}$

where I think $\frac{∂f}{∂c}$ is the same in both expressions. I can calculate the $\frac{∂a}{∂c}$ and $\frac{∂A}{∂c}$ parts using the Law of Cosines, but then I don't know what to do with $\frac{∂f}{∂a}$ and $\frac{∂f}{∂A}$, i.e. if I use the transformation $\frac{∂f}{∂a}=\frac{∂f}{∂A}\frac{∂A}{∂a}$ then it looks like $(\frac{∂f}{∂c})_{b,A}=(\frac{∂f}{∂c})_{b,a}$ but numerical results and intuition tell me otherwise.

In essence, I don't know how to find the partial derivative $(\frac{∂f}{∂c})_{b,a}$ given $(\frac{∂f}{∂c})_{b,A}$ and that the variables are connected via the Law of Cosines.

Any assistance with this problem would be greatly appreciated :)

2. Nov 17, 2012

### voko

You are getting confused because you use the same symbol, f, to denote different functions. Do not do it. Let f be a function of (b, c, A). Then let F be a function of (b, c, a). Obviously, f(b, c, A) = F(b, c, a(b, c, A)), where a(b, c, A) is the cosine law. You need to obtain the derivatives of F, use the chain rule.

3. Nov 17, 2012

### Solidmozza

Hi Voko,

Thanks for the response, but I'm still a little stuck here. This is how I continued:

$dF = (∂F/∂c)dc + (∂F/∂b)db + (∂F/∂a)da$

Now $(∂F/∂c)_{b,a} = (∂F/∂c)$ (is this not just $(∂f/∂c)$?)

And $(∂F/∂c)_{b,A} = (∂F/∂c) + (∂F/∂A)(∂A/∂c)$

But $(∂A/∂c) = (c-bcosA)/a$

Hence, $(∂F/∂c)_{b,A} - (∂F/∂c)_{b,a} = (∂A/∂c)(c-bcosA)/a$

However, this doesn't conform to what I have when I substitute in numerical values. I'm clearly not getting something here, could you give me a more forceful push?

4. Nov 17, 2012

### voko

Just to make sure we are on the same page. What you really have is $\partial f/\partial b, \ \partial f/\partial c, \ \partial f/\partial A$, correct? And you need to find $\partial F/\partial b, \ \partial F/\partial c, \ \partial F/\partial a$.

Then $$\frac {\partial f} {\partial b} = \frac {\partial} {\partial b} F (b, c, a(b, c, A)) = \frac {\partial F} {\partial b} + \frac {\partial F} {\partial a} \frac {\partial a } {\partial b} \\ \frac {\partial f} {\partial c} = \frac {\partial} {\partial c} F (b, c, a(b, c, A)) = \frac {\partial F} {\partial c} + \frac {\partial F} {\partial a} \frac {\partial a } {\partial c} \\ \frac {\partial f} {\partial A} = \frac {\partial} {\partial b} F (b, c, a(b, c, A)) = \frac {\partial F} {\partial a} \frac {\partial a } {\partial A}$$

This is a linear system; solve for $\partial F/\partial b, \ \partial F/\partial c, \ \partial F/\partial a$.

5. Nov 17, 2012

### Solidmozza

Thanks a heap Voko, that did the trick! :)