TRI_SSA
This function solves side-side-angle (SSA) triangle inputs, where two sides and one non-included angle are known.
SSA can be ambiguous because the sine relationship may admit two valid angle solutions:
\sin(E) = \frac{e\sin(D)}{d}
Depending on geometry, there can be zero, one, or two triangles. The ssa_flag parameter chooses how to resolve ambiguous two-solution cases.
Excel Usage
=TRI_SSA(d, e, D, ssa_flag)
d(float, required): Known side opposite angle D (length units).e(float, required): Second known side (length units).D(float, required): Known non-included angle opposite side d (radians).ssa_flag(str, optional, default: “forbid”): SSA ambiguity handling mode.
Returns (list[list]): A 2D array where the first row is [d, e, f] and the second row is [D, E, F].
Example 1: Solve SSA using acute branch selection
Inputs:
| d | e | D | ssa_flag |
|---|---|---|---|
| 8 | 10 | 0.6 | acute |
Excel formula:
=TRI_SSA(8, 10, 0.6, "acute")
Expected output:
| Result | ||
|---|---|---|
| 8 | 10 | 13.9206 |
| 0.6 | 0.783556 | 1.75804 |
Example 2: Solve SSA using obtuse branch selection
Inputs:
| d | e | D | ssa_flag |
|---|---|---|---|
| 8 | 10 | 0.6 | obtuse |
Excel formula:
=TRI_SSA(8, 10, 0.6, "obtuse")
Expected output:
| Result | ||
|---|---|---|
| 8 | 10 | 2.58609 |
| 0.6 | 2.35804 | 0.183556 |
Example 3: Solve SSA case with effectively unique geometry
Inputs:
| d | e | D | ssa_flag |
|---|---|---|---|
| 9 | 6 | 0.8 | acute |
Excel formula:
=TRI_SSA(9, 6, 0.8, "acute")
Expected output:
| Result | ||
|---|---|---|
| 9 | 6 | 12.0843 |
| 0.8 | 0.498647 | 1.84295 |
Example 4: Solve SSA with small known angle
Inputs:
| d | e | D | ssa_flag |
|---|---|---|---|
| 9 | 11 | 0.5 | acute |
Excel formula:
=TRI_SSA(9, 11, 0.5, "acute")
Expected output:
| Result | ||
|---|---|---|
| 9 | 11 | 16.9464 |
| 0.5 | 0.62607 | 2.01552 |
Python Code
external_packages = ['trianglesolver==1.2']
from trianglesolver import ssa as trianglesolver_ssa
def tri_ssa(d, e, D, ssa_flag='forbid'):
"""
Solve a triangle from two sides and a non-included angle using SSA branch selection.
See: https://pypi.org/project/trianglesolver/
This example function is provided as-is without any representation of accuracy.
Args:
d (float): Known side opposite angle D (length units).
e (float): Second known side (length units).
D (float): Known non-included angle opposite side d (radians).
ssa_flag (str, optional): SSA ambiguity handling mode. Valid options: Forbid, Acute, Obtuse. Default is 'forbid'.
Returns:
list[list]: A 2D array where the first row is [d, e, f] and the second row is [D, E, F].
"""
try:
result = trianglesolver_ssa(d, e, D, ssa_flag)
return [[result[0], result[1], result[2]], [result[3], result[4], result[5]]]
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Known side opposite angle D (length units).
Second known side (length units).
Known non-included angle opposite side d (radians).
SSA ambiguity handling mode.