How to simplify this formula

82 Views Asked by At

I have this equation: $\frac{\sqrt{(a+b+\sqrt{a^2+b^2-2ab\cos\gamma})(-a+b+\sqrt{a^2+b^2-2ab\cos\gamma})(a-b+\sqrt{a^2+b^2-2ab\cos\gamma})(a+b-\sqrt{a^2+b^2-2ab\cos\gamma})}}{4}$

It calculates the area of a triangle using only 2 sides of a triangle $a, b$, and the angle of those sides, $\gamma$. It simply combines the law of cosines and Heron's Formula. Is there any way to achieve the same function, and is it possible to simplify this equation?

2

There are 2 best solutions below

1
On BEST ANSWER

Let $c = \sqrt{a^2+b^2-2ab\cos\gamma}$ and $P_1,P_2,P_3,P_4$ be the 4 factors inside the square root. Notice

  • $P_1 P_4 = (a+b+c)(a+b-c) = (a+b)^2 - c^2 = 2ab(1+\cos\gamma)$,
  • $P_2 P_3 = (-a+b+c)(a-b+c) = c^2-(a-b)^2 = 2ab(1-\cos\gamma)$

We have $$\frac{\sqrt{P_1P_2P_3P_4}}{4} = \frac{\sqrt{(2ab)^2(1-\cos^2\gamma)}}{4} = \frac12 ab\sin\gamma$$

1
On

IMHO if you started with

$A = \sqrt {s(s-a)(s-b)(s-c)}$ with $s = \frac{a+b+c}{2}$ and used $\cos \gamma = \frac{a²+b²-c²}{2ab}$ like definied e.g. here: https://en.wikipedia.org/wiki/Heron%27s_formula

then rewrote the maths to avoid using $c$ through writing it as a function of $a$, $b$ and $ \gamma $ it should be fine and correct. Did you?