Google Answers Logo
View Question
 
Q: Using the Law of Tangents to find all 3 angles in a triangle ( Answered 5 out of 5 stars,   5 Comments )
Question  
Subject: Using the Law of Tangents to find all 3 angles in a triangle
Category: Science > Math
Asked by: ejunk-ga
List Price: $5.00
Posted: 10 Jul 2002 07:20 PDT
Expires: 09 Aug 2002 07:20 PDT
Question ID: 38131
It's been a while since I took Trig. I am writing a script where I
need to fingure out the angles of a triangle. I only know the lengths
of two side. I'm guessing the Law of Tangents can be used:
Where: a,b,c are the sides and A,B,C are the angles
(b – c) / (b + c) = tangent((B – C) / 2) / tangent((B + C) / 2)

Is there a way to change this equation so that I can calculate B and C
(or B or C)?

Thanks.

Request for Question Clarification by websearcher-ga on 10 Jul 2002 08:37 PDT
Hi ejunk:

The Pythagorean Theorem can only be used if you know that the angle
between sides a and b is 90 degrees (i.e., a right angle). Are you
saying that all the triangles you wish to compute have this right
angle?

websearcher-ga

Clarification of Question by ejunk-ga on 10 Jul 2002 09:34 PDT
Sorry for the confusion. I am not dealing with right angles so the
Pythagorean Theorem won't work (like I said, it's been a while). I
just finished a function that will give the length of the 3rd side.

So now I have the length of all three sides of a triangle and no
angles. Is the law of Cosines what I need? Please let me know if you
need any more information.
Answer  
Subject: Re: Using the Law of Tangents to find all 3 angles in a triangle
Answered By: websearcher-ga on 10 Jul 2002 10:15 PDT
Rated:5 out of 5 stars
 
Hi ejunk:

Yes, now that you have the lengths of all three sides of the triangle,
the Law of Cosines is your best bet to compute the three angles.

The Law of Cosines states that (for sides a,b,c and opposite angles
A,B,C):

b^2 + c^2 - 2bcCOS(A) = a^2 
a^2 + c^2 - 2acCOS(B) = b^2
a^2 + b^2 - 2abCOS(C) = c^2  

For your script, you'll want to rewirite these formulas as:

A := arccos((b^2 + c^2 - a^2)/2bc) 
B := arccos((a^2 + c^2 - b^2)/2ac) 
C := arccos((a^2 + b^2 - c^2)/2ab) 

where "^" is the exponentiation operator and "arccos" is the inverse
cosine operator. Hopefully whatever scripting language you are using
supports inverse trig functions (because you'll need them).

I hope this helps. Thanks to everyone else who participated in the
discussion!

Search on Google: Law of Cosines

websearcher-ga

Request for Answer Clarification by ejunk-ga on 10 Jul 2002 14:27 PDT
I think I understand it now. I'm using Flash MX Actionscript to write
it. It has quite a few math functions. It has an arc cosine operator
(funtion), but no inverse cosine operator. Are they the same thing? If
not, can I calculate the the inverse cosine by taking (cos - 1)?

Thanks.

Request for Answer Clarification by ejunk-ga on 10 Jul 2002 14:52 PDT
I FIGURED IT OUT!

THANKS.

The best $5 I've ever spent.

Clarification of Answer by websearcher-ga on 10 Jul 2002 18:53 PDT
Hi ejunk!

Yes arc cosine is the same as inverse cosine. That's math lingo for you. :-) 

I'm glad I was able to be of help. 

websearcher-ga
ejunk-ga rated this answer:5 out of 5 stars
best $5 I ever spent

Comments  
Subject: Re: Using the Law of Tangents to find all 3 angles in a triangle
From: davidsar-ga on 10 Jul 2002 07:40 PDT
 
Sorry, ejunk-ga, but if you only know two sides of the triangle,
there's no way to figure out much of anything -- there's an endless
number of possibilities for the length of the third side and the
combinations of angles in the triangle.  You need at least one more
piece of information -- either the length of the third side, or one of
the angles of the triangle, in order to make any headway here.
Subject: Re: Using the Law of Tangents to find all 3 angles in a triangle
From: ejunk-ga on 10 Jul 2002 08:21 PDT
 
The length of the 3rd side can be calculated using Pythagorean Theorem- 
a^2 + b^2 = c^2
Subject: Re: Using the Law of Tangents to find all 3 angles in a triangle
From: homeuser-ga on 10 Jul 2002 08:40 PDT
 
Davidsar is correct.  Your law of tangents formula has 4 variables and
you only know two of them.  One equations but two unknowns--can't
solve.

Pythagorean theorem is only valid for right triangles.  If this is the
case, then just use basic sin, cos, or tan definitions (e.g. sin A =
a/c, sin B = b/c, where A,B,C are the angles opposite sides a,b,c).

In general if you have three sides of a triangle you are better off
with the law of cosines:  c^2 = a^2 + b^2 - 2*a*b*cos C  (A,B,C
defined as above).
Subject: Right Triangle or Law of Cosines
From: ulu-ga on 10 Jul 2002 09:04 PDT
 
Pythagorean Theorem works only for right (90 degree) triangles.
Then you could use the Law of Sines to compute the angle:
A = ARCSIN(a/c)

If that is not the case, you need the length of the third side and the
Law of Cosines:
a^2 + b^2 - 2abCOS(C) = c^2

Solving for the angle:
C = ARCCOS((a^2 + b^2 - c^2)/2ab)

You can use this for any of the angles.

http://www.etap.org/mathfiles/english/grade7/hspm14/hspm14ins4.html
http://www.ies.co.jp/math/java/trig/yogen_auto/yogen_auto.html
http://mathworld.wolfram.com/LawofSines.html
http://www.alltel.net/~okrebs/page93.html

Good luck on your script!  (I'm working on one too)
Subject: Re: Using the Law of Tangents to find all 3 angles in a triangle
From: msmorrisine-ga on 10 Jul 2002 09:14 PDT
 
The question is not clear.

This is -only- for right triangles?

Which sides are known?  Is the hypotenuse the -only- unknown side?  
Are you 100% sure it is -always- the hypotenuse that is unknown?

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy