Wikipedia:Reference desk/Archives/Mathematics/2007 April 3
Mathematics desk | ||
---|---|---|
< April 2 | << Mar | April | May >> | April 4 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
April 3
edittime for thrown baseball to reach height s
editHeres my problem from homework: "If a baseball is thrown straight upward from a level ground with an initial velocity of 72 ft/s, its altitude s (in feet) after t seconds is given by s = −16t2 + 72t. For what values of t will the ball be at least 32 feet above the ground?" So I figured you make an equation 32 ≤ −16t2 + 72t and figure it out algebraically from there. However, in the back of the book it gives the answer as 1/2 ≤ t ≤ 4. Could someone guide me to how you would obtain this answer? Thanks 65.30.153.24
- Solve the inequality. You don't know how to do that? Factor the quadratic. —The preceding unsigned comment was added by 129.78.208.4 (talk) 03:18, 3 April 2007 (UTC).
- We know from physical experience, if not from mathematics, that the ball will rise up and then fall down again. If it goes above 32 feet, then for two values of time it will be exactly 32 feet high. Thus we seek solutions for the equation
- If you cannot solve this equation on your own, probably you should drop the course, as the challenges will only get harder.
- But let's assume you can find two solutions; then one of the times will be less than the other, and on physical grounds we may expect times between these to satisfy the demand. (To verify, calculate the height at their average.) --KSmrqT 04:01, 3 April 2007 (UTC)
- =================================================================
- 32 <= X
- Add (-32) to both sides
- 0 <= X - 32
- Replace X with -16t^2 + 72t
- 0 <= -16t^2 + 72t - 32
- From here on, the problem is very simple to solve.
- If you are a lazy bastard then plot the curve -16t^2 + 72t - 32 on your graphical calculator.
- 220.239.107.54 13:33, 3 April 2007 (UTC)
how to generate prime numbers?
editis there any way to generate an arbitrary prime number?or ageneral way to generate prime numbers? 80.255.40.168 08:04, 3 April 2007 (UTC)ARTHER
- Take a random number, test if prime. If not, add one and repeat. There are reasonable primality testing methods so this method is valid to generate a random prime. —The preceding unsigned comment was added by 149.135.62.165 (talk) 10:03, 3 April 2007 (UTC).
- Some minor points. First, "random" or "arbitrary" on its own is not well defined - you need to say what distribution you want your prime numbers to follow. But let's assume that "random" means that you want a uniform distribution, where each prime number is equaly likely to be picked. Then you need to put an upper limit on the range of your prime numbers - so you want a random prime number between 1 and 1,000, say, or between 1 and 1,000,000. Finally, if you pick a random number with a uniform distribution and the discard non-primes, this will not produce a uniform distribution of primes. There will be a small bias towards smaller primes because a large number is less likely to be prime than a small number (see prime number theorem). Gandalf61 10:59, 3 April 2007 (UTC)
- See also Generating primes. PrimeHunter 11:53, 3 April 2007 (UTC)
- To clarify a bit on something Gandalf said, you won't get a uniform random distribution of primes if you follow the "discard and add one" procedure. In fact, though, I think the bias in that procedure would be to make individual large primes more likely than individual small primes. The reason is that prime deserts, which are large sequence of consecutive composite numbers, will all result in the same prime number being chosen. If you start in a desert, and add one repeatedly until you get a prime, you'll get the prime at the high end of the desert. So the probability of getting a prime at the high end of a desert is proportional to the size of the desert of composite numbers preceding it. Thus the most likely individual primes in that distribution are the ones that are preceded by a large number of non-prime numbers.
- You can modify your procedure, though, to get a uniform distribution by doing a new uniformally random selection over your range every time (ie randomly pick a number in the range, check if it's prime, and if not randomly pick a different number). Under that algorithm the probability of any particular prime number being eventually chosen is equal. Dugwiki 15:34, 4 April 2007 (UTC)
- Aha, I should have read the anon contributor's answer more carefully. Yes, the "discard and add one" method introduces a variable bias because the probability of a prime being chosen is proportional to the length of the non-prime gap immediately below it. The upper prime in a twin prime pair, for example, will have a much smaller chance of being chosen than a prime at the high end of a "desert". But the "discard and choose a new random number" method - which is what I thought had been suggested - still has its own systematic bias towards smaller primes. For example, there are 15 primes below 50, and only 10 primes between 50 and 100, so if your upper limit of your range is 100, then 60% of your "random" primes will be in the bottom half of your range, and only 40% will be in the upper half. Gandalf61 15:59, 4 April 2007 (UTC)
- I think Gandalf is wrong- "discard and choose a new random number" does in fact give a uniform distribution on primes in the relevant set. The bias towards smaller numbers is because there are more small numbers in the set. The probability of picking any one element from that set is equal for all elements86.27.93.130 07:28, 10 April 2007 (UTC)
- What about pick an arbitray number, if its even, and not 2, then add 1, and see if its prime. Oh. That again will only make the search more efficent.
- You can use this link:
- Another way to generate a prime number is the sieve of erostathnies.
- Another way is to generate a list of prime numbers in increasing order, and pick one off the end, when you get tired. ::)) Artoftransformation 13:52, 9 November 2007 (UTC)
why cannot we find ln(-1)?
editwe know that sqr(-1)=i,this complex number comes from finding roots or (x^2)+1=0.the function f(x)=(x^2)+1 has no graph when x<1.the question is,the function f(x)=lnx has no graph when x<0,so why cannot we find roots or sort of numbers like ln(-1)?
80.255.40.168 08:22, 3 April 2007 (UTC)ARTHER
- The complex logarithm is defined for all non-zero complex numbers. It is also multi-valued. Since (for any integer k), for any integer k. Usually people restrict the angles to be within , so they say . --Spoon! 09:40, 3 April 2007 (UTC)
Geography
edit1) What is the angle (degrees from North) from Lahore, Pakistan to Makkah, KSA? 2) What is the angle (degrees from North) from Lahore, Pakistan to Mashhad, Iran? —The preceding unsigned comment was added by 203.81.194.11 (talk) 09:14, 3 April 2007 (UTC).
- How accurate do you want the answer? If a not very accurate answer will suffice then bring out a map and draw a line from Lahore to Mecca. Then read the angle off the map.
- This is obviously wrong. This method gives you always direction of 90° or 270° for two places on the same circle of latitude, while the orthodrome is a circle of latitude only if it is the equator — but in most cases it is not a circle of latitude, so the direction sought is neither west nor east. For some pairs of points of the same latitude it can even be NORTH! (Consider two points at latitude 50°N, one at longitude 90°W, the other one at 90°E.) --CiaPan 14:19, 3 April 2007 (UTC)
- If you want a very accurate answer then you need to use spherical coordinates. Using the dot product multiply the two vectors (from the centre of the earth to both cities) to get the angle between the two cities. Then use the Law_of_cosines_(spherical) rule to find the desired angle. Problem solved. 220.239.107.54 13:11, 3 April 2007 (UTC)
- PS: You probably figure out by now that we will not give you the answer. We just tell you how to find/calc the answer for yourself. 220.239.107.54 13:44, 3 April 2007 (UTC)
- Who is "we"? --LambiamTalk 13:51, 3 April 2007 (UTC)
- The OP actually was asking for the azimuth from one point to the other, not the angle subtended at the core by the great circle segment between them. Anyway, tools to calculate this for you are readily available online. --Tardis 16:16, 3 April 2007 (UTC)
- .....and the 220.239.107.54 user's answer leads toward finding the azimuth value. Given the calculated (angular) distance from A to B you can construct a spherical triangle A-B-pole, which has all sides known. Then it is possible to calculate its angles (actually you need only one of them) and eventually get the described direction as the horizontal angle from North. --CiaPan 16:55, 3 April 2007 (UTC)
- I found only one free online azimuth calculator: the Great circle azimuth bearing and range calculator (with magnetic north). From the results I get it appears that it uses a spherical model. For the locations that are relevant here, the resulting discrepancy with the standard ellipsoid model is about 0.1°. The data I used as geolocation coordinates, picking, if possible, a striking spot in the cities using Google Earth – but I didn't find anything particularly striking in Lahore:
- The azimuths I found with respect to Lahore, using the oblate spheroid model with standard parameters, are:
- Makkah: 99.60°
- Mashhad: 64.89°
- These are the respective deviations from true North, measured counterclockwise (in Westerly direction). --LambiamTalk 20:53, 4 April 2007 (UTC)
Cox proportional hazards model
editIn survival analysis, I was wondering if it was possible to use a Cox PH model to calculate expected survival times. From what I see the cumulative hazard will never be infinite so the expectation will always diverge. Am I missing something? Thanks. 23:35, 3 April 2007 (UTC)