# Calculate all parameters of a triangle from some known partial lengths and angles

I have the problem described in this image (not to scale): http://i.imgur.com/owWVUmj.png

A (partial cathetus), B (small, vertical cathetus) and C (which forms a 90º angle with hypotenuse) are known lengths (A=3, B=8, C=2 meters, inches, or whatever). I need to obtain the exact values of all sides and angles. The most important length I need is X, but I could calculate it myself once I know the at least one of the angles or lengths.

Could someone please tell me how to calculate at least one of the sides or angles?

Thank you very much.

-
I would try to use en.wikipedia.org/wiki/Intercept_theorem –  ulead86 Jan 25 '13 at 11:30

-
From where do you get the 45°? –  ulead86 Jan 25 '13 at 11:28
By joining unknow X line with A+A' gives a rectangle (i.e 90° angle) so line crossing it will gives 45°. –  Salman Jan 25 '13 at 15:08
Thats right, but the crossing line gives us 45° only squares (?) –  ulead86 Jan 27 '13 at 22:05
@ulead86 Yeah square has 45° and also rectangle has so... Rectangle is defined as "A rectangle is a four-sided shape where every angle is a right angle (90°). Also opposite sides are parallel and of equal length". –  Salman Jan 28 '13 at 7:25
I don't see how 45º can be right. If you take a longer B, A' becomes smaller and that angle you say it's 45º would become wider. –  Felko Jan 29 '13 at 9:47

Let $Y$ be the rest of the leg A is on. $\dfrac{C^2}{Y^2} = \dfrac{B^2}{B^2 + (A+Y)^2}$, so $$B^2Y^2 = C^2(B^2 + A^2 + 2AY + Y^2)\\ (B^2 - C^2)Y^2 - 2AC^2Y - C^2(A^2 + B^2) = 0\\$$

\begin{align} Y & = \dfrac{2AC^2 \pm \sqrt{4A^2C^4 + 4(B^2-C^2)C^2(A^2+B^2)}}{2(B^2-C^2)} \\ & = \dfrac{AC^2 \pm \sqrt{A^2C^4 + A^2B^2C^2 + B^4C^2 - A^2C^4 - B^2C^4}}{B^2-C^2} \\ &= \dfrac{AC^2 \pm C \sqrt{A^2B^2 + B^4 - B^2C^2}}{B^2-C^2} \\ &= \dfrac{AC^2 \pm BC \sqrt{A^2 + B^2 - C^2}}{B^2-C^2} \end{align} We know $B>C$ since $C$'s triangle is similar to the overall triangle and embedded in it, so the radical is always real. Also $BC \sqrt{A^2 + B^2 - C^2} > ABC > AC^2$, and $Y$ is positive, so the plus case gives us the only solution.
$$Y = \dfrac{AC^2 + BC \sqrt{A^2 + B^2 - C^2}}{B^2-C^2}$$
Then $\dfrac{Y}{A+Y} = \dfrac{X}{B}$, so $X = \dfrac{Y}{B(A+Y)}$