# Basic Trig Question

This is a discussion on Basic Trig Question within the Tech Board forums, part of the Community Boards category; Hello, Sorry about this but my trig's been firing blanks lately:- If I know the area of a triangle and ...

1. ## Basic Trig Question

Hello,

Sorry about this but my trig's been firing blanks lately:-

If I know the area of a triangle and its internal angles, can I work out the length of its sides?

2. Yes, though it'd kind of be a pain.

If you have all the angles, you can guess the length of one side and use the law of sines to obtain the remaining sides. Once you have all the sides, you can use Heron's formula to calculate the area. This obviously won't match your specified area, but since area scales according to length squared, you can multiply your guess by the square root of the ratios of the areas, i.e. Lreal = Lguess*sqrt(Areal/Aguess).

Law of sines - Wikipedia, the free encyclopedia
Heron's formula - Wikipedia, the free encyclopedia

3. There's probably some way you can rearrange the stuff so that you're solving a system of equations as opposed to guessing, but I think guessing then scaling is pretty fast.

4. Okay yeah, since sin(a)/A = constant and so on, you can replace the sides with A = sin(a)/constant, and then solve for the constant, but you'd be solving a 4th order polynomial.

5. Yeah, I did think about doing it iteratively, but I feel that I would end up doing a thousand calculations coming up with something quite simple.

How about then, if:-

Constant area, as before;
I had the ratio of the length of the opposite and adjacent sides (e.g. 16:9);
The triangle will always be right angled;
I don't need to solve the length of the hypotenuse (unless it helps solve the other sides).

Would it be easier to get the actual lengths then?
The ratio could be interpreted as angles, that explains my earlier question.

(This is about scaling a custom coordinate system relative to screen aspect ratio, if you're interested)

6. The law I'm using:
Code:
```K = (a^2)(sinBsinC/sinA)/2

K = area
A, B, C = angles```
Solve for a:
Code:
```K/(a^2) = (sinB*sinC)/(2*sinA) =
a^-2 = ((sinB*sinC)/(2*sinA))/(K) = (sinB*sinC)/(2*sinA*K)
a^2 = ((sinB*sinC)/(2*sinA*K))^-1 = (2*sinA*K)/(sinB*sinC)
a = sqrt((2*sinA*K)/(sinB*sinC))```
Now just swap in respective values for each side:
Code:
```a = sqrt((2*sinA*K)/(sinB*sinC))
b = sqrt((2*sinB*K)/(sinA*sinC))
c = sqrt((2*sinC*K)/(sinA*sinB))```

7. Originally Posted by SMurf
Yeah, I did think about doing it iteratively, but I feel that I would end up doing a thousand calculations coming up with something quite simple.

How about then, if:-

Constant area, as before;
I had the ratio of the length of the opposite and adjacent sides (e.g. 16:9);
The triangle will always be right angled;
I don't need to solve the length of the hypotenuse (unless it helps solve the other sides).

Would it be easier to get the actual lengths then?
The ratio could be interpreted as angles, that explains my earlier question.

(This is about scaling a custom coordinate system relative to screen aspect ratio, if you're interested)
It's not really iterative, you're guessing a side to find the ratio between area and side length for the given angles, then you just scale the side length according to the desired area.

8. I still think User Name:'s method involves less steps though.

To reduce it based on what I've written (right-angled triangle, so sinC is always 1):-
Code:
`a = sqrt((2*sinA*K)/sinB)`
Once you've found a, you can then switch to simpler terms:-
Code:
```K = (a*b)/2
b = (K*2)/a```
And that's a and b!

9. Originally Posted by SMurf
Code:
```K = (a*b)/2
b = (K*2)/a```
And that's a and b!
I don't see how you derived those... When given sinC = 1, you can eliminate it from the multiplication in the equation, but you can't just throw out random stuff with it.

Code:
```a = sqrt((2*sinA*K)/(sinB))
b = sqrt((2*sinB*K)/(sinA))
c = sqrt((2*K)/(sinA*sinB))```
If you can simplify it more than that, please, show me.

EDIT: Oh... Epy linked to Heron's formula like five posts ago. That's the name of the law/formula I used. Also, once you've got one side, you can do simple algebra with the law of sines and cosines to find the rest. Be careful with law of sines though, in special cases, it can give some weird output.

10. This shouldn't be impossible?
Using the cosine law (don't know if sine's low would work in this equation, though):

c = Sqrt(a^2 + b^2 - 2abcos(v1))
b = Sqrt(a^2 + c^2 - 2abcos(v2))
a = Sqrt(b^2 + b^2 - 2abcos(v3))

3 equations, 3 unknowns.
Messy equations, though, true. But possible I would think.

11. Elysia, the Law of Cosines requires 2 given sides, he has no sides. Heron's formula(the one I used) is required to find at least one side. Once you have one side, you can use Law of Sines, which, although much more efficient, can have weird results, or you can use all 3 I derived above, which will give correct results in all cases.

12. I am aware of that.
I am also aware that this is an equation system.

2abcos(v1...v3) are merely constants since v1...v3 are known.
That leaves 3 unknowns and 3 equations which is enough to exactly solve the system.

13. The equations are not independent.

Just think about it logically. With just 3 angles, you can have infinitely many triangles.

14. *shrug*
Maybe you're right. I didn't get a chance to test it due to Wolfram and their bloody license nightmare.

15. Of course I am right . No need for CAS. This is simple logic.

If you scale all the sides equally, the 3 angles will be maintained.

That's because the 3 angles are also not independent. The third angle is redundant information (180 - a - b). That's why we need another constraint - length of one of the sides.

Page 1 of 2 12 Last
Popular pages Recent additions