Okay, so far we've seen two bashy formulas for areas of general triangles and cyclic quadrilaterals. Now, we still don't know the area of a general quadrilateral. Here, we will prove a formula for the area of a general quadrilateral given its side lengths (this is extended from brahmagupta's formula similarly to how the law of cosines is extended from the pythagorean theorem).
So, without more words to delay, here's the formula:
The area of general quadrilateral ABCD with sides of length a,b,c,d, semiperimeter s, and two opposite angles α and β is (s−a)(s−b)(s−c)(s−d)−abcdcos2(2α+β)
Wow, really mean looking. I almost didn't even have enough horizontal space to put it in this explanation! However, as we'll see, this follows from essentially the same argument as brahmagupta's formula did.
Proof
Denote the area of polygon A1A2…An by [A1A2…An]. We let ∠A=α, ∠C=β, a=AB, b=BC, c=CD, and d=AD. We note that [ABCD]=[ABD]+[CBD], so:
[ABCD]=21(adsinα+bcsinβ)
Then,
4[ABCD]2=(ad)2sin2α+(bc)2sin2β+2abcdsinαsinβ
By the law of cosines on △ABD and △CBD, we have:
a2+d2−2adcosα=b2+c2−2bccosβ
We then put all the cosines on one side, divide by 2, and square:
4(a2+d2−b2−c2)2=(ad)2cos2α+(bc)2cos2β−2abcdcosαcosβ
We then add this to the area formula and use the identity sin2θ+cos2θ=1 and the cosine angle sum identity:
4[ABCD]2+4(a2+d2−b2−c2)2=(ad)2+(bc)2−2abcdcos(α+β)
Then:
4[ABCD]2+4(a2+d2−b2−c2)2=(ad+bc)2−4abcdcos2(2α+β)
Following the same steps as in our proof of brahmagupta's formula, we get:
16[ABCD]2=16(s−a)(s−b)(s−c)(s−d)−16abcdcos2(2α+β)
Then, we can divide and take the square root of both sides to get that [ABCD] equals:
(s−a)(s−b)(s−c)(s−d)−abcdcos2(2α+β)
So we are done. Whew!