# How to solve a geometric problem about a triangle using GeometricSolveValues?

I try to solve not so difficult geometric problem from an exercise book on elementary math with 14.0 on Windows 10:

Let a triangle $$\triangle ABC$$ be given and the area of $$\triangle ABC$$ be equal to $$60$$ and $$\cos(\angle ACB)=\frac 5 {13}$$ and the area of the inscribed circle be equal to $$\frac {100\pi} 9$$. Find the lengths of the sides $$|AB|,|BC|,|AC|$$.

Here is my unsuccessful attempt

ClearAll[a, b, c];
GeometricSolveValues[GeometricScene[{a, b, c}, {Triangle[{a, b, c}],
PlanarAngle[{a, c, b}] == ArcCos[5/13],  Area[Triangle[{a, b, c}]] == 60,
Area[Insphere[{a, b, c}]] == Pi*100/9}], {EuclideanDistance[a, b],
EuclideanDistance[c, b], EuclideanDistance[a, c]}]


which results in {} instead of 10, 13, 13. The same happens with PlanarAngle[c -> {a, b}] == (ArcCos[5/13]*180/Pi) °.

How to solve it with Mathematica by using GeometricSolveValues, not solving a system of three equations in three unknowns?

• @Domen: I prefer to formulate "how to solve" over "how can I solve" since this is of a common interest. Jan 30 at 17:52
• For the $n$-th time: "How to ...?" is not a grammatically correct question in English. Please stop putting question marks where they don't belong. Jan 30 at 17:54
• @Domen - it's they're question, they can frase it how they like. Jan 30 at 17:58
• "How can I ...?", "How do we ...?", "How can ... be solved?" or "How to ..." without a question mark. @JasonB., it is about the grammar, not phrasing. And the problem is not this particular question, it's dozens of other decades old questions to which this user constantly keeps putting question marks. That's the reason for my comment. Jan 30 at 18:01
• The trouble comes from Area[Insphere[{a, b, c}]] == Pi*100/9. This shows where the trouble is: Area[Insphere[{{0, 0}, {1, 0}, {0, 1}}]] or Area[Circle[]], which is probably worth a note to Wolfram. For this particular scenario, you can trivially recast the problem with: GeometricSolveValues[GeometricScene[{a,b,c},{Triangle[{a,b,c}],PlanarAngle[{a,c,b}]==ArcCos[5/13],Area[Triangle[{a,b,c}]]==60,RegionMeasure[Insphere[{a,b,c}]]==20Pi/3}],{EuclideanDistance[a,b],EuclideanDistance[c,b],EuclideanDistance[a,c]}], which returns {{13, 13, 10}}
– chuy
Jan 30 at 19:59

The trouble comes from

Area[Insphere[{a, b, c}]] == Pi*100/9


This is going to be a condition that cannot be reconciled because Wolfram Language is going to evantually turn the Insphere into a Sphere and a 2D sphere is going to have an undefined area. See:

Area[Insphere[{{0, 0}, {1, 0}, {0, 1}}]]


or

Area[Circle[]]


The function InscribedBall can be used to create an inscribed Ball, but it isn't a supported object that GeometricScene can handle in this version. Asking for support for InscribedBall in GeometricScene is probably worth a note to Wolfram.

For this particular scenario, you can avoid this issue by trivially recasting the problem to:

GeometricSolveValues[
GeometricScene[{a, b, c},
{
Triangle[{a, b, c}],
PlanarAngle[{a, c, b}],== ArcCos[5 / 13],
Area@Triangle[{a, b, c}] == 60,
RegionMeasure@Insphere[{a, b, c}] == 20 * Pi / 3
}
],
{
EuclideanDistance[a, b],
EuclideanDistance[c, b],
EuclideanDistance[a, c]
}
]


which returns

{{13, 13, 10}}

• It should be noticed that Map[Area[Disk @@ #] &, {Insphere[{{0, 0}, {1, 0}, {0, 1}}]}][[1]] outputs \[Pi]/(2 (1 + Sqrt[2])^2), but GeometricSolveValues[ GeometricScene[{a, b, c}, {Triangle[{a, b, c}], PlanarAngle[{a, c, b}] == ArcCos[5/13], Area[Triangle[{a, b, c}]] == 60, Map[Area[Disk @@ #] &, {Insphere[{a, b, c}]}][[1]] == 100*Pi/9}], {EuclideanDistance[a, b], EuclideanDistance[c, b], EuclideanDistance[a, c]}] returns the input. Jan 30 at 20:49
• Much simpler is Area[Ball @@ Insphere[{{0, 0}, {1, 0}, {0, 1}}]], but as you say that doesn't help because that transformation needs to take place downstream in the evaluation process.
– chuy
Jan 30 at 20:58

This can be solved rather trivially, without using complex functions like "GeometricSolveValues".

First, calculate the angle at point C: pC and the radius of the incircle: ri. Then using 3 different formula for the area of a triangle, we can get the sides: a,b,c:

pC = ArcCos[5/13];
ri = Sqrt[100/9];

eq = {60 == 1/2  a  b  Sin[pC],
60 == ri (a + b + c)/2,
60 == 1/4  Tan[pC]  (a^2 + b^2 - c^2),
{a, b, c} > 0
};
sol = Solve[eq, {a, b, c}][[1]]

{a -> 10, b -> 13, c -> 13}


To check, we use a formula for the incircle radius and compare it against: ri:

s = (a + b + c)/2 /. sol;
(Sqrt[(s - a) (s - b) (s - c)/s] /. sol  ) == ri

True

• Did you read "How to solve it with Mathematica by using GeometricSolveValues, not solving a system of three equations in three unknowns?" in the question and my comment "Solve[p == (x + y + z)/2 && p*(p - x)*(p - y)*(p - z) == 60^2 && (60/p)^2*Pi == Pi*100/9 && 5/13 == (x^2 + y^2 - z^2)/2/x/y && x > 0 && y > 0 && z > 0, {p, x, y, z}, Reals] works well" to my question before having submitted your attempt to answer? Jan 30 at 19:57
• I think you don't understand the aim of the question to test the GeometricSolveValues command. Jan 30 at 20:00