# Triangle Calculator

The calculator will try to find all sides and angles of the triangle (right triangle, obtuse, acute, isosceles, equilateral), as well as its perimeter and area, with steps shown.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Solve the triangle, if $a = 9$, $b = 10$, $C = 45^0$.

## Solution

According to the law of cosines: $c^{2} = a^{2} + b^{2} - 2 a b \cos{\left(C \right)}$.

In our case, $c^{2} = 9^{2} + 10^{2} - \left(2\right)\cdot \left(9\right)\cdot \left(10\right)\cdot \left(\cos{\left(45^0 \right)}\right) = 181 - 90 \sqrt{2}.$

Thus, $c = \sqrt{181 - 90 \sqrt{2}}$.

According to the law of sines: $\frac{a}{\sin{\left(A \right)}} = \frac{c}{\sin{\left(C \right)}}$.

In our case, $\frac{9}{\sin{\left(A \right)}} = \frac{\sqrt{181 - 90 \sqrt{2}}}{\sin{\left(45^0 \right)}}$.

Thus, $\sin{\left(A \right)} = \frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}}$.

There are two possible cases:

1. $A = \left(\frac{180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)}}{\pi}\right)^0$

The third angle is $B = 180^0 - \left(A + C\right)$.

In our case, $B = 180^0 - \left(\left(\frac{180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)}}{\pi}\right)^0 + 45^0\right) = \left(\frac{- \pi \left(45 + \frac{180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)}}{\pi}\right) + 180 \pi}{\pi}\right)^0.$

The area is $S = \frac{1}{2} a b \sin{\left(C \right)} = \left(\frac{1}{2}\right)\cdot \left(9\right)\cdot \left(10\right)\cdot \left(\sin{\left(45^0 \right)}\right) = \frac{45 \sqrt{2}}{2}.$

The perimeter is $P = a + b + c = 9 + 10 + \sqrt{181 - 90 \sqrt{2}} = \sqrt{181 - 90 \sqrt{2}} + 19$.

2. $A = \left(\frac{- 180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)} + 180 \pi}{\pi}\right)^0$

The third angle is $B = 180^0 - \left(A + C\right)$.

In our case, $B = 180^0 - \left(\left(\frac{- 180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)} + 180 \pi}{\pi}\right)^0 + 45^0\right) = \left(\frac{- \pi \left(45 + \frac{- 180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)} + 180 \pi}{\pi}\right) + 180 \pi}{\pi}\right)^0.$

This case is impossible, because the angle opposite to the longer side must be larger.

$a = 9$A

$b = 10$A

$c = \sqrt{181 - 90 \sqrt{2}}\approx 7.329446049083208$A

$A = \left(\frac{180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)}}{\pi}\right)^0\approx 60.258581489369345^0$A

$B = \left(\frac{- \pi \left(45 + \frac{180 \operatorname{asin}{\left(\frac{9 \sqrt{2}}{2 \sqrt{181 - 90 \sqrt{2}}} \right)}}{\pi}\right) + 180 \pi}{\pi}\right)^0\approx 74.741418510630655^0$A

$C = 45^0$A

Area: $S = \frac{45 \sqrt{2}}{2}\approx 31.819805153394639$A.

Perimeter: $P = \sqrt{181 - 90 \sqrt{2}} + 19\approx 26.329446049083208$A.