2
$\begingroup$

The below link on MSE was a question assuming a second solution was obtained on Mathematica by second method. Appears to be a question of accuracy.

Big Side of Triangle

Given are three side lengths $ (AB,AC,AD)=(3,2,4)$. Also $(B,C,D) $ are collinear and $ AB $ is tangent to the circle at $A$.

enter image description here

The bigger side $BD$ is computed in two ways

  1. Direct geometry By similar triangles $$ BD= AB \cdot AD / AC = 3 \cdot 4/2 =6 $$

  2. A roundabout method that should give same results.. Cosine Rule on triangles $ \triangle{ABC}$, $\triangle{ACD}$ and tangent property $ BA^2=BC \cdot BD$

    Clear["Global`*"]
    {a,b,c}={3,2,4};
    BigSide=a*c/b
    NSolve[{x^2==a^2+b^2-2 a b csbt,y^2+c^2-2 c y csbt==b^2,x(x+y)==a^2},{x,y,csbt}]
    dreiQuadrat=1.5 (1.5+4.5)
    dreiQuadrat1=1.5073469747588177*(4.463408366054498+1.5073469747588177)
    

Low accuracy is seen in the second solution that is not expected.

Can the accuracy of the second method be improved? If so, how?

Geogebra drawing does not distinguish the circles as the difference is so small.

Thanks in advance for comments.

$\endgroup$
1
  • 1
    $\begingroup$ I've given my knowledge for Euclidean geometry back to my teacher so cannot analyze the problem, but it doesn't look like a precision issue: Solve[{x^2 == a^2 + b^2 - 2 a b csbt, y^2 + c^2 - 2 c y csbt == b^2, x (x + y) == a^2}, {x, y, csbt}, Quartics -> True] // N[#, 32] & $\endgroup$
    – xzczd
    Commented Nov 23, 2022 at 7:54

1 Answer 1

3
$\begingroup$
  • The equation doesn't ensure that the three points B,C,D are colinear.
Clear["Global`*"]
{a, b, c} = {3, 2, 4};
BigSide = a*c/b;
sol = NSolve[{x^2 == a^2 + b^2 - 2 a b csbt, 
    y^2 + c^2 - 2 c y csbt == b^2, x (x + y) == a^2, x > 0, 
    y > 0}, {x, y, csbt}]

enter image description here

  • sol[[1]] is right since Cos[ACB]+Cos[ACD]==0
{SolveValues[x^2 + b^2 - 2 x*b*Cos[t] == a^2, Cos[t]], 
  SolveValues[b^2 + y^2 - 2 b*y*Cos[t] == c^2, Cos[t]]} /. sol[[1]]

enter image description here

  • sol[[2]] is wrong since Cos[ACB]+Cos[ACD]!=0
{SolveValues[x^2 + b^2 - 2 x*b*Cos[t] == a^2, Cos[t]], 
  SolveValues[b^2 + y^2 - 2 b*y*Cos[t] == c^2, Cos[t]]} /. sol[[2]]

enter image description here

Edit

If we use Cosine Rule to the angle ACB==θ and angle ACD==π - θ, then we can get the only one solution.

Solve[{x^2 + 2^2 - 2*x*2*Cos[θ] == 3^2, 
  y^2 + 2^2 - 2*y*2*Cos[π - θ] == 4^2, x (x + y) == 3^2, 
  x > 0, y > 0, 0 <= θ <= π}, {x, y, θ}]

enter image description here

$\endgroup$
5
  • $\begingroup$ Does the Cosine Rule sometimes bend straight lines? In this case the first analytic solution is available . With many numerical results won't individual verification be cumbersome to remove extraneous ones? $\endgroup$
    – Narasimham
    Commented Nov 23, 2022 at 11:44
  • $\begingroup$ @Narasimham Cosine Rule is the relation of the sides and the angles only work in one triangle, and it actual work fine in two triangle ABC and ACD respectly , but we still need to add condition to ensure that ABD is a triangle. $\endgroup$
    – cvgmt
    Commented Nov 23, 2022 at 11:57
  • $\begingroup$ By the circle property $ BA^2=BC \cdot BD$ Euclid implied that 1) BD is a straight line 2) BC is a straight line 3) Points (B,C,D) are collinear. right? $\endgroup$
    – Narasimham
    Commented Nov 23, 2022 at 13:04
  • 1
    $\begingroup$ @Narasimham The inversion transformation $BA^2=BC \cdot BD$ work only when B,C,D are colinear. $\endgroup$
    – cvgmt
    Commented Nov 23, 2022 at 15:33
  • $\begingroup$ All output results from same code should be correct. Is comment about inversion of circles? $\endgroup$
    – Narasimham
    Commented Nov 24, 2022 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.