Wikipedia:Reference desk/Archives/Mathematics/2014 September 8

= September 8 =

Does the Witch of Agnesi really have a well-defined centroid?
Although the first moment with respect to y is well defined, the one with respect to x is not (where R is the entire region between the x-axis and the curve):

$$M_y = \iint_R y dy dx = \int_{-\infty}^{+\infty}\int_0^{\frac{8a^3}{x^2+4a^2}} y dy dx = \int_{-\infty}^{+\infty} \frac{1}{2} y^2 \vert_0^{\frac{8a^3}{x^2+4a^2}} dx = \int_{-\infty}^{+\infty} \frac{(8a^3)^2}{2(x^2+4a^2)^2} dx = 2a^3(\frac{2ax}{4a^2+x^2}+\arctan\frac{x}{2a})\vert_{-\infty}^{+\infty} = 2\pi a^3$$

$$M_x = \iint_R x dy dx = \int_{-\infty}^{+\infty} \int_0^{\frac{8a^3}{x^2+4a^2}} x dy dx = \int_{-\infty}^{+\infty} \frac{8a^3x}{x^2+4a^2} dx = 4a^3\ln{(x^2+4a^2)}\vert_{-\infty}^{+\infty} = \text{undefined}$$

Reversing the order of integration does not help either, since $$\int_0^{2a} \int_{-\sqrt{\frac{8a^3}{y} - 4a^2}}^{+\sqrt{\frac{8a^3}{y} - 4a^2}} x dx dy $$ also is ill-defined.

Why then does the article say that the centroid's x coordinate is located at x=0? This is the Cauchy principal value of the improper integral but I feel like it should be better-defined than this.--Jasper Deng (talk) 00:24, 8 September 2014 (UTC)
 * Your reasoning looks correct. Is there any objection to deleting the statement? --RDBury (talk) 16:16, 8 September 2014 (UTC)
 * Why can't you just apply symmetry? As the curve is symmetrical about x=0, the centroid must lie on x=0. --Salix alba (talk): 17:04, 8 September 2014 (UTC)
 * Well, if there is a centroid, then the symmetry argument is fine. The question is whether there is one, given that the integral defining the moment apparently does not converge. --Trovatore (talk) 17:15, 8 September 2014 (UTC)
 * Symmetry basically is the Cauchy principle value of the moment. It's basically the same reason why the Cauchy distribution has ill-defined moments (the integrals are almost exactly the same).
 * The centroid article says that the centroid is the arithmetic mean of all the coordinates in R, but that mean is ill-defined unless we take it to be the Cauchy principle value.--Jasper Deng (talk) 17:49, 8 September 2014 (UTC)


 * What's wrong with using the Cauchy principal value? This is how integrals like this are evaluated and the symmetry argument Salix alba mentioned makes the zero x component an elegant derivation. --Mark viking (talk) 18:09, 8 September 2014 (UTC)
 * (ec) Well, what's wrong with the Cauchy p.v. in general is that it's generally not as well-behaved as convergent integrals are. If the value of an integral is fully well-defined, then you should be able to chop it up however you like and still get the same answer &mdash; for example, evaluate integral on the positive x-values first, and then the negative, or from positive n2 to positive (n+1)2 followed by the integral from &minus;n&minus;1 to &minus;n, and then continue through all n, or any other such scheme.  If all you have is a Cauchy p.v., you can't do that.
 * Cauchy p.v.'s are closely analogous to conditionally convergent series, which is a very second-class sort of convergence.
 * As to whether these considerations should bar us from using the Cauchy p.v. in the specific context of the centroid, that's another question. Conceptually, the idea of the centroid does seem to jibe fairly well with the Cauchy-p.v. technique of expanding the domain of integration out in all directions at the same "speed". --Trovatore (talk) 19:27, 8 September 2014 (UTC)


 * The definition of a centroid in the article is rather weak, but I take it to mean a well-defined arithmetic mean, which I take as requiring a well-behaved integral rather than just the Cauchy principal value. Also, one would expect to be able to compute the centroid using the centroids of subregions of R of whatever partitioning scheme. Here it obviously does depend on how we divide R.--Jasper Deng (talk) 19:25, 8 September 2014 (UTC)
 * Related is the fact that the Cauchy distribution lacks a well-defined mean. Sławomir Biały  (talk) 18:15, 8 September 2014 (UTC)

(One note: Those with sharp eyes might notice that the second order of integration appears to actually come out to 0. But I still consider the double integral itself is ill-defined, since rather obviously Fubini's theorem does not give consistent results, and the second order of integration is not equal to $$\int_0^{2a} \int_{-\sqrt{\frac{8a^3}{y} - 4a^2}}^{c} x dx dy + \int_0^{2a} \int_{c}^{+\sqrt{\frac{8a^3}{y} - 4a^2}} x dx dy$$ for any real number c, since both integrals diverge).--Jasper Deng (talk) 19:25, 8 September 2014 (UTC)


 * I agree removing the bit about the centroid is best. It is simply not defined for the shape. There's nothing wrong with that - it is infinite in length and infinity is where things happen in maths that don't in the real world. Dmcq (talk) 21:23, 8 September 2014 (UTC)


 * I agree that it should be removed. However, it is somewhat of a puzzle that there is an obvious "correct" answer, despite a lack of compelling formalism leading to it.  What makes the Cauchy principal value the "right" thing to compute?  (Symmetry is a red herring I think, since we can perturb the distribution just a little to break the symmetry.)   Sławomir Biały  (talk) 22:49, 8 September 2014 (UTC)
 * The Cauchy p.v. is what you get when you expand the domain of integration out "isotropically", without favoring one direction over another. Centroids intuitively seem to be that sort of thing. --Trovatore (talk) 22:57, 8 September 2014 (UTC)
 * Hmm... interesting. I was thinking that it wasn't translationally invariant, but I was wrong in that thought.  That does make the p.v. look rather canonical here.   Sławomir Biały  (talk) 17:00, 9 September 2014 (UTC)

(sorry for the mass ping) Do any of you think it would be a good idea to replace the statement about the centroid with a sentence pointing to the Cauchy distribution article's section on undefined moments? I think that would be best for our readers.--Jasper Deng (talk) 16:52, 9 September 2014 (UTC)
 * Sounds fine to me. Dmcq (talk) 16:57, 9 September 2014 (UTC)
 * No objection here.  Sławomir Biały  (talk) 17:00, 9 September 2014 (UTC)
 * Ideally I'd like to see a citation. I had a very brief look for suitable citation and I didn't find anything discussing the centroid of the Witch of Agnesi. The Cauchy distribution moments section is also lacking citation so everything counts as OR at the moment. --Salix alba (talk): 17:27, 9 September 2014 (UTC)
 * Sounds good to me. I agree a citation would be good, too. --Mark viking (talk) 17:54, 9 September 2014 (UTC)

I've gone ahead with some changes based on a source I found. Unfortunately the source doesn't discuss how to consider it in terms of Lebesgue integration, which I don't have much of an idea of how to do, but at least it's a source, as wanted.--Jasper Deng (talk) 19:50, 12 September 2014 (UTC)

Greatest common divisor
Greatest common divisor discusses the gcd of two numbers. Some articles (eg Achilles number) refer to the gcd of a list of numbers ( gcd(a,b,c,d) etc). What is the definition of gcd for several numbers, and what is the best way to determine it? -- SGBailey (talk) 08:53, 8 September 2014 (UTC)
 * The natural numbers (including 0) form a lattice under the order of divisibility. (Note:  every natural number divides 0, including 0.  You should be aware that there are different conventions, but any other convention is, frankly, stupid.)
 * So the gcd of any finite set of integers is simply its infimum in this lattice. (I think you could do infinite sets too but I don't want to bother to check ATM.)
 * The best algorithm is probably Euclid's algorithm, iterated, but if someone comes up with a better one, I won't be too shocked. --Trovatore (talk) 09:25, 8 September 2014 (UTC)


 * Greatest common divisor starts: "In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), highest common factor (hcf), or greatest common measure (gcm), of two or more integers (at least one of which is not zero), is the largest positive integer that divides the numbers without a remainder."
 * Note it said "or more" so the gcd has to divide each number. For example, gcd(12, 20, 30) = 2. gcd(12, 20) = 4, gcd(12, 30) = 6, gcd(20, 30) = 10, but none of those divide the third number. Greatest common divisor says: "The gcd of three numbers can be computed as gcd(a, b, c) = gcd(gcd(a, b), c), or in some different way by applying commutativity and associativity. This can be extended to any number of numbers." PrimeHunter (talk) 10:20, 8 September 2014 (UTC)
 * The "not zero" bit is unnecessary &mdash; gcd(0,0)=0. In fact gcd(0,n)=n for every n, including 0.  As I said, there are other conventions, but none that aren't stupid.
 * The only thing is, "greatest" needs to be understood in the order of divisibility, not the usual order. Zero is the greatest element as measured by divisibility. --Trovatore (talk) 10:36, 8 September 2014 (UTC)


 * @PH - Thanks, I'd missed that line. -- SGBailey (talk) 10:37, 8 September 2014 (UTC)
 * It's incorrect and needs to be changed. --Trovatore (talk) 10:40, 8 September 2014 (UTC)
 * What's written is not incorrect. It is true that the greatest common divisor of two or more integers, at least one of which is not zero, is the largest positive integer that divides them.  This may not be complete as a definition, but it is not a false statement.  Although in principle I agree that the arithmetic partial order on the integers is the relevant ordering rather than the standard one, I think that bringing this up in the lead of that article is likely to confuse most of the readers of the article (which may include school children, for instance).  A proper "Definition" section in which to discuss such nuances seems to be lacking.   Sławomir Biały  (talk) 12:47, 8 September 2014 (UTC)
 * You're right about the statement being literally true, of course.  --Trovatore (talk) 17:14, 8 September 2014 (UTC)

The Lenstra–Lenstra–Lovász lattice basis reduction algorithm can be interpreted as a generalization of Euclid's algorithm, although it then won't output a GCD, rather it is the analogue of using Euclid's algorithm to do rational reconstruction. Count Iblis (talk) 16:26, 10 September 2014 (UTC)