# Solve similar right triangles, given one's hypotenuse, the other's base, and the sum of their heights.

I encountered this problem while trying to determine a generic equation for entasis, but this question is not about entasis.

$$\theta$$ is wanted—given this lovely figure

given that the two triangles are similar, and given $$a$$, $$b$$, and $$h$$.

I recognize that the sum of the heights of the triangles equals $$h$$, and that their ratio equals the scale factor, which seems like a likely avenue, but my trigonometry and geometry are weak and I can’t figure this one out.

• Seems doable in principle. If you let $\mu$ be the ratio of the lower altitude to $h$, you can set up a quartic equation in $\mu$. – amd Dec 21 '18 at 23:50
• @amd So $\mu = \frac{\text{lower altitude}}{h}$? How from there to a quartic? or, what gets raised to the fourth? – holomenicus Dec 21 '18 at 23:55
• It’s a quartic in $\mu$. Alternatively, you can set up a pair of equations involving trig function of $\theta$ and then eliminate $\mu$ from them. – amd Dec 22 '18 at 0:08

It is pretty easy to see from the geometry of the figure that

$$b \cot \theta + a \cos \theta = h, \tag 1$$

whence,

$$b \dfrac{\cos \theta}{\sin \theta} + a\cos \theta = h; \tag 2$$

now using $$\cos^2 \theta + \sin^2 \theta = 1$$, i.e. $$\cos \theta = \pm \sqrt{1 - \sin^2 \theta}$$,

$$b \dfrac{\sqrt{1 - \sin^2 \theta}}{\sin \theta} + a \sqrt{1 - \sin^2 \theta} = h; \tag 3$$

we choose the positive sign on $$\pm \sqrt{1 - \sin^2 \theta}$$ since the angle $$\theta$$ appears to be acute; next, we square:

$$b^2 \dfrac{1 - \sin^2 \theta}{\sin^2 \theta} + 2ab \dfrac{1 - \sin^2 \theta}{\sin \theta} + a^2 (1 - \sin^2 \theta) = h^2; \tag 4$$

we multiply by $$\sin^2 \theta$$:

$$b^2 (1 - \sin^2 \theta)+ 2ab \sin \theta (1 - \sin^2 \theta) + a^2 \sin^2 \theta (1 - \sin^2 \theta) = h^2 \sin^2 \theta, \tag 5$$

which may be written as a quartic equation in $$\sin \theta$$:

$$-a^2 \sin^4 \theta -2ab \sin^3 \theta + (a^2 - b^2 - h^2)\sin^2 \theta + 2ab \sin \theta + b^2 = 0, \tag 6$$

or

$$a^2 \sin^4 \theta + 2ab \sin^3 \theta + (h^2 - a^2 - b^2)\sin^2 \theta - 2ab \sin \theta - b^2 = 0. \tag 7$$

This is about as far as we can push things using elementary algebra and trigonometry. To find $$\sin \theta$$, we must solve this quartic, which may be done according to this wikipedia page.

Let $$\mu$$ be the ratio of the lower triangle’s altitude to the total height $$h$$. We then have $$\tan\theta = {b \over \mu h} \\ \cos\theta = {(1-\mu)h \over a}.$$ Eliminate $$\mu$$ to get the equation $$h = a\cos\theta + b\cot\theta.$$ Alternatively, you can apply the Pythagorean theorem to get the equation $$(\mu h)^2+b^2 = \left({\mu a\over 1-\mu}\right)^2,$$ a quartic in $$\mu$$.

• For a $\mu$-free solution, isolate $b\cot\theta$ in your $h$ equation, and multiply-through by $\sin\theta$ ... \begin{align} \sin\theta (h-a\cos\theta)= b \cos\theta &\quad\to\quad \sin^2\theta (h-a\cos\theta)^2 = b^2 \cos^2\theta \\ &\quad\to\quad (1-\cos^2\theta) (h-a\cos\theta)^2 = b^2 \cos^2\theta \end{align} Abbreviating $\cos\theta$ as $k$, this gives $$a^2 k^4- 2 a h k^3+ ( h^2 - a^2 + b^2 )k^2+ 2 a h k - h^2 = 0$$ This quartic, in general, has ugly roots. – Blue Dec 22 '18 at 1:29
• @Blue You've got that right. $echo "solve(a^2 * k^4 - 2*a*h*k^3 + (h^2 - a^2 + b^2)*k^2 + 2*a*h*k - h^2 = 0, k);" | maxima | wc -l prints 295 lines of equation to express the roots. – holomenicus Dec 22 '18 at 1:39 • @Blue I suspect that a quartic is unavoidable. – amd Dec 22 '18 at 2:32 • @amd: Agreed. By the way, under the substitution$\sin\theta = 2t/(1+t^2)$,$\cos\theta = (1-t^2)/(1+t^2)$in the$h\$ equation, we get this quartic $$b t^4 + 2 (a+h) t^3 - 2 (a-h) t - b = 0$$ The roots are still ugly, but at least the coefficients are nicer. :) – Blue Dec 22 '18 at 2:38