Skip to content

Instantly share code, notes, and snippets.

@forestbelton
Last active June 27, 2026 18:17
Show Gist options
  • Select an option

  • Save forestbelton/f9cda125ee19bc26b4427c14dbbf09a9 to your computer and use it in GitHub Desktop.

Select an option

Save forestbelton/f9cda125ee19bc26b4427c14dbbf09a9 to your computer and use it in GitHub Desktop.
Classical vs Rational trigonometry

Problem

Find the length $d$ in

Figure of a triangle

Classical solution

Let the angles of $A_1$ and $B$ be $\alpha$ and $\beta$ respectively, as shown in the Figure 1.6. The law of cosines in the triangle $\overline{A_1 A_2 A_3}$ gives

$$4^2 = 5^2 + 6^2 - 2 \times 5 \times 6 \times \cos{\alpha}$$

and solving for $\alpha$ gives

$$\alpha = \arccos{\frac{3}{4}}$$

Since the sum of the angles in $\overline{A_1 A_2 B}$ is $\pi$,

$$\beta = \pi - \frac{\pi}{4} - \alpha$$

Now the law of sines in $\overline{A_1 A_2 B}$ states that

$$\frac{\sin{\alpha}}{d} = \frac{\sin{\beta}}{5}$$

therefore,

$$d = \frac{5 \sin{\alpha}}{\sin{\beta}}$$

By the Pythagorean theorem, we have:

$$\begin{align*} \sin{\alpha} &= \pm \sqrt{1 - \cos^2{\alpha}} \\ &= \pm \sqrt{1 - \cos^2{\left(\arccos{\frac{3}{4}}\right)}} \\ &= \pm \frac{\sqrt{7}}{4} \\ \end{align*}$$

Since $0 \lt \arccos{\frac{3}{4}} \lt \frac{\pi}{2}$,

$$\sin{\alpha} = \frac{\sqrt{7}}{4}$$

To compute $\beta$, we note that $\sin{\left(\pi - \theta\right)} = + \sin{\theta}$ and then apply the angle addition theorem:

$$ \begin{align*} \sin{\beta} &= \sin{\left(\pi - \frac{\pi}{4} - \alpha\right)} \\ &= \sin{\left(\pi - \left(\frac{\pi}{4} + \alpha\right)\right)} \\ &= + \sin{\left(\frac{\pi}{4} + \alpha\right)} \\ &= + \left(\sin{\frac{\pi}{4}} \cos{\alpha} + \cos{\frac{\pi}{4}} \sin{\alpha} \right) \\ &= \frac{1}{\sqrt{2}} \times \frac{3}{4} + \frac{1}{\sqrt{2}} \times \frac{\sqrt{7}}{4} \\ &= \frac{3 + \sqrt{7}}{4 \sqrt{2}} \end{align*} $$

Substituting both $\sin{\alpha}$ and $\sin{\beta}$ yields:

$$ \begin{align*} d &= \frac{5 \sin{\alpha}}{\sin{\beta}} \\ &= \frac{\left(\frac{5 \sqrt{7}}{4}\right)}{\left(\frac{3 + \sqrt{7}}{4 \sqrt{2}}\right)} \\ &= \frac{35 \sqrt{2} - 15 \sqrt{14}}{-2} \\ &\approx 3.3137 \end{align*} $$

Rational solution

To apply rational trigonometry, first convert the initial information about lengths and angles into quadrances and spreads. The three quadrances of the triangle are the squares of the side lengths, so that $Q_1 = 16$, $Q_2 = 36$, and $Q_3 = 25$. The spread corresponding to the angle $45^{\circ}$ is $1/2$.

Let $s$ be the spread between the lines $A_1 A_2$ and $A_1 A_3$, and let $r$ be the spread between the lines $B A_1$ and $B A_2$. Let $Q \equiv Q(A_2, B)$.

We will follow the basic laws to first find $s$, then $r$, and then $Q$. Use the cross law in $\overline{A_1 A_2 A_3}$ to get

$$(25 + 36 - 16)^2 = 4 \times 25 \times 36 \times (1 - s)$$

so that $s = 7/16$. Using the triple spread formula in $\overline{A_1 A_2 B}$, we obtain for $r$ the quadratic equation

$$\left(\frac{7}{16} + \frac{1}{2} + r\right)^2 = 2\left(\frac{49}{256} + \frac{1}{4} + r^2\right) + 4 \times \frac{7}{16} \times \frac{1}{2} \times r$$

This simplifies to

$$r^2 - r + \frac{1}{256} = 0$$

so that

$$r = \frac{1}{2} \pm \frac{3}{16} \sqrt{7}$$

For each of these values of $r$, use the spread law in $\overline{A_1 A_2 B}$

$$\begin{align*} \frac{\frac{1}{2}}{Q(A_1,B)} &= \frac{r}{25} \\ Q(A_1,B) &= \frac{25}{2r} \end{align*}$$

and solve for $Q(A_1,B)$, giving values

$$Q(A_1,B) = 1600 \pm 600\sqrt{7}$$

Since $B$ lies on the segment $A_1 A_3$, we must have

$$0 \le Q(A_1, B) \le Q(A_1, A_3) = 36$$

and therefore

$$Q(A_1,B) = 1600 - 600\sqrt{7}$$

which means that $r = \frac{1}{2} + \frac{3}{16} \sqrt{7}$. Applying the spread law again to find $Q$, we have after simplification

$$\begin{align*} Q &= 1400 - 525 \sqrt{7} \\ \sqrt{Q} &\approx 3.3137 \end{align*}$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment