余弦定理求边计算器

Law of Cosines Calculator

Compute the third side of a triangle from two sides and the included angle.

📐 计算公式
余弦定理(本页代码口径,夹角按度输入先化弧度):c=√(a²+b²−2×a×b×cosC);联动量:面积=a×b×sinC÷2、cosA=(b²+c²−a²)÷(2bc)、cosB=(a²+c²−b²)÷(2ac),反解角度时余弦值先钳制到 [−1,1]。校验:无强校验(空值按 0 兜底),a、b、c 非正或对应角非有限时该角显示 —。判据:无固定分级,C=90° 时退化为勾股定理,C 越大对边 c 越长。

输入两边 a、b 及其夹角 C(度),求第三边 c。

📌 计算说明
  • C=90° 退化为勾股定理。
  • 3,4,90° → 5。

📚 深度解析:余弦定理

💡 常见使用场景

求第三边
a=5,b=7,夹角 C=60°:c²=5²+7²-2×5×7×cos60°=25+49-70×0.5=39,c=√39≈6.245。
求角度
三边 a=3,b=4,c=5:cosC=(a²+b²-c²)/(2ab)=(9+16-25)/24=0,故 C=90°,印证直角三角形。

❓ 常见问题(FAQ)

余弦定理和勾股定理关系?
余弦定理是勾股定理的推广:当 C=90° 时 cosC=0,退化为 c²=a²+b²。直角是特例。
什么时候用余弦定理而不是正弦定理?
已知两边夹角(求第三边)或已知三边(求角)用余弦定理;已知两角一边或两边及其中一边的对角用正弦定理。

Formula & Standard References

Item Formula / Note Source / Standard
Law of cosinesc² = a² + b² − 2ab·cosCEuclid Elements II.12/13 equivalent
SAS caseTwo sides and included angle determine the third side directlyStandard triangle-solving rules
Angle formcosC = (a² + b² − c²) ÷ 2ab solves any angleLaw-of-cosines rearrangement
Pythagorean limitAt C=90° reduces to c² = a² + b²Pythagorean theorem