TRI_SAS

This function solves a triangle given two sides and the included angle between them (SAS configuration). It computes the third side and all three angles.

The core relationship is the Law of Cosines:

f^2 = d^2 + e^2 - 2de\cos(F)

Once the third side is found, remaining angles are recovered from trigonometric identities. All angles are in radians.

Excel Usage

=TRI_SAS(d, e, F)
  • d (float, required): First known side length (length units).
  • e (float, required): Second known side length (length units).
  • F (float, required): Included angle between sides d and e (radians).

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 with right included angle

Inputs:

d e F
3 4 1.5707963267948966

Excel formula:

=TRI_SAS(3, 4, 1.5707963267948966)

Expected output:

Result
3 4 5
0.643501 0.927295 1.5708
Example 2: Solve with acute included angle

Inputs:

d e F
5 6 1

Excel formula:

=TRI_SAS(5, 6, 1)

Expected output:

Result
5 6 5.3462
0.905899 1.23569 1
Example 3: Solve with obtuse included angle

Inputs:

d e F
7 8 2.2

Excel formula:

=TRI_SAS(7, 8, 2.2)

Expected output:

Result
7 8 13.3758
0.436878 0.504715 2.2
Example 4: Solve with equal sides and sixty-degree included angle

Inputs:

d e F
10 10 1.0471975511965976

Excel formula:

=TRI_SAS(10, 10, 1.0471975511965976)

Expected output:

Result
10 10 10
1.0472 1.0472 1.0472

Python Code

external_packages = ['trianglesolver==1.2']

from trianglesolver import sas as trianglesolver_sas

def tri_sas(d, e, F):
    """
    Solve a triangle from two sides and their included angle.

    See: https://pypi.org/project/trianglesolver/

    This example function is provided as-is without any representation of accuracy.

    Args:
        d (float): First known side length (length units).
        e (float): Second known side length (length units).
        F (float): Included angle between sides d and e (radians).

    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_sas(d, e, F)
        return [[result[0], result[1], result[2]], [result[3], result[4], result[5]]]
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

First known side length (length units).
Second known side length (length units).
Included angle between sides d and e (radians).