randRange(1, 10) HEIGHT_A + randRange(1, 20) randRange(1, 10) SIDE_B * HEIGHT_A / (HEIGHT_B - HEIGHT_A) ["x", HEIGHT_A, SIDE_B, HEIGHT_B] atan(HEIGHT_A / SIDE_A) * 180 / PI new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50 * (SIDE_A / (SIDE_A + SIDE_B)) * HEIGHT_A / HEIGHT_B, {}) function(){ var trA = new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50, {}); trA.labels = { "points" : ["A", "D", "E"] }; return trA; }()

Given that:
`\quad\begin{eqnarray} \overline{BC} &=& HEIGHT_A \\ \overline{BD} &=& SIDE_B \\ \overline{DE} &=& HEIGHT_B \\ \overline{AB} &=& x \\ \end{eqnarray}`

What is the value of `x`?

SIDE_A

`\overline{AB} : \overline{BC} = \dfrac{x}{HEIGHT_A}`

`\overline{AD} : \overline{DE} = \dfrac{x + SIDE_B}{HEIGHT_B}`

`\dfrac{x}{HEIGHT_A} = \dfrac{x + SIDE_B}{HEIGHT_B}`

`HEIGHT_B \times x = HEIGHT_A \times (x + SIDE_B)`

`HEIGHT_Bx = coefficient(HEIGHT_A)x + HEIGHT_A * SIDE_B`

`plus(HEIGHT_B - HEIGHT_A + "x") = HEIGHT_A * SIDE_B`

`x = fractionReduce(HEIGHT_A * SIDE_B, HEIGHT_B - HEIGHT_A)`

randRange(1, 10) randRange(1, 10) randRange(1, SIDE_A + SIDE_B) HEIGHT_B * SIDE_A / (SIDE_A + SIDE_B) getGCD(SIDE_A + SIDE_B, HEIGHT_B) [SIDE_A, "x", SIDE_B, HEIGHT_B] atan(HEIGHT_A / SIDE_A) * 180 / PI new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50 * (SIDE_A / (SIDE_A + SIDE_B)) * HEIGHT_A / HEIGHT_B, {}) function(){ var trA = new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50, {}); trA.labels = { "points" : ["A", "D", "E"] }; return trA; }()

Given that:
`\quad\begin{eqnarray} \overline{AB} &=& SIDE_A \\ \overline{BD} &=& SIDE_B \\ \overline{DE} &=& HEIGHT_B \\ \overline{BC} &=& x \end{eqnarray}`

What is the value of `x`?

HEIGHT_A

`\overline{AB} : \overline{BC} = \dfrac{SIDE_A}{x}`

`\overline{AD} : \overline{DE} = \dfrac{SIDE_A + SIDE_B}{HEIGHT_B} = fraction(SIDE_A + SIDE_B, HEIGHT_B) = fractionReduce(SIDE_A + SIDE_B, HEIGHT_B)`

`\dfrac{SIDE_A}{x} = fractionReduce(SIDE_A + SIDE_B, HEIGHT_B)`

`SIDE_A \times HEIGHT_B / GCD = (SIDE_A + SIDE_B) / GCD \times x`

`SIDE_A * HEIGHT_B / GCD = coefficient((SIDE_A + SIDE_B) / GCD)x`

`x = fractionReduce(SIDE_A * HEIGHT_B, SIDE_A + SIDE_B)`

randRange(1, 10) randRange(1, SIDE_A) HEIGHT_A + randRange(1, 10) SIDE_A * (HEIGHT_B - HEIGHT_A) / HEIGHT_A getGCD(SIDE_A, HEIGHT_A) [SIDE_A, HEIGHT_A, "x", HEIGHT_B] atan(HEIGHT_A / SIDE_A) * 180 / PI new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50 * (SIDE_A / (SIDE_A + SIDE_B)) * HEIGHT_A / HEIGHT_B, {}) function(){ var trA = new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50, {}); trA.labels = { "points" : ["A", "D", "E"] }; return trA; }()

Given that:
`\quad\begin{eqnarray} \overline{AB} &=& SIDE_A \\ \overline{BC} &=& HEIGHT_A \\ \overline{DE} &=& HEIGHT_B \\ \overline{BD} &=& x \end{eqnarray}`

What is the value of `x`?

SIDE_B

`\overline{AB} : \overline{BC} = fraction(SIDE_A, HEIGHT_A) = fractionReduce(SIDE_A, HEIGHT_A)`

`\overline{AD} : \overline{DE} = \dfrac{SIDE_A + x}{HEIGHT_B}`

`\dfrac{SIDE_A + x}{HEIGHT_B} = fractionReduce(SIDE_A, HEIGHT_A)`

`HEIGHT_A / GCD \times ( SIDE_A + x ) = HEIGHT_B \times SIDE_A / GCD`

`HEIGHT_A * SIDE_A / GCD + coefficient(HEIGHT_A / GCD)x = HEIGHT_B * SIDE_A / GCD`

`coefficient(HEIGHT_A / GCD)x = (HEIGHT_B * SIDE_A - HEIGHT_A * SIDE_A) / GCD`

`x = fractionReduce(HEIGHT_B * SIDE_A - HEIGHT_A * SIDE_A, HEIGHT_A)`

randRange(1, 10) randRange(1, 10) randRange(1, SIDE_A) (SIDE_A + SIDE_B) * HEIGHT_A / SIDE_A getGCD(SIDE_A, HEIGHT_A) [SIDE_A, HEIGHT_A, SIDE_B, "x"] atan(HEIGHT_A / SIDE_A) * 180 / PI new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50 * (SIDE_A / (SIDE_A + SIDE_B)) * HEIGHT_A / HEIGHT_B, {}) function(){ var trA = new Triangle([0, 0], [ANGLE, 90, 90 - ANGLE], 50, {}); trA.labels = { "points" : ["A", "D", "E"] }; return trA; }()

Given that:
`\quad\begin{eqnarray} \overline{AB} &=& SIDE_A \\ \overline{BC} &=& HEIGHT_A \\ \overline{BD} &=& SIDE_B \\ \overline{DE} &=& x \end{eqnarray}`

What is the value of `x`?

HEIGHT_B

`\overline{AB} : \overline{BC} = fraction(SIDE_A, HEIGHT_A) = fractionReduce(SIDE_A, HEIGHT_A)`

`\overline{AD} : \overline{DE} = \dfrac{SIDE_A + SIDE_B}{x} = \dfrac{SIDE_A + SIDE_B}{x}`

`fractionReduce(SIDE_A, HEIGHT_A) = \dfrac{SIDE_A + SIDE_B}{x}`

`SIDE_A / GCD \times x = HEIGHT_A / GCD \times SIDE_A + SIDE_B`

`coefficient(SIDE_A / GCD)x = HEIGHT_A * (SIDE_A + SIDE_B) / GCD`

`x = fraction(HEIGHT_A * (SIDE_A + SIDE_B) / GCD, SIDE_A / GCD) = fractionReduce(HEIGHT_A * (SIDE_A + SIDE_B), SIDE_A)`

var tri_range = TRI_B.boundingRange(1); init({ range: [[tri_range[0][0], tri_range[0][1]], [tri_range[1][0] - 0.2, tri_range[1][1]]], scale: 400 / (tri_range[0][1] - tri_range[0][0]) }) style({ strokeWidth: 1, stroke: KhanUtil.BLACK }); var x_max = TRI_B.boundingRange()[0][1]; var y_max = TRI_B.boundingRange()[1][1]; var line_x = x_max * SIDE_A / (SIDE_A + SIDE_B); var line_y = y_max * HEIGHT_A / HEIGHT_B; var square = (tri_range[0][1] - tri_range[0][0]) / 36; rect(x_max - square, 0, square, square); rect(line_x - square, 0, square, square); style({ strokeWidth: 2, stroke: KhanUtil.BLUE }); TRI_A.draw(); TRI_B.draw(); TRI_B.drawLabels(); style({ color: "black" }); label([line_x, 0], "B", "below"); label([line_x, line_y], "C", "above"); label([line_x/2, 0], LABELS[0], "below"); label([line_x, line_y/2], LABELS[1], "right"); label([(SIDE_A + SIDE_B/2) * x_max / (SIDE_A + SIDE_B), 0], LABELS[2], "below"); label([x_max, y_max/2], LABELS[3], "right");

`\triangle ABC` and `\triangle ADE` both have a right angle and share `\angle BAC`.

Therefore `\triangle ABC` and `\triangle ADE` are similar triangles.

Therefore, the ratio `\overline{AB} : \overline{BC}` is equal to the ratio `\overline{AD} : \overline{DE}`.