Wikipedia:Reference desk/Archives/Mathematics/2007 March 31

= March 31 =

Room cooling
Suppose there is a room full of room-temperature air No way! (say, 70 degrees fahrenheit), being maintained by a central heating unit. Then suppose a door in that room was left open, exposing the room to the outdoor 40-degree-fahrenheit air. Would there be a way (i.e., equation and/or graph) to express the speed of the drop of the room's temperature? Would it be relevant to know 1) the size of the doorway, and 2) the output of the heating unit? If so, in what units? V-Man - T/C 01:30, 31 March 2007 (UTC)


 * Newton's law of cooling should give you most of what you're looking for. --YbborT SURVEY! 01:39, 31 March 2007 (UTC)


 * Thanks! I should have figured it would display exponential decay. Does that include the hypothetical heating unit? It seems to me that it would simply be a coefficient somewhere in that equation to modify the shape of the cooling curve, but exactly where it would apply is beyond me. V-Man - T/C 01:46, 31 March 2007 (UTC)

Also note that you would end up with a sharp temperature gradient, with it being right around 70 near the floor, by the door, but much hotter near the heating vents, quite possibly hotter than the initial 70. StuRat 07:34, 31 March 2007 (UTC)


 * To model this realistically is not simple; because hotter air is lighter you also get circulation and thermal convection. If the door is to the outside, even a small breeze also makes a large difference. --Lambiam Talk  09:28, 31 March 2007 (UTC)


 * Newton's law of cooling, referred to above, is a simplified model of heat loss due to conduction. However, you cannot apply this model to the "warm room" scenario for two reasons. First reason is that the quantity of heat in the system is not constant - the central heating unit is a source of heat in the room. Second, and more important, reason is that convection will be a more important mechanism for heat transfer here than conduction. Once you introduce convection you have a non-linear dynamic system where the temperature throughout the room changes over time. The temperature distribution may eventually settle into a dynamic equilibrium state or a limit-cycle, or it may be chaotic. So the simple answer is there is no simple answer. Gandalf61 10:53, 31 March 2007 (UTC)


 * If you want to keep things simple, don't forget that the original assumption that the room was at 70 degrees implied that this was uniform throughout, so that the heat input must be being balanced by the heat lost through the walls/ceiling/floor. This would be exactly the same case as a perfectly lagged room at 70 degrees suddenly having the door opened, i.e. the heating unit could be ignored.→86.132.232.155 13:34, 31 March 2007 (UTC)

Counting
I have a counting objects problem. It's the kind of one that goes "for n somethings, find how many ways you can perform a certain task". The idea is to express my solution as a function of n, more specifically I think they mean as a closed-form expression. Currently I have a big messy sum which will give me the answer for any n, given enough pen/paper or a computer, but the wording of the question suggests that there exists something nicer. Anyway, I'm totally stuck and my question is, what should my strategy be? Should I look at the sequence I get for n = 1, 2, 3... on its own or go back to the original problem or mess around with my messy sum? Thanks. --87.194.21.177 10:57, 31 March 2007 (UTC)
 * permutations / combinations right? the articles have handy dandy formulas you can use.Coolotter88 11:28, 31 March 2007 (UTC)
 * The *On-Line Encyclopedia of Integer Sequences is a good place to try, in that your sequence for n=1, 2, ... may be found to exist with a simpler explicit formula than you have.→86.132.232.155 13:27, 31 March 2007 (UTC)
 * Thanks guys. It's not permutations / combinations exactly, though I guess I made it sound like that from the way I wrote above.  I may as well tell you: it's counting partitions (in this sense) but with constraints on the values of the terms.  OEIS doesn't have it.  --87.194.21.177 16:31, 31 March 2007 (UTC)
 * Can you tell us your problem and show us the messy sum you have so far? --Spoon! 22:20, 31 March 2007 (UTC)

I've posted my nonsense in a new question below. Thanks. --87.194.21.177 10:33, 1 April 2007 (UTC)
 * Read Knuth's Concrete Mathematics. It explains all you can do to get closed formulas.  &#x2013; b_jonas 18:04, 2 April 2007 (UTC)

Calculating the sides of a triangle from the hypotenuse and the aspect ratio?
I have long forgotten 99.8% of what I was taught in Maths. I want to work out the length of the sides of a triangle when the only known values are the length of the hypotenuse and the ratio between the two other sides. In this case, the hypotenuse is 20 inches and the ratio is 1.6:1. The angles (apart from the obvious 90°) are unknown. Adrian  M. H.  17:55, 31 March 2007 (UTC)


 * Assuming a right triangle, square the hypotenuse, and you get 400. Now set 400 = a^2 + (1.6a)^2 and solve for a and you'll get one side. Multiply it by 1.6 and you'll get the other side. --Wirbelwind ヴィルヴェルヴィント (talk) 18:05, 31 March 2007 (UTC)
 * Thanks, but you've lost me there! Adrian   M. H.  18:09, 31 March 2007 (UTC)
 * Well, remember the Pythagorean theorem? It says $$C^2 = A^2 + B^2$$, where C is the hypotenuse, and A and B are each of the other sides. You know the hypotenuse is 20, so you substitute C with 20 and square it, so you get $$400 = A^2 + B^2$$. Now, you know the ratio between A and B is 1.6, so we'll say 1.6 * A = B, and replace B in the equation with 1.6A, and you'll get $$400 = A^2 + (1.6A)^2$$. Now square the 1.6A and you get $$2.56A^2$$, and put that back into the equation to make $$400 = (1)A^2 + 2.56A^2 = 3.56A^2$$. Divide both sides by 3.56 and you get $$\frac{400}{3.56} = A^2$$. Take the square root of both sides, and you get $$\sqrt{\frac{400}{3.56}} = A$$. Now, find B because you know 1.6 * A = B from before. And there you have your answers. --Wirbelwind ヴィルヴェルヴィント  (talk) 18:23, 31 March 2007 (UTC)
 * Oh, Pythagoras is in that 99.8%! Thanks for the explanation anyway; I think that's clearer now. Adrian   M. H.  18:29, 31 March 2007 (UTC)


 * Or you could instead use trigonometry: The two sides are 20 cos(tan-1 1.6) and 20 sin(tan-1 1.6), or about 10.6 and 16.96 . MrRedact 19:44, 31 March 2007 (UTC)

the length of the hypotenuse and the ratio between the two other sides. That is the definition of tangent. Tan(theta) = side A / side B.


 * So theta = arctan(side A/side B)
 * Side A = hypotenuse * sin(theta)
 * Side B = hypotenuse * cos(theta)
 * Problem solved.220.239.107.54 22:07, 31 March 2007 (UTC)

Rounding
I was given a math problem where the answer was 20.03845, and I was told to round to the nearest tenth. I gave 20, but my math teacher took off a point saying it should be 20.0. What do you think? Thanks!! Reywas92 Talk 18:37, 31 March 2007 (UTC)


 * That is right because writing 20 means you're rounding to the nearest 1. When you write 20.0, you're writing that it's 20.0x, whereas when you write 20, it can mean it's 20.499999 and still round to 20. Both value are the same written down, but the case arrises like the example I gave where there's a clear difference between 20.0 and 20.5 when they're rounded to the nearest tenth, but both become 20 when you round to the nearest 1. --Wirbelwind ヴィルヴェルヴィント (talk) 19:05, 31 March 2007 (UTC)


 * Were the page in better shape, a look at Significant figures might be helpful. But that page completely misses the point. This page seems to give a pretty good overview, and this page does a good job of saying "why". --YbborT  19:13, 31 March 2007 (UTC)


 * Everyone is right (wrong). The teacher is following the tradition of using digits to imply error limits, so that 20.0 implies an error of plus-or-minus one-half unit in the last place, consistent with rounding to the nearest tenth. You are right in that 20 is commonly taken to be exactly the same number as 20.0, of course. In technical work, better practice is to explicitly state error bounds, such as 20±0.04 in this example. Two further issues: (1) an integer without a decimal point conveys to many readers an exact value, not an approximation, so you might keep that in mind. (2) In computer programming languages, "20" and "20.0" can behave differently, and we should write the latter even when we round to the nearest one, not tenth. (We avoid "20." for various reasons.) --KSmrqT 21:37, 31 March 2007 (UTC)
 * (2) is not completely true. If you store 20 in a double/float, it still comes out to 20.0. --Wirbelwind ヴィルヴェルヴィント (talk) 22:01, 31 March 2007 (UTC)
 * You chose one example in one programming language to contest my claim. Must I now exhibit multiple examples in multiple languages to confirm that they can behave differently? Suppose I say "Some numbers are less than five"; if you say "Six is not", does that make my statement any less true? --KSmrqT 22:20, 31 March 2007 (UTC)
 * I only said it's not completely true, not that's it's always wrong. Plus, it's more than one language, because C/C++/Java/C# etc probably constitutes a big majority of code. --Wirbelwind ヴィルヴェルヴィント (talk) 04:02, 1 April 2007 (UTC)
 * The word can in KSmrq's remark already implies that this (different behaviour) is not always the case. If someone says: "The numbers 1 and 10 can behave differently", it is not reasonable to respond with "That is not completely true since if you multiply them by 0 you get the same result". --Lambiam Talk  05:03, 1 April 2007 (UTC)
 * No, I mentioned it because what a non-programmer would imply is that 20 and 20.0 can behave differently in every language, instead of in some languages, 20 and 20.0 can behave differently. Somehow, trying to clarify puts me in front of a firing squad. Guess I won't clarify any more. --Wirbelwind ヴィルヴェルヴィント (talk) 18:02, 1 April 2007 (UTC)
 * Not to worry, the firing squad is using rubber bullets. :-) --KSmrqT 21:45, 1 April 2007 (UTC)


 * In C++ the literal "20" is of an integer type and "20.0" is a double. This is rarely an issue, but you might run into some unexpected behaviour if you compared (float)(20/3) to (float)(20.0/3.0), as the first may integer-divide, thereby rounding down to 6. - Rainwarrior 06:26, 2 April 2007 (UTC)


 * You round decimals. Tenths are the number directly beyond the point or comma. the 2 in 20 are tens, not tenths. - Mgm|(talk) 09:34, 4 April 2007 (UTC)

Paradox?
Is this a paradox?

Say the Guiness Book of World Records is about to release a new edition of their book, but is one page short of tying for the record of longest book in the world. If they insert a new page saying that they are the longest book in the world, then the page is true, but if said page is omitted, becomes false. --Tuvwxyz (T) (C) 22:06, 31 March 2007 (UTC)
 * Yep, I'd say that it is - there would be a justifiable case either way, at least. ST47 Talk 02:01, 1 April 2007 (UTC)


 * Not a paradox. A dilemma, perhaps. Unless I didn't understand your question here. &mdash; Kieff | Talk 05:08, 1 April 2007 (UTC)


 * Here's an explanation why it isn't a paradox: If the book says it's the longest book in the world, it actually is the longest book in the world. If it omits the page, it isn't the longest book and it doesn't say it's the longest book. There are no unavoidable contradictions so there's no paradox. --Nitku 11:26, 1 April 2007 (UTC)


 * You could, though, twist the original scenario into a paradox with a small change. For example, let's say that the top two longest books by word count are "Guiness Extreme" (the X-treme edition of the book) with 100,000 words and "Wiki Editing For Dummies" with 100,010 words.  The Guiness editors want to add one of two sentences: either "Guiness Extreme is the longest book by word count" or "Wiki Editing For Dummies is the longest book by word count."  However doing either one creates a contradiction.  If they add the Guiness sentence, then the new word count is only 100,009 words, one word short of the Wiki book, and thus still wouldn't quite be the longest.  But if they instead add the Wiki sentence, their new word count is 100,011, breaking the record and making the Guiness book the longest.  So if those two sentences are your only options then you have a paradox because either version will contain a logical fallacy. Dugwiki 16:57, 2 April 2007 (UTC)


 * It's certainly self-referential, which may be a good search term if you want more like it. Of course, the practical answer would be that it couldn't really happen, for several reasons. One is, they probably have rules against awarding themselves titles, to prevent conflict of interest. Black Carrot 03:50, 5 April 2007 (UTC)

Sum and difference identity
The list of trigonometric identities has $$\sin{(x+y)}$$, but how do you solve $$\sin{(x+y+z)}$$ Cheers. --MZMcBride 23:41, 31 March 2007 (UTC)
 * Start with the formulas for $$\sin(x+y)$$ and $$\cos(x+y)$$ :
 * $$\sin(x+(y+z)) = \sin(x)\cos(y+z) + \cos(x)\sin(y+z)$$
 * $$\sin(x+(y+z)) = \sin(x)(\cos(y)\cos(z) - \sin(y)\sin(z)) + \cos(x)(\sin(y)\cos(z) + \cos(y)\sin(z))$$
 * $$\sin(x+(y+z)) = \sin(x)\cos(y)\cos(z) + \cos(x)\sin(y)\cos(z) + \cos(x)\cos(y)\sin(z) - \sin(x)\sin(y)\sin(z)$$
 * A way to remember that would be to add the three possible terms containing only one sin and then subtracting the sin sin sin term.
 * -Xedi 00:20, 1 April 2007 (UTC)
 * Fantastic work! Thanks for the help. --MZMcBride 00:36, 1 April 2007 (UTC)
 * You're welcome ! :) -Xedi 00:39, 1 April 2007 (UTC)


 * You can solve all such problems if you remember just two identities and a pair of definitions (and some elementary algebra, such as ax+y = ax·ay):
 * i2 = −1;
 * eix= cos(x) + i sin(x), (known as Euler's formula);
 * Re(a + ib) = a, Im(a + ib) = b, where a and b are real numbers.
 * I'll show by way of example how to derive the identity cos(x+y) = cos(x)cos(y) − sin(x)sin(y):
 * cos(x+y)
 * = Re(cos(x+y) + i sin(x+y))
 * = Re(ei(x+y) )
 * = Re(eix·eiy )
 * = Re((cos(x) + i sin(x))·(cos(y) + i sin(y)))
 * = Re(cos(x)cos(y) + i cos(x)sin(y) + i sin(x)cos(y) + i2sin(x)sin(y))
 * = Re(cos(x)cos(y) − sin(x)sin(y) + i(cos(x)sin(y) + sin(x)cos(y)))
 * = cos(x)cos(y) − sin(x)sin(y).
 * By studying the pattern you can see, for example, that in the cosine of a sum of any number of angles you'll get a sum of the products of all combinations of a product of sines and cosines of each of the component angles in which you have an even number of sines, and for each additional pair of sines the sign of the product is flipped. Same for the cosine of a sum of angles, except that for "even" read "odd". --Lambiam Talk  05:43, 1 April 2007 (UTC)