Wikipedia:Reference desk/Archives/Mathematics/2010 April 1

From Wikipedia, the free encyclopedia
Mathematics desk
< March 31 << Mar | April | May >> April 2 >
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 1[edit]

Roots of a quartic[edit]



Find all possible values for z. You are told that 1+i is a valid solution. It's easy enough to realise that 1-i is also a valid solution ('cause all coefficients are real). But what are the other two solutions? This is a quartic! I've never done this before!--203.22.23.9 (talk) 01:21, 1 April 2010 (UTC)[reply]

If 1 + i and 1 − i are solutions (and they are; I checked), then (z − (1 + i)) and (z − (1 − i)) are factors. So first multiply these:
So use long division to divide
by
That gives you a second-degree polynomial. If necessary, use the formula for factoring that. Michael Hardy (talk) 02:04, 1 April 2010 (UTC)[reply]

(Edit Conflict) Note that and are polynomial factors of . This follows from the fact that (the polynomial ring over the complex numbers in the indeterminant Z) is a Euclidean domain; a well-known truth about polynomial rings over fields (in short, you can "perform the Euclidean algorithm on the set of polynomials with complex coefficients). Since the polynomials and are irreducible, their product is also a factor of , and therefore, (their product) is a polynomial factor of . Now, apply polynomial long division to divide by ; this will allow you to determine other irreducible polynomial factors of , and therefore other roots of . If you do carry out this division, you should obtain ; in case you are unfamiliar with the process, the steps are depicted below (unfortunately, in the variable x):

It now follows that , and that therefore only and are roots (since the only irreducible factors of are and ). Hope this helps. PST 02:38, 1 April 2010 (UTC)[reply]

That: is wrong. The second-degree polynomial with coefficient 1 at z2 power, when squared, gives a fourth-degree polynomial wih 1 at z4. Multiplying by 3 must certainly be wrong.
Additionaly, the last term 2, when squared, must result in 4 as the last term. When multiplied by 3, is gives 12 – but neither 4 nor 12 equals 6, which is the last term of the given polynomial.
The correct answer, which follows from the picture, is: --CiaPan (talk) 09:54, 1 April 2010 (UTC)[reply]
...and the solution follows from the last parenthesis:

CiaPan (talk) 10:55, 1 April 2010 (UTC)[reply]
Yes, it looks as if PST absent-mindedly took the expression at the bottom of the long division as the answer, instead of the polynomial at the top. --ColinFine (talk) 10:56, 1 April 2010 (UTC)[reply]

Sum of squared deviations (SSQ)[edit]

For SSQ = sigma(observed value - calculated value)^2, is it wrong if you reverse the two inner terms so that SSQ = sigma(calculated - observed)^2? The value of SSQ will be the same, but is the latter still considered wrong? —Preceding unsigned comment added by 70.68.120.162 (talk) 05:48, 1 April 2010 (UTC)[reply]

No, it's not wrong. They're the same thing, and how you write it is a matter of convenience. -- Meni Rosenfeld (talk) 08:05, 1 April 2010 (UTC)[reply]

Covariance and independence[edit]

Do independent random variables always have a zero covariance? —Preceding unsigned comment added by 70.68.120.162 (talk) 08:09, 1 April 2010 (UTC)[reply]

Yes. -- Meni Rosenfeld (talk) 08:23, 1 April 2010 (UTC)[reply]

Except that if each has infinite variance then the covariance may be undefined. In such cases the positive and negative parts of the covariance are both infinite; so it's a sum of +∞ and −∞.

When they both have finite variance, then the covariance exists. In such cases the covariance is 0 if the two r.v.'s are independent. Michael Hardy (talk) 17:24, 1 April 2010 (UTC)[reply]

factorial[edit]

is there a way, that given a number whose factorial is given, we can find out the original number? i.e. finding a number from its factorial? —Preceding unsigned comment added by 210.212.5.88 (talk) 09:31, 1 April 2010 (UTC)[reply]

I don't know if it's possible to use Stirling's approximation in reverse?. --ColinFine (talk) 10:59, 1 April 2010 (UTC)[reply]
Divide the number by 2, then 3, then 4, etc. Eventually you'll divide by some final number and get 1. Call this final number n, and then your original number was n!. Staecker (talk) 11:07, 1 April 2010 (UTC)[reply]
Let x=n!, and let p be the largest prime divisor of x (let us assume that this is given). Then, if q is the smallest prime strictly greater than p, (in fact, by Bertrand's postulate, p is the maximal power of p that divides x (of course, assuming that the largest prime divisor of x is greater than 3)). PST 11:43, 1 April 2010 (UTC)[reply]
Let e be the order of 2 in n! (i.e., the largest e such that 2e divides n!). Then , hence n − log2ne < n, thus e + 1 ≤ ne + log2e + 1.—Emil J. 12:00, 1 April 2010 (UTC)[reply]
PST's and Emil's suggestions require knowing the factorial exactly and performing high-precision arithmetic, neither of which seems practical. Stirling's approximation is accurate enough for this, and can be solved (preferably in logarithmic form) by any root-finding algorithm. -- Meni Rosenfeld (talk) 12:11, 1 April 2010 (UTC)[reply]
(....and see de Polignac's formula in connection with this assertion about the largest power of 2 that divides the factorial. Michael Hardy (talk) 17:10, 1 April 2010 (UTC))[reply]
The OP did not say anything about inexact input. Since you seem to be talking computers, which normally implies binary representation, I'll point out that the only "high-precision arithmetic" required by my approach is to count the number of trailing zeros, which is as simple an algorithm as it can get. I specifically chose 2 for this reason, a similar thing also works for other numbers.—Emil J. 12:25, 1 April 2010 (UTC)[reply]
I think there are two separate questions here. The first, which Staecker, PST and EmilJ have answered, is "given an integer m which we know exactly, how can we tell if m = n! for some n". The second is "given an integer m which we only know approximately - say to one or two significant figures - how can we tell if m is approxinately equal to n! for some n". Gandalf61 (talk) 12:26, 1 April 2010 (UTC)[reply]
In fact PST and Emil didn't answer the first question completely, as they both only specified a range of values for n. I think there are two comparably efficient ways to solve it:
  1. Find a range of values as in Emil's method.
  2. Compute m! efficiently.
  3. Multiply by successive numbers until you exceed M or the given factorial.
Or
  1. Find the logarithm of the input approximately (1 decimal place is enough).
  2. Find n numerically and round to the nearest integer.
  3. Compute n! efficiently and compare to the input.
-- Meni Rosenfeld (talk) 12:59, 1 April 2010 (UTC)[reply]
given a number N, known to be n! for some n, you can pin down the value of n to a small range by counting the number of zeros on the end of N Tinfoilcat (talk) 14:51, 1 April 2010 (UTC)[reply]

Big integral symbol in Latex[edit]

I know if I do $$\int $$ it will be the big symbol. But, it will also skip a line and center it. If I do $\int$, it leaves it on the left and doesn't skip a line but it's small. How can I get the big symbol and also leave it on the left without skipping a line. Thanks StatisticsMan (talk) 15:33, 1 April 2010 (UTC)[reply]

$\displaystyle\int$.—Emil J. 15:37, 1 April 2010 (UTC)[reply]
You can use \displaystyle \int , but it will not fit in well with running text because the symbol is too high. — Carl (CBM · talk) 15:38, 1 April 2010 (UTC)[reply]
Thanks, I think this works great. I'm just writing a quiz for a calc class so it's not in the middle of text. StatisticsMan (talk) 15:55, 1 April 2010 (UTC)[reply]

Givens Rotations and QR Factorisation[edit]

Hey Refdesk!

I'm a little confused by the concept of Givens rotations and was hoping someone could help elaborate a little bit with the following problem for me - if i could get some help understanding how to approach the problem it would be a really great help to me.

'Let A be an n x n matrix, and for i = 1, 2, ..., n let k(i) be the number of zero elements in the i-th row of A that come before all nonzero elements in this row and before the diagonal element . Show that the QR factorization of A can be calculated by using at most Givens rotations. Hence show that, if A is an upper triangular matrix except that there are nonzero elements in its first column, i.e. when , then its QR factorisation can be calculated using only 2n-3 Givens rotations: you should try finding the order of the first (n-2) rotations that brings your matrix to the form considered above.

Now the first part seems almost too obvious for me to be understanding it properly; I know that there always exists a Givens rotation to zero out any element we choose in A, and so essentially the problem comes down to making the matrix upper-triangular by removing all the non-zero elements below the diagonal; there are elements down there in total, and at least of those are zero, so at most non-zero elements below the diagonal, so then at most that many rotations, right? I'm not sure if perhaps the problem lies in showing that by zeroing out one element, we don't make a previously zeroed element nonzero (or is that not necessarily true?), or if I'm missing something else about the problem. I don't feel like I've actually done anything mathematical rather than simply heuristic so far with the problem, which does concern me.

For the second part, it seems logical that we want to use our Givens rotations to maximize the k(i) in each row, in order to minimize the overall sum - in which case presumably we want each of our n-1 nonzero elements below the diagonal to be immediately below the diagonal (as one of the elements in the column already is), so is it simply a case of shifting the other n-2 elements in the first column so they're below the diagonal by using some specific order of Givens rotations? In which case, I suspect the rotations I need to use are the ones which simply switch two rows (since we're left multiplying by the rotation matrices; the matrices I'm referring to are the ones corresponding to the elementary row operation of row-switching). My thoughts are to shift every row down one position, which effectively shifts our diagonal one place lower, except for the very top-row which is now empty except for the first and last elements; still, that doesn't really seem to solve my problem, because no matter what way I permute the rows, there will always be an element in the left-hand and right-hand column, as is the case for every row. If I could switch columns around, then I think this approach would work, but that would correspond to right-multiplication by the Givens rotation matrices, and I'm fairly sure that wouldn't give you a 'QR' factorisation - I'm very confused!

I'd hugely appreciate any light you could shed on the problem - I'm not a huge fan of numerical analysis and I just want to get this work done and get on to something like complex analysis, far more enjoyable! :) Thanks to all very much in advance, and I'll try and respond to anything said ASAP if I can get to a computer. Estrenostre (talk) 21:44, 1 April 2010 (UTC)[reply]

I could be wrong but I'd try shortening this to one paragraph, and save any background for later. People are usually not inclined to approach large blocks of text, though its clear you were trying to be thorough...206.53.157.194 (talk) 03:05, 4 April 2010 (UTC)[reply]
Sorry, I'll repost it soon more concisely, I have been chastised here previously for 'not showing any working'! :) Estrenostre (talk) 21:27, 4 April 2010 (UTC)[reply]