The Forum > Math & Science > Math Problem Thread
Sorry, it just came across as pompous to me. XD It's hard to gauge tone through text, and admittedly I have a negative bias towards NP as being a haven for ego and condescension, which isn't really fair. I'm pretty sure I've nailed the number to five significant digits, though that's not enough for the Project Euler problem. |
As an approach, why not go with the "mean of square minus square of mean" definition, and work bottom-up. Use an array for each value of I as suggested, it does need to be 2d so you can store the frequency, value and value squared for each result on Id20. Use these to generate the summed values for D (remembering to account for the frequency) and so on up the chain. Edit: I'm havering. You only need the sum and sum of squares stored at each level, plus the overall divisor. |
If you are doing the massively parallel random sample method, I suggest making sure you use a variance algorithm that does not require you to store all the data before processing it. http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm |
Nonono, I never meant that all the data needed to be saved before processing it, but rather that combining the data gathered from each process at the end ended up being serial, regardless of the algorithm used for calculating variance. Any serious attempt I made at solving the problem would involve analyzing how the variance breaks down and attempting to eliminate large portions of the variance calculation by doing them via known formulae instead of the entire simulation. Edit: Oh, and memoization, if applicable. |
Also, when mentally checking prime numbers, you only have to check divisibility up to the square root. So, if you're testing, say, 137, you know that if it is composite there must be a factor less than 12 that divides it ( 122 == 144), so you only have to check divisibility by 2,3,5,7, and 11. 2 and 5 are obvious, 3 is straightforward (sum of the digits 1+3+7 = 11 = not divisible by three), so you only have to 'check' 7 and 11. If you've got a feel for your multiplication tables, that should be pretty quick. (140 is an obvious multiple of 7, 140-137 = 3 = not divisible by 7, 137-121 = 16 = not divisible by 11, so 137 is prime). |
There is a 1/60th of a degree difference between two slots on rotating disks in a device used to measure the speed of light through different gases. Given the speed of the disks and the distance between them, shouldn't it be very easy to determine the speed of light through the particular gas? I mean, I don't see much higher level math here, the highest seems to just be some larger end numbers and trig. |
I actually am not sure of the general solution to those sorts of equations. What I would do is consider the possible cases separately: first assume that x > 1.5. Then assume -3 < x <= 1.5. Lastly, assume x <= -3. If x > 1.5, you can simply drop the absolute values because both terms are non-negative. If -3 < x <= 1.5, then the left absolute value term is positive, so you can drop that absolute value and then solve the equation as you normally would with an absolute value problem. If x <= -3, then the first term can be replaced by "-x - 3", and the second term can be replaced by "-x + 1.5" (you can reason through why yourself, or ask me to explain why). In each case, make sure that the answers you get when you solve for x match your assumption (so for the first case, throw out any answers that are less than or equal to 1.5). I hope that helps. Perhaps someone else can come up with a more general method for solving it. Here's a similar example I contrived to illustrate the process without giving the answer away: |x| + |x - 2| = 2 First assume x > 2.
|
jaxxie said: I have to solve this equation with absolute value: |x+3|+|x-1,5|=5 I am not so sure about how to go about this, my teacher didn't explain absolute values very well and the book we have in class mentions almost nothing on the subject. For the general approach for these, let's start with a simpler example: |x + 1| = 2 For each absolute value, compute the answer by removing the absolute value and also compute it again by flipping the sign of everything else. valid answers are: x + 1 = 2 x + 1 = -2 x = 1 or -3 Flipping the sign of everything else is the most intuitive, but flipping the sign of the absolute value expression is essentially the same thing x + 1 = 2 -(x + 1) = 2 --> -x - 1 = 2 If there are multiple aboslute value expression, then you need to flip the signs for each possible combination. That's 2n possible combinations. |x+3|+|x-1,5|=5 creates the following 4 possible x + 3 + x - 1.5 = 5 -(x + 3) + x - 1.5 = 5 x + 3 + -(x - 1.5) = 5 -(x + 3) + -(x - 1.5) = 5 simplify each: 2x + 1.5 = 5 0x + 1.5 = 5 (invalid, no solution for this combination) 0x - 1.5 = 5 (also invalid, no solution for this combination) -2x - 1.5 = 5 solutions: x = 1.75 x = -3.25 double-check: |x+3|+|x-1,5|=5 |4.75| + |-.25| = 5 (yup) |-.25| + |-4.75| = 5 (yup) |
Even though Blake's methods were more what I was looking for, you managed to explain something that I believe is what the teacher was trying to explain at the black-board that one time. Thank you both very much. That cleared up the situation and explained everything I needed to know about this type of equations for now. I don't know what I would've done without you. |
So I cannot, for the life of me, solve this simple problem. I need to find the limit of sin(x)/((2x^2)-x) as x approaches 0. I can tell graphically that it is negative one. But I need to prove algebraically with the properties of limits and the limit of sin(x)/x which equals one. Is that understandable? |
SporeInsanity said: So I cannot, for the life of me, solve this simple problem. I need to find the limit of sin(x)/((2x^2)-x) as x approaches 0. I can tell graphically that it is negative one. But I need to prove algebraically with the properties of limits and the limit of sin(x)/x which equals one. Is that understandable? limx->0 sin(x)/((2x^2)-x) limx->0 sin(x)/(x(2x-1)) limx->0 1/(2x-1) = -1 |
The Forum > Math & Science > Math Problem Thread
