Serving the Quantitative Finance Community

 
User avatar
Cuchulainn
Topic Author
Posts: 20250
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Back to Euclid

May 10th, 2023, 10:18 pm

Find x
Attachments
triangle.jpg
 
User avatar
Marsden
Posts: 787
Joined: August 20th, 2001, 5:42 pm
Location: Maryland

Re: Back to Euclid

May 11th, 2023, 12:03 am

30°, I think.

My proof is not terribly elegant.
 
User avatar
Paul
Posts: 6603
Joined: July 20th, 2001, 3:28 pm

Re: Back to Euclid

May 11th, 2023, 6:51 am

Yes, 30. Proof by drawing several isosceles triangles.
 
User avatar
Cuchulainn
Topic Author
Posts: 20250
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Back to Euclid

May 11th, 2023, 9:26 am

yes.
It is  interesting that these kinds of problems can be solved by geometric  means or by trigonometry (in the latter we may need to solve a nonllinear equation leadiing to multiple solutions and risk of round-off error.).

The rationale for which approach someone uses is idiosyncratic. How many people propose more than one solution?
 
 
User avatar
Paul
Posts: 6603
Joined: July 20th, 2001, 3:28 pm

Re: Back to Euclid

May 11th, 2023, 11:07 am

I couldn't face the trig approach! Drawing one line...everything falls into place!
 
User avatar
Marsden
Posts: 787
Joined: August 20th, 2001, 5:42 pm
Location: Maryland

Re: Back to Euclid

May 11th, 2023, 12:14 pm

I went the trigonometric route, including asking Google to calculate an arctangent for me. And then asking it to calculate the same arctangent in degrees rather than radians.
 
User avatar
Paul
Posts: 6603
Joined: July 20th, 2001, 3:28 pm

Re: Back to Euclid

May 11th, 2023, 1:08 pm

Draw a line from point D to a point, E, on BD s.t. DE = AD = DB.

DBE = 30, DEB = 30, CDE = 15, ADE = 60, AED = 90

CE = AE = AD etc.

ACE = 45

So ACD = 30

Something like that. Order might be wrong.
 
User avatar
Marsden
Posts: 787
Joined: August 20th, 2001, 5:42 pm
Location: Maryland

Re: Back to Euclid

May 11th, 2023, 3:03 pm

Draw a line from point D to a point, E, on BD BC s.t. DE = AD = DB.

DBE = 30, DEB = 30, CDE = 15, ADE = 60, AED = 90 60, ACE = 90

CE = AE = AD etc.

ACE = 45

So ACD = 30

Something like that. Order might be wrong.
Typos.
 
User avatar
Paul
Posts: 6603
Joined: July 20th, 2001, 3:28 pm

Re: Back to Euclid

May 11th, 2023, 3:35 pm

Yes and no!
 
User avatar
Marsden
Posts: 787
Joined: August 20th, 2001, 5:42 pm
Location: Maryland

Re: Back to Euclid

May 11th, 2023, 3:45 pm

I wonder about the robustness of both methods. They work for the angles given, but what if (trigonometric method) a perpendicular line from C to AB falls within the line segment AB rather than beyond A? And what if (isosceles triangle method) DE ends up being longer than CD?

It may be just that the algebra changes, but results are still produced. I don't know.
 
User avatar
Cuchulainn
Topic Author
Posts: 20250
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Back to Euclid

May 11th, 2023, 7:06 pm

30°, I think.

My proof is not terribly elegant.
What don't you like about your (unspecified) proof?
 
User avatar
Marsden
Posts: 787
Joined: August 20th, 2001, 5:42 pm
Location: Maryland

Re: Back to Euclid

May 11th, 2023, 7:22 pm

Had to get an arctangent lookup.

Proof:
CDB = 135°, CBD = 30°.
Draw a line from point C to line extended from AB. Call the point of intersection F.
CDF is a 45°/45°/90° right triangle, and CBF is a 60°/30°/90° right triangle.
If we say the length of CF is 1, then the length of DF is also 1, and the length of BF is sqrt(3).
So the length of DB is sqrt(3) - 1, which is also the length of AD.
This makes the length of AF 1 - [sqrt(3) - 1], or 2 - sqrt(3).
Thus the arctangent of 2 - sqrt(3) is the measure of angle ACF, and this happens to be 15°.
Angle DCF is 45°, so this means angle ACD is 30°.
 
User avatar
Cuchulainn
Topic Author
Posts: 20250
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Back to Euclid

May 11th, 2023, 7:28 pm

I wonder about the robustness of both methods. They work for the angles given, but what if (trigonometric method) a perpendicular line from C to AB falls within the line segment AB rather than beyond A? And what if (isosceles triangle method) DE ends up being longer than CD?

It may be just that the algebra changes, but results are still produced. I don't know.
 double x = 3.141529;
 // cot(x) + 2 - cot(15) ... convert from degrees to radians
 std::cout << 1.0 / std::tan(x / 6) + 2 - 1.0 / std::tan(x / 12) << '\n'; // zero
 std::cout << 1.0 / std::tan(x / 6) + 2* std::cos(x / 12) << '\n'; // 3.66 !!!! INCORRECT SOLUTION iterato #1

 // 2cos15°=(√2/2)(1+ctgx)
 std::cout << (std::sqrt(2.0)/2)*(1.0 + 1.0 / std::tan(x / 6)) -2 * std::cos(x / 12) << '\n'; // zero
 
User avatar
Cuchulainn
Topic Author
Posts: 20250
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Back to Euclid

May 12th, 2023, 12:01 pm

The advantage of the geometry-based solution (qualitative) is that the solution become obvious in a flash. Using trigonometry (quantitative):

1. Many possible paths from input to output.
2. Subjects make mistakes. Brittle.
3. Subjects do not check their solution.
4. Solution may not have an explcit solution. Enter Newton Raphson.
5. We have to check for illegal side conditions in the code.
6. Sometimes it is the only way.

// yeah, trigonometry is heart-wrenching.
 
User avatar
Cuchulainn
Topic Author
Posts: 20250
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Back to Euclid

May 12th, 2023, 1:59 pm

Square root is scary!