Wikipedia:Reference desk/Archives/Mathematics/2007 June 16

From Wikipedia, the free encyclopedia
Mathematics desk
< June 15 << May | June | Jul >> June 17 >
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.


June 16[edit]

Integral of the square root of tan(x)[edit]

We found a question in our maths text book asking us to find the integral of the square root of tan(x). Neither our teacher nor anybody in the class has been able to work it out. Can somebody give us some help? thanks! D3av 11:45, 16 June 2007 (UTC)[reply]

Unless I'm missing something, put u=tanx and it'll come straight out.81.159.77.229 12:29, 16 June 2007 (UTC)[reply]
I don't know the answer but I am sure it is more more complex than that, as I have heard this problem discussed before. Algebra man 13:02, 16 June 2007 (UTC)[reply]

ummm.. this integral is very complicated and a simple subtitution of u = tanx does not do the job..

my advice is to put = u2 = tan(x), and it will reduce to:

=
=
=

now determine A, B, C and D ... then once you've done that, apply partial fractions again ... and you should get a function with some inverse tangents and natural logs.. if anybody wants to take it up from there or suggest a simpler method go for it..

or use the decomposition
in which is a primitive 8th root of unity. If you make use of the properties of roots of unity, this should make the tedious exercise slightly less messy. Or you could cheat, and ask Mathematica.[1] It's always a good idea to check the answer, which I haven't done.  --LambiamTalk 14:47, 16 June 2007 (UTC)[reply]
Nasty result, not mine (can be found in Mathematics Today Vol. 41, No. 3, June 2005, Eric Watson CMath FIMA):
x42bn6 Talk Mess 15:35, 16 June 2007 (UTC)[reply]
Think that's nasty? Ha! We can directly ask Mathematica for a solution at The Integrator, where we get an answer with a more imposing appearance.
Following Lambiam's wise advice, we can try algebraic manipulations to prove equality. That fails, and numerical tests confirm the answers are different. So is Mathematica wrong? No! Both results are antiderivatives of the square root of the tangent of x; they differ by the constant (1+i)π/(2√2). Most likely Mathematica converts the integrand to
so that it can apply advanced methods going back to Liouville. The transformation is clever and effective, but introduces complex numbers into a purely real calculation. --KSmrqT 20:19, 16 June 2007 (UTC)[reply]
Nasty as in I wonder what motivated such a manipulation in the first place. x42bn6 Talk Mess 21:21, 16 June 2007 (UTC)[reply]

wow! thanks so much everyone. We got to the partial fraction point above and then just stopped because we knew it'd be a lot of work to do the partial fractions a few times and we weren't sure if we'd get a result. thanks! D3av 09:11, 17 June 2007 (UTC)[reply]

Can you find out if a list of numbers is random[edit]

What I mean is: I know that if you roll a die say, 300 times, and you count the number of times each number shows on top, then you can use a chi^2 test to see if the die is fair. But is there a way or a test to tell the difference between a computer outputting 50 1's then 50 2's then 50 3's and so on until 50 6's and then back to 1's again from a fair die?--71.175.128.187 16:15, 16 June 2007 (UTC)[reply]

There are several tests for statistical randomness, almost all of which would reject this sequence with long runs of the same value. No practical test, however, can distinguish with certainty between true randomness and good pseudorandomness.  --LambiamTalk 17:43, 16 June 2007 (UTC)[reply]
Or even bad pseudorandomness. —Bromskloss 20:17, 16 June 2007 (UTC)[reply]
Three points: (1) Certainty, no; confidence, yes. (2) Genuine random sequences includes long runs that make humans uncomfortable; "made up" sequences don't have enough long runs! (3) Practical applications like Monte Carlo integration suffer from runs, so use a different measure called discrepancy. --KSmrqT 20:27, 16 June 2007 (UTC)[reply]
You might want to check out the program ENT - a Pseudorandom Number Sequence Test Program, written by John Walker. It runs several tests on sequences of bytes, and is useful for evaluating pseudorandom number generators. --NorwegianBlue talk 08:26, 17 June 2007 (UTC)[reply]
The Diehard tests are a well-known standard, but see also cryptographically secure pseudorandom number generator. --KSmrqT 19:20, 17 June 2007 (UTC)[reply]
Well, of course a sequence of random numbers would, somewhere, contain the sequence 50 1's then 50 2's then 50 3's and so on until 50 6's and then back to 1's again. In fact, it would contain it infinitely many times. Or any other sequence however odd or long or short you may desire. So, the best you can do is come up with the odds, which is where statistics comes in. This would fall under the heading of nonparametric stats, which I like because it's smaller and more limited. There are several ways to analyze this kind of thing, that look at whether the next number goes up or down randomly enough; for instance your sequence 'same, same, same, same, up, same, same, same, same, up, same, same, same, same, up' etc. would immediately show up, but so would something like 'up, down, up, down, up, down' etc. They are named rank test, run test, etc. There's so much financial benefit in being able to determine whether something is going wrong in an industrial process or not, that it's all been studied very closely. Gzuckier 19:04, 20 June 2007 (UTC)[reply]