Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2007 April 14

From Wikipedia, the free encyclopedia
Mathematics desk
< April 13 << Mar | April | May >> April 15 >
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 14

[edit]

Synthetic division

[edit]

how in all of gods green goodness do you find the zeros of a polynomial function such as f(x)=x^4-5x^3+12 via synthetic division.

Well, the first step is to actually do the synthetic division. Can you do that part and show us what you get ? StuRat 05:50, 14 April 2007 (UTC)[reply]
I gave it a try, and it doesn't look like it works out very nicely, are you sure you've got the problem right ? StuRat 06:13, 14 April 2007 (UTC)[reply]
Rational root theorem suggests one root being a factor of 12. Test. None of these work. The polynomial has no rational solutions. You will have to use a method such as one described on Quartic equation. —The preceding unsigned comment was added by 203.49.240.43 (talk) 07:17, 14 April 2007 (UTC).[reply]
I find graphing to be the easiest way to solve such problems, but I suppose it's not allowed for your homework. StuRat 14:25, 14 April 2007 (UTC)[reply]
How is graphing going to get you an analytic solution? Unless you're expressly permitted numerical solutions, then there are several methods such as Newton's method to approximate roots.
I could get any precision answer you like using Gcalc 2, but of course, that's probably not allowed for your homework, as I said. StuRat 18:53, 15 April 2007 (UTC)[reply]

When you use synthetic division, what are the upper and lower bounds? Between which integers do the "signs change"? Also, be careful, because even if the signs don't change between integers, it might be because of 2 roots in that interval. And then, just test roots which fall in that interval. For instance if it was between 1 and 2, try sqrt(2), sqrt(3), cbrt(3), etc. Because the polynomial has integer coefficients, it's definitely not going to be something very nasty.--ĶĩřβȳŤįɱéØ 00:17, 17 April 2007 (UTC)[reply]

When I solved it graphically, the results seemed rather nasty to me. I suppose they might be the ratios of two square roots, or something like that, but nothing obvious. StuRat 02:18, 17 April 2007 (UTC)[reply]
I had fed this into Mathematica and got something completely awful, so there is either an error in the polynomial or the attack to solve the polynomial is wrong (which is why I suggested using a standard method in Quartic equation).

Logical equation reduction

[edit]

What math programs (like Mathcad) include a function to reduce logical equations to minimum form? How about a multiple state logical equation? Are there any distributed (like SETI) programs that reduce multiple state logical equations to minimum form? Nebraska Bob 07:33, 14 April 2007 (UTC)[reply]

Mathematica has LogicalReduce (or named similarly).
How many variables and states can it handle? —The preceding unsigned comment was added by Nebraska bob (talkcontribs) 10:33, 14 April 2007 (UTC).[reply]
It can simplify binary logical equations in arbitrary numbers of variables.
How can a commercial programs provided such limited capability and not be free? What other programs provide this capability and yet like the Wikipedia are free? Nebraska Bob 14:50, 15 April 2007 (UTC)[reply]
The theory of multistate logical equations is not exactly mainstream, so there is presumably no real reason to implement such functionality. Mathematica doesn't just do logical equation reduction either. —The preceding unsigned comment was added by 129.78.208.4 (talk) 22:51, 15 April 2007 (UTC).[reply]


If not multiple state logical equation reduction then what else might one term logical human thought? Nebraska Bob 07:05, 16 April 2007 (UTC)[reply]
You're complaining a computer can't model human thought? Uh, fine. —The preceding unsigned comment was added by 129.78.208.4 (talk) 03:03, 18 April 2007 (UTC).[reply]

Linear equation solvers

[edit]

Can methods like Gauss-Seidel, Jacobi method and Successive overrelaxation be used for any system of linear equations, or should the matrix A in Ax = b need to have some special properties for the method to be effective? If A is a dense matrix, what is the rate of convergence? What's the most effective way of solving a system with a dense A matrix? deeptrivia (talk) 18:50, 14 April 2007 (UTC)[reply]

average distance of a cube from its center

[edit]

I tried to find the average distance from the center of a cube to any point in it. I came up with and used but the equation quickly got out of hand. Is there a simpler way to do this? Is there a general equation for an n-dimensional hypercube? — Daniel 18:54, 14 April 2007 (UTC)[reply]

To figure out that integral, have you tried a change of variables to spherical coordinates?Pomte 19:14, 14 April 2007 (UTC)[reply]
Shouldn't the integrals run from -1 to 1? —The preceding unsigned comment was added by 84.187.1.61 (talk) 21:26, 14 April 2007 (UTC).[reply]
By logic alone: The average distance from the center of a cube with side length x is of the form c*x where c is a constant independent of x and between 0 and (3/4)^(1/2)=0.866... . I know that this is not really an answer, but may be it helps finding one. —The preceding unsigned comment was added by 84.187.1.61 (talk) 21:43, 14 April 2007 (UTC).[reply]
By symmetry, the original triple integral will give you the answer for a cube with sides of length 2; for sides of length a, multiply by a/2. Hint. For the area A(r) and the volume V(r) of a sphere we have the relationship A(r) = d/drV(r) – since the volume V(r+δ) − V(r) of the "shell" between to concentric spheres of slightly different radii is close to δA(r). A similar relationship holds between the average distance as a function of side length a from the centre of a cube to an arbitrary point on its surface, and the average distance to an interior point. The average distance for the surface is easier to find.  --LambiamTalk 22:56, 14 April 2007 (UTC)[reply]

You could approximate this using spheres. Take a sphere with the same volume as your cube (). A smaller sphere whose radius is the average magnitude of points within this larger sphere should have exactly half the volume (edit: not true). Then the problem reduced to finding this radius (), which could easily be extended to any number of dimensions. My question here though is how accurate would this be? What's the difference between the integral of magnitudes of points in the cube to the points in the same-volume sphere? I think the difference is probably small (but to prove this I would probably have to do that integral you're trying to avoid). - Rainwarrior 23:01, 14 April 2007 (UTC)[reply]

Actually, nevermind that. I don't think finding the average magnitude for even a sphere is that simple. - Rainwarrior 01:05, 15 April 2007 (UTC)[reply]

I think would also work, but it doesn't look any easier. I tried to brute force it, but all I got was 0.640 before the digits changed with every change in accuracy. That's if I did it correctly. The first time I got about 0.95. 0.640 was when I integrated once, so I only needed a two-dimensional grid. — Daniel 00:36, 15 April 2007 (UTC)[reply]

Using a computer to find the average by means of random sampling an n-dimensional cube where all components are in the range -0.5 to 0.5, I got (using 100 million samples, it might be accurate to about 5 decimal places?):
  • 1: 0.2500092
  • 2: 0.3826095
  • 3: 0.4802699
  • 4: 0.5609436
- Rainwarrior 01:05, 15 April 2007 (UTC)[reply]
Long live the Monte Carlo method.. However, if you want analytical bounds on the solution, you can just find the radii of the two hyperspheres that will respectively enclose and be enclosed by the hypercube. It should be trivial to find the average distance for points inside a hypersphere. deeptrivia (talk) 01:48, 15 April 2007 (UTC)[reply]
Thinking back on my earlier attempt to use a sphere with the same area, I think the average magnitude of all points in the sphere should be the integral of each radius times its surface area: for a sphere with radius m, and using this on the sphere with area of 1, I got: which is at least close to my Monte Carlo answer. Not as close as I'd hoped though. Taking your idea of an inner and outer bound, for the inner I get , and outer , which is a pretty big range, I'd say. Their average is about 0.491 which is actually better than my same-area approxmation, but not by much. - Rainwarrior 05:48, 15 April 2007 (UTC)[reply]

(outdent) Spoiler alert This site claims to have an answer, while not saying how to get it. It does agree reasonably with Rainwarrier's MC calculations. But since there is an analytical solution quote there, there must be some way to get it. Baccyak4H (Yak!) 02:16, 15 April 2007 (UTC)[reply]

I think they just buckled down and did the integral (though with Mathematica at your disposal, that might not be hard to do). It's pretty interesting that there's actually a closed-form solution, and it's not at all trivial. You can't look at that and go "oh yeah, that makes sense" (or at least, I can't). - Rainwarrior 05:59, 15 April 2007 (UTC)[reply]
Someone who has a current version of Mathematica (I believe that's 5.2) may want to ask it to perform the integral in question. The answer I get does not agree with that given on the Wolfram MathWorld page! (The surface distance does agree.) --KSmrqT 10:24, 16 April 2007 (UTC)[reply]
Assume a unit cube, axes-aligned and centred on the origin. Take a pyramid whose apex is the origin and whose base is one face, say the one with z = 1/2. The cube can be decomposed into 6 such pyramids. For reasons of symmetry, the average distance (a.d.) of an interior point of the pyramid to its apex is the same as the a.d. from an arbitrary interior point of the cube to its centre. The former can be defined as the result of dividing the volume integral of the distance point-to-apex by the volume of the pyramid, which is 1/6. The volume integral can be calculated as
By the substitution (x, y) := (2zx, 2zy), the double integral can be rewritten as
where σ, the value of the last double integral, is the a.d. from a point on the face of a unit cube to its centre. So the value of the whole volume integral equals
Dividing this by 1/6 now gives the a.d. from an interior point to the apex for the pyramid, which is the saem as the a.d. to the centre of the cube: 3/4σ. This ratio 3 : 4 agrees with the formulas and values at the MathWorld page – although, the way things are presented, this is less than obvious.  --LambiamTalk 14:40, 16 April 2007 (UTC)[reply]
I could reproduce about half of the MathWorld answer verbatim. The parts that differed however were numerically equivalent. Specifically, Log[3650401+2107560*Sqrt[3]]/48 in my answer is numerically equivalent to Log[1+Sqrt[3]]/2-Log[2]/4 in MathWorld (writing "ln" as "Log"). Some extended field factorization could probably prove they are indeed equal. Baccyak4H (Yak!) 14:57, 16 April 2007 (UTC)[reply]
(1+√3)2 = 4+2√3 = 2(2+√3), so log(1+√3)/2 = log(2(2+√3))/4 = log(2+√3)/4 + log(2)/4. Then log(1+√3)/2 − log(2)/4 = log(2+√3)/4 = log((2+√3)12)/48. A tedious but straightforward calculation gives us that (2+√3)12 = 3650401+2107560√3.  --LambiamTalk 15:28, 16 April 2007 (UTC)[reply]
I asked Mathematica 5.1 for (exactly the MathWorld formula) and got . That may count as a homework answer, but anyone who can sort out the various incompatible answers here probably deserves the credit anyway. --Tardis 16:03, 16 April 2007 (UTC)[reply]

Wow. Major kudos to everyone who contributed to answering this question. --ĶĩřβȳŤįɱéØ 00:11, 17 April 2007 (UTC)[reply]