Heron's formula finds the area $A$ of a triangle with sides of length $a$, $b$, and $c$:
$$A=\sqrt{s(s-a)(s-b)(s-c)}$$
where $s$ is the semiperimeter of the triangle:
$$s=\frac{a+b+c}{2}$$
How do I find the partial derivatives $A_a$, $A_b$, $A_c$ of $A$? Without actually replacing $s$ with it's definition and multiplying out each of the resulting polynomials?
I've been given a partial answer:
$$A_a = \frac{-a^3+ab^2+ac^2}{8 \sqrt{s(s-a)(s-b)(s-c)}}$$
But I have no idea how that result was reached.
What I've tried so far is to replace $s$ with it's definition, simplify $A$ down to:
$$\frac{1}{4}\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}$$
And then attempted to find the derivative by applying the chain rule:
$$\frac{1}{8 \sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}} \cdot ???$$
But how do I find the derivative of the expression under the square root without multiplying it all out?
You can avoid some multiplication by using the chain rule:
$$\frac{\partial A}{\partial a}=\frac{1}{2} A^{-1} \left ( \frac{\partial s}{\partial a}(s-a)(s-b)(s-c) + s \frac{\partial(s-a)}{\partial a}(s-b)(s-c) + s(s-a)\frac{\partial(s-b)}{\partial a}(s-c)+s(s-a)(s-b)\frac{\partial(s-c)}{\partial a} \right ).$$
(The $1/2$ and the initial power come from differentiating the square root, or alternately from squaring both sides and differentiating implicitly.)
Now you compute these four inner derivatives; they are $1/2,-1/2,1/2,1/2$ respectively. You can also make things look a bit prettier by using the multiply+divide trick to make the terms on the inside look like $A^2$:
$$\frac{\partial A}{\partial a}\frac{1}{2}A^{-1} \left ( \frac{A^2}{2s}-\frac{A^2}{2(s-a)}+\frac{A^2}{2(s-b)}+\frac{A^2}{2(s-c)} \right ).$$
We can do some more simple simplification:
$$\frac{\partial A}{\partial a}=\frac{1}{4} A \left ( \frac{1}{s}+\frac{1}{s-b}+\frac{1}{s-c}-\frac{1}{s-a} \right ).$$