Question #100780

Find all heronian triangles with one altitude 40 cm. (I just want the sides like 401,401,798)

Expert's answer

Using the Heron's formula will determine the area and height for each triangle

A=s(sa)(sb)(sc), where s=a+b+c2hb=2Ab\quad A = \sqrt{s(s-a)(s-b)(s-c)} \quad \text{, where } s = \cfrac{a+b+c}2 \\ \\ \quad h_b = \cfrac{2A}b


(41, 18, 41) A = 360, h = 40

(41, 39, 50) A = 780, h = 40

(41, 51, 58) A = 1020, h = 40

(41, 84, 85) A = 1680, h = 40

(41, 105, 104) A = 2100, h = 40

(41, 207, 202) A = 4140, h = 40

(41, 408, 401) A = 8160, h = 40

(50, 60, 50) A = 1200, h = 40

(50, 72, 58) A = 1440, h = 40

(50, 105, 85) A = 2100, h = 40

(50, 126, 104) A = 2520, h = 40

(50, 228, 202) A = 4560, h = 40

(50, 429, 401) A = 8580, h = 40

(58, 84, 58) A = 1680, h = 40

(58, 117, 85) A = 2340, h = 40

(58, 138, 104) A = 2760, h = 40

(58, 240, 202) A = 4800, h = 40

(58, 441, 401) A = 8820, h = 40

(85, 150, 85) A = 3000, h = 40

(85, 171, 104) A = 3420, h = 40

(85, 273, 202) A = 5460, h = 40

(85, 474, 401) A = 9480, h = 40

(104, 192, 104) A = 3840, h = 40

(104, 294, 202) A = 5880, h = 40

(104, 495, 401) A = 9900, h = 40

(202, 396, 202) A = 7920, h = 40

(202, 597, 401) A = 11940, h = 40

(401, 798, 401) A = 15960, h = 40

Comment: First I find all right triangles with integer side lengths having one leg of length 40. Then combine it with each other.


<code js>


{


const a=[];


// Search for right-angled triangles with integer side lengths having one leg of length 40


for(let c, b=1; b<1e4; b++) {


c=Math.sqrt(1600 + b*b); // hypotenuse


if(Number.isInteger(c)) a.push([b,c])


}


// Combine finded triangles


for(let i=0, L=a.length; i<L; i++)


for(let j=i; j<L; j++)


console.log('%d, %d, %d',


a[i][1], // hypotenuse of one triangle


a[i][0]+a[j][0], // Sum of legs


a[j][1] // hypotenuse of other triangle


);


}


</code>


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS