[math-fun] integrate(x^p floor(x)^q,x)
Maple and Macsyma incorrectly give x floor x for integrate(floor(x),x). (Integrals are continuous.) Mma abstains. The answer is ceiling(x) floor(x) + 1 (x - ----------) (ceiling(x) - 1) = floor(x) (x - ------------), 2 2 (products of discontinuous functions). More generally, one can find (e.g., by undetermined coefficients) a polynomial(floor x) of degree p+q which, when added to x^p floor(x)^q, renders the sum continuous. E.g., / 4 4 8 7 [ 3 4 x floor (x) floor (x) 2 floor (x) I x floor (x) dx = ------------ - --------- - ----------- ] 4 8 7 / 5 3 3 floor (x) floor (x) 23 floor(x) + ----------- - --------- + -----------. 10 6 840 How does one seek in EIS a two-parameter family of polynomials with rational coefficents (presumably named Smarandache)? --rwg UNDERAGES UNGREASED DUNGAREES
When I participated in Maple beta program, I submitted this bug. It was a heated discussion there about it, and I was told by Maple developers that in Maple indefinite integrals are defined up to "a piecewise constant", i.e. integrals of continuous functions can be discontinuous. The bug was classified as "works as designed". A workaround for that (in Maple) is to use definite integral from 0 to x instead of indefinite integral. That also doesn't always work (sometimes it returns unevaluated), but as far as I recall, that gives the correct answer in this example. Alec Mihailovs http://mihailovs.com/Alec/ ----- Original Message ----- From: "R. William Gosper" <rwg@osots.com> To: <math-fun@mailman.xmission.com> Sent: Saturday, November 25, 2006 12:14 PM Subject: [math-fun] integrate(x^p floor(x)^q,x)
Maple and Macsyma incorrectly give x floor x for integrate(floor(x),x). (Integrals are continuous.) Mma abstains. The answer is
ceiling(x) floor(x) + 1 (x - ----------) (ceiling(x) - 1) = floor(x) (x - ------------), 2 2
(products of discontinuous functions). More generally, one can find (e.g., by undetermined coefficients) a polynomial(floor x) of degree p+q which, when added to x^p floor(x)^q, renders the sum continuous. E.g.,
/ 4 4 8 7 [ 3 4 x floor (x) floor (x) 2 floor (x) I x floor (x) dx = ------------ - --------- - ----------- ] 4 8 7 /
5 3 3 floor (x) floor (x) 23 floor(x) + ----------- - --------- + -----------. 10 6 840
How does one seek in EIS a two-parameter family of polynomials with rational coefficents (presumably named Smarandache)? --rwg UNDERAGES UNGREASED DUNGAREES
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
----- Original Message ----- From: "Alec Mihailovs" <alec@mihailovs.com> To: "math-fun" <math-fun@mailman.xmission.com> Sent: Sunday, November 26, 2006 00:53 Subject: Re: [math-fun] integrate(x^p floor(x)^q,x)
When I participated in Maple beta program, I submitted this bug. It was a heated discussion there about it, and I was told by Maple developers that in Maple indefinite integrals are defined up to "a piecewise constant", i.e. integrals of continuous functions can be discontinuous. The bug was classified as "works as designed".
The Wolframites seem to have the same philosophy. But I'd love to see a student arguing for full credit on a test if he'd given, say, | x^2 - 3 if x < 0 | | x^2 if x > 0 as an antiderivative for 2*x. Note that I intentionally left the antiderivative undefined at x = 0. When Mathematica gives antiderivatives with needless discontinuities, the antiderivative will often also be undefined there. (I presume that Maple behaves similarly.) Although not desirable, such behavior seems more natural in some sense when the integrand itself is discontinuous, like floor. But consider the continuous function 1/(2 + cos(x)), say. Mathematica's antiderivative for that is 2/Sqrt[3]*ArcTan[Tan[x/2]/Sqrt[3]] which has needless discontinuities at odd multiples of Pi. Although messier, I much prefer the continuous antiderivative given by Derive: (x - 2 atan(sin(x)/(2 + sqrt(3) + cos(x))))/sqrt(3). David Cantrell
A workaround for that (in Maple) is to use definite integral from 0 to x instead of indefinite integral. That also doesn't always work (sometimes it returns unevaluated), but as far as I recall, that gives the correct answer in this example.
Alec Mihailovs http://mihailovs.com/Alec/
----- Original Message ----- From: "R. William Gosper" <rwg@osots.com> To: <math-fun@mailman.xmission.com> Sent: Saturday, November 25, 2006 18:14 Subject: [math-fun] integrate(x^p floor(x)^q,x)
Maple and Macsyma incorrectly give x floor x for integrate(floor(x),x). (Integrals are continuous.) Mma abstains.
True. But the Wolfram Functions site gives, in essence, the result below as the second formula at <http://functions.wolfram.com/IntegerFunctions/Floor/21/02/01/>.
The answer is
ceiling(x) floor(x) + 1 (x - ----------) (ceiling(x) - 1) = floor(x) (x - ------------), 2 2
(products of discontinuous functions). More generally, one can find (e.g., by undetermined coefficients) a polynomial(floor x) of degree p+q which, when added to x^p floor(x)^q, renders the sum continuous. E.g.,
/ 4 4 8 7 [ 3 4 x floor (x) floor (x) 2 floor (x) I x floor (x) dx = ------------ - --------- - ----------- ] 4 8 7 /
5 3 3 floor (x) floor (x) 23 floor(x) + ----------- - --------- + -----------. 10 6 840
The CAS Derive is particularly adept at finding such antiderivatives. For example, it gives the result above very quickly. David
In my latest large update (http://www.mathpuzzle.com/ ), I give a problem based on ambiguously placed cities. You are given straight line distances between cities A, B, C, and D. Can you make a map of where the 4 cities are, in relation to each other? D C B A | 3.10 7 5 B | 5.44 3 C | 6 I show a diagram at my site, along with 16 other recreational math items that have come to my attention. Ed Pegg Jr http://www.mathpuzzle.com/
I simply could not understand the point of this puzzle, as it stands. The "cities" should be at the vertices of a quadrilateral, of course --- what else is a solver supposed to deduce? The distances given are presumably (very) approximate --- if they were exact, the landscape would have to occupy hyperbolic space. [The enclosed "tetrahedron" --- which should be flat --- actually has imaginary volume approximately \iota.] If you're setting a puzzle based on this idea, why not put some work in and base it on a matrix of exact integer distances in the Euclidean plane? A candidate with small lengths, which avoids any simple parallelograms, would be 8 4 4 6 7 8 Perhaps the final distance might be omitted, and the solver challenged to find it. [Some side condition would be needed to exclude the other, shorter, possible solution.] Even then, elementary dexterity with a pair of compasses would in practice reveal the answer in a few seconds! Fred Lunnon On 11/26/06, Ed Pegg Jr <ed@mathpuzzle.com> wrote:
In my latest large update (http://www.mathpuzzle.com/ ), I give a problem based on ambiguously placed cities. You are given straight line distances between cities A, B, C, and D. Can you make a map of where the 4 cities are, in relation to each other?
D C B A | 3.10 7 5 B | 5.44 3 C | 6
I show a diagram at my site, along with 16 other recreational math items that have come to my attention.
Ed Pegg Jr http://www.mathpuzzle.com/
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Refering to http://www.mathpuzzle.com/AmbiguousTowns.gif I made a mistake, which I didn't realize until after posting. Now that I understand the problem better, let me try rephrasing it. Actually, there are two different problems, one asked by Stan Wagon, Between four towns are roads of length 3, 5, 6, 7, ~3.10, ~5.44 . There are two distinct town configurations. (See picture in link) Q1. Are there 6 integer road lengths that lead to distinct town configurations? Q2. Are there 10 road lengths that lead to distinct town configurations? Ed Pegg Jr Fred lunnon <fred.lunnon@gmail.com> wrote: I simply could not understand the point of this puzzle, as it stands. The "cities" should be at the vertices of a quadrilateral, of course --- what else is a solver supposed to deduce? The distances given are presumably (very) approximate --- if they were exact, the landscape would have to occupy hyperbolic space. [The enclosed "tetrahedron" --- which should be flat --- actually has imaginary volume approximately \iota.] If you're setting a puzzle based on this idea, why not put some work in and base it on a matrix of exact integer distances in the Euclidean plane? A candidate with small lengths, which avoids any simple parallelograms, would be 8 4 4 6 7 8 Perhaps the final distance might be omitted, and the solver challenged to find it. [Some side condition would be needed to exclude the other, shorter, possible solution.] Even then, elementary dexterity with a pair of compasses would in practice reveal the answer in a few seconds! Fred Lunnon On 11/26/06, Ed Pegg Jr wrote:
In my latest large update (http://www.mathpuzzle.com/ ), I give a problem based on ambiguously placed cities. You are given straight line distances between cities A, B, C, and D. Can you make a map of where the 4 cities are, in relation to each other?
D C B A | 3.10 7 5 B | 5.44 3 C | 6
I show a diagram at my site, along with 16 other recreational math items that have come to my attention.
Ed Pegg Jr http://www.mathpuzzle.com/
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
On 11/26/06, Ed Pegg Jr <ed@mathpuzzle.com> wrote:
Refering to http://www.mathpuzzle.com/AmbiguousTowns.gif
I made a mistake, which I didn't realize until after posting. Now that I understand the problem better, let me try rephrasing it. Actually, there are two different problems, one asked by Stan Wagon,
Between four towns are roads of length 3, 5, 6, 7, ~3.10, ~5.44 . There are two distinct town configurations. (See picture in link)
Q1. Are there 6 integer road lengths that lead to distinct town configurations?
Q2. Are there 10 road lengths that lead to distinct town configurations?
Ed Pegg Jr
I interpret problem Q1 as: Find an arrangement of 4 distinct points in the plane such that the 6 pairwise distances are distinct positive integers and such that by moving one point to a new location in the plane a new arrangement of 4 points results, not congruent to the first (by rotation or reflection), but with the same set of pairwise distances. I interpret problem Q2 as the same, except you start with 5 points. If this is the problem, then it is more a number theory problem than a geometry problem, because of the requirement of all distances to be integers. I tried the interesting construction of Bill Thurston (elsewhere in this thread) hoping to specialize it to Q1 and then force distances to be integers, but I always ended up with two equal distances. Perhaps I misunderstood something. So I abandoned that and tried my own path. The best I could do for Q1 was 4 of the 6 distances integers and the remaining two square roots of integers. Did anyone do better? Since, the planar arrangement is a tetrahedron with volume zero one might look for similar problems in 3-d. Here one finds that the volume of the 3-d tetrahedron is not uniquely determined by its edges. In fact there are as many as 30 different tetrahedra, with 30 different volumes and the same set of edges. The edges 7,8,9,10,11,12 give an example of this. Now find an integer example with two tetrahedra of volume zero :-). Jim Buddenhagen
participants (6)
-
Alec Mihailovs -
David W. Cantrell -
Ed Pegg Jr -
Fred lunnon -
James Buddenhagen -
R. William Gosper