設圓內接四邊形ABCD的邊長分別為a,b,c,d. ∠ABC=θ, 則∠CDA=180-θ
由餘弦定理
AC^2 = a^2+b^2-2ab*cosθ = c^2+d^2-2cd*cos(180-θ) = c^2+d^2+2cd*cosθ
故 cosθ = (a^2+b^2-c^2-d^2)/(2ab+2cd)
sinθ = sqrt(1-cos^2θ)
= sqrt(1 - ((a^2+b^2-c^2-d^2)/(2ab+2cd))^2
= 1/(2ab+2cd) * sqrt(4(ab+cd)^2 - ((a^2+b^2-c^2-d^2)^2))
= 1/(2ab+2cd) * sqrt((2ab+2cd+a^2+b^2-c^2-d^2)*(2ab+2cd-a^2-b^2+c^2+d^2))
= 1/(2ab+2cd) * sqrt( ((a+b)^2 - (c-d)^2) * ((c+d)^2 - (a-b)^2) )
= 1/(2ab+2cd) * sqrt((a+b+c-d)*(a+b-c+d)*(c+d+a-b)*(c+d-a+b))
// 令 p=1/2*(a+b+c+d)
= 1/(2ab+2cd) * sqrt((2p-2d)*(2p-2c)*(2p-2a)*(2p-2b))
= 1/(2ab+2cd) * 4 * sqrt((p-a)(p-b)(p-c)(p-d))
因此 S_ABCD = S_ABC + S_ADC
= 1/2*ab*sinθ + 1/2*cd*sin(180-θ)
= 1/2*(ab+cd)*sinθ
= 1/2*(ab+cd) * 1/(2ab+2cd) * 4 * sqrt((p-a)(p-b)(p-c)(p-d))
= sqrt((p-a)(p-b)(p-c)(p-d))