Message Boards Message Boards

0
|
5210 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Wolfram Alpha: Triangle and Cone computation issue

Posted 10 years ago

Is it possible to compute a triangle with a specific side length?

For example I have a triangle with angles C=90, B=70, A=20. The a side is .75. I would like to solve for the rest.

What I really would like to do is visualize a cone with an interior angle of 70 from the top and a height of .75 I am ultimately looking for the base of the cones diameter.

Any help would be appreciated.

Thank you, Logan

POSTED BY: Logan Greenlee
5 Replies
Posted 10 years ago

Thanks for the assist everyone...

I found this phrasing to get me very close:

width of a triangle with interior angles (70°,20°,90°) and a height of .75

Result: w

This yields what looks like a properly formed input interpretation but the resulting values are not computed. I would expect that WA would compute the remaining values since these can all be solved by standard trig functions.

POSTED BY: Logan Greenlee
Posted 10 years ago

Ah, I didn't see WolframAlpha in your question and so I incorrectly assumed you were using Mathematica.

I am impressed with the query you found that it understands. I would never have guessed something like that.

I'm sorry, but usually my experience with WolframAlpha is about the same as yours, by trial and error I can get something out of it, but it isn't really what I wanted and usually no amount of trying to guess what word to give it will give me the answer I'm really looking for. I tried "base", I tried "altitude", I tried "height", I tried "width", I gave up. Sorry.

POSTED BY: Bill Simpson

In Mathematica 10: AASTriangle[70 Degree, 20 Degree, .75]

POSTED BY: Sjoerd de Vries
Posted 10 years ago

Hello Bill,

Thank you for your well thought out solution to this problem. Is there an easier way to solve this? I was expecting something like specifying the side of the triangle. For example, "triangle, 70,20,90" produces a triangle with the proper angles. I can also do "triangle, 70,20,90, hypotenuse=2.06" and I will received a solved triangle as well. I would like to be able to specify a specific side other than the hypotenuse.

Thank you, Logan

POSTED BY: Logan Greenlee
Posted 10 years ago

If you Google MathWorld Cosine Law, you can find the equations that relate angles and sides in a triangle.

Next you have to translate that into notation that is acceptable to Mathematica. Mathematica uses radians instead of degrees, but you can write 70 Degree and Mathematica will understand that. Mathematica is also case sensitive and some upper case names, like C and N, have been defined as internal functions. Use one of those as a variable name and you will find grief. So for those angles A, B and C I use names aA, aB and aC. Parts of Mathematica often have problems with decimal numbers and using exact fractions can sometimes avoid those. Then you can later translate back to decimals to inspect your result. Many new users find the function Solve and assume that is the answer to all their problems, but for more complicated problems the Reduce function can be more powerful and get a correct answer. And watch out for = versus == versus :=, those are all very different and get new users into all kinds of problems. Watch out for bc, which Mathematica thinks is a variable with a two letter name, while b c or b*c are two variables multiplied together. Remember it is always Cos[angle] and not Cos(angle) or cos(AnGle) or cos angle. Hopefully this is enough background to get you oriented and try to keep you out of trouble.

Let's give Reduce the information you have provided and those three equations from the Cosine Law, ask it to find what the two unknown sides are and finally use the N function to turn the result back to decimal, and for this problem that simplifies the answer at the same time.

In[1]:= N[Reduce[{aC == 90 Degree, aB == 70 Degree, aA == 20 Degree, a == 3/4,
   a^2 == b^2 + c^2 - 2 b c Cos[aA],
   b^2 == a^2 + c^2 - 2 a c Cos[aB],
   c^2 == a^2 + b^2 - 2 a b Cos[aC]}, {b, c}]]

Out[1]= a == 0.75 && aA == 0.349066 && aB == 1.22173 && aC == 1.5708 && b == 2.06061 && c == 2.19285

For some reason that gives back some things you already knew, a==0.75 and it tells you your three angles in radians. If you get a number q that is an angle in radians and you want to know what that is in degrees then you can calculate q/Degree. But it finally tells you what you asked for, the lengths of your two unknown sides b and c. If you choose the correct one of those sides then you should be able to calculate the diameter that you desire.

Study this. Test this on simpler problems where you know what the answer should be and see if it finds the correct answer. Try giving it sides and see if it can find angles. You have to be a little careful with angles because the Cosine Law gives the same answer for 90 degrees that it does for 90+360 or 90+7*360 and you may have to include something like 0<=aA<360 Degree to let Reduce know that you are assuming any angle has to be between 0 and 360 degrees.

POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract