Re: question on determining algebraic numbers for rotations in 2d with rational cosines.
Michael Day <[email protected]> Tue, 5 Aug 2025 18:24:17 +0100
| Newsgroups | gmane.comp.mathematics.pari.user |
|---|---|
| Message-ID | <[email protected]> |
"American Citizen" posted a query a week or two ago, copied below. I expect this has been obvious to most Pari users, but in case not, here's my take. It's easier to just consider rotation of a point with rational coordinates about the origin, [0,0] Let the starting point be rational [x,y], ie [-1/6,-1/10] = [1/3,2/5] - [1/2,1/2] and let the rotation angle be cos^-1 rational r. Let s be its sine, usually irrational, and let r2 = r^2, s2 = s^2 = 1 - r2, since sin^2 + cos^2 = 1 Just dealing for now with x1, the x-value of the rotated point, we have x1 = x * r - y * s and so its square is x1^2 = x^2 * r2 - 2*x*y*r*s + y^2 * s2 The middle term is likely to be irrational, so we remove it as follows: x1^2 - 2 * x1 * r * x = - x^2 * r2 + y^2 * s2 yielding this quadratic in x1: x1^2 - 2 * x1 * r * x + x^2 * r2 - y^2 * s2 = 0 Choosing the example from below for arccos 1/4, American Citizen reports these 2 quartics: 1/4 | 34*x^4 - 52*x^3 - 4*x^2 - 29*x + 23)) [1] | 68*x^4 - 28*x^3 + 27*x^2 - 11*x + 1)) [2] my x1-equation becomes 1440 * x1^2 + 120 * x1 - 11 = 0 (17:54) gp > polroots(1440*x^2 +120 * x - 11) %56 = [-0.138491 + 0.E-19*I, 0.0551579 + 0.E-19*I]~ Restoring to the original origin by adding 1/2, the second root becomes ~ 0.555158, consistent with American Citizen's quartic root: (17:54) gp > polroots(34*x^4 - 52*x^3 - 4*x^2 - 29*x + 23)[1] %57 = 0.555158 + 0.E-19*I I don't see why he needs quartics in some cases since the above procedure for removing the irrational term is generally applicable provided the coordinates and the cosine are rational; I don't think rotation about a point offset from the origin should demand 4th powers - but I haven't tried that slightly more complicated problem directly! Thanks, Mike On 30/07/2025 03:01, American Citizen wrote: > I forgot to mention the all important root, it is given as [1] or [2], > etc. as the nth root of the polroots() command > > They are all given on the row for the particular rational cosine. > > On 7/29/25 18:59, American Citizen wrote: >> Suppose we place a point on the x-y plane in the Cartesian 2d system. >> We then rotate this point counterclockwise in such a way that the >> rotation angle cosine is rational. (the sine may or may not be >> rational). >> >> My question is specifically, how do we predict these 4 degree >> equations and their coefficients, depending upon the rational cosines? >> >> Original Point [1/3, 2/5] >> Center = [1/2, 1/2] >> acos(angle) >> point is rotated ccw on the x-y plane. >> ---------------------------------------------------------------- >> acos x-coordinate y-coordinate >> ---------------------------------------------------------------- >> 1/2 | 1800*x^2 - 1500*x + 299 [2] | 600*x^2 - 540*x + 109 [1] >> 1/3 | 72*x^4 - 6*x^3 + 33*x^2 - 44*x + 9)) [2] | 32*x^4 + 53*x^3 - >> 56*x^2 - 21*x + 10)) [3] >> 2/3 | 405*x^2 - 315*x + 59 [2] | 2025*x^2 - 1755*x + 349 [1] >> 1/4 | 34*x^4 - 52*x^3 - 4*x^2 - 29*x + 23)) [1] | 68*x^4 - 28*x^3 + >> 27*x^2 - 11*x + 1)) [2] >> 3/4 | 800*x^2 - 600*x + 109 [2] | 7200*x^2 - 6120*x + 1213 [1] >> 1/5 | 31*x^4 - 54*x^3 - 37*x^2 - 33*x + 37)) [1] | 46*x^4 + 29*x^3 + >> 4*x^2 - 53*x + 15)) [2] >> 2/5 | 61*x^4 - 46*x^3 - 4*x^2 + 25*x - 10)) [2] | 31*x^4 - 27*x^3 + >> 42*x^2 - 8*x - 1)) [2] >> 3/5 | [12/25, 23/75] | 25*x - 12 | 75*x - 23 >> 4/5 | [32/75, 8/25] | 75*x - 32 | 25*x - 8 >> 1/6 | 15*x^4 + 49*x^3 + 7*x^2 - 21*x - 1)) [4] | 3*x^4 - 28*x^3 + >> 51*x^2 - 48*x + 11)) [1] >> 5/6 | 16200*x^2 - 11700*x + 2063 [2] | 648*x^2 - 540*x + 107 [1] >> 1/7 | 48*x^4 + 9*x^3 - 63*x^2 + 5*x + 11)) [3] | 8*x^4 + 38*x^3 + >> 84*x^2 + 25*x - 18)) [2] >> 2/7 | 29*x^4 + 21*x^3 - 8*x^2 - 14*x + 4)) [2] | 48*x^4 + 24*x^3 - >> 29*x^2 + 63*x - 18)) [2] >> 3/7 | 245*x^2 - 210*x + 43 [2] | 11025*x^2 - 10080*x + 2054 [1] >> 4/7 | 11025*x^2 - 8925*x + 1732 [2] | 3675*x^2 - 3255*x + 652 [1] >> 5/7 | 11025*x^2 - 8400*x + 1546 [2] | 147*x^2 - 126*x + 25 [1] >> 6/7 | 1225*x^2 - 875*x + 153 [2] | 11025*x^2 - 9135*x + 1811 [1] >> 1/8 | 12*x^4 + 9*x^3 + 76*x^2 - 32*x - 10)) [2] | 21*x^4 + 42*x^3 - >> 4*x^2 + 49*x - 17)) [2] >> 3/8 | 640*x^2 - 560*x + 117 [2] | 28800*x^2 - 26640*x + 5473 [1] >> 5/8 | 28800*x^2 - 22800*x + 4337 [2] | 384*x^2 - 336*x + 67 [1] >> 7/8 | 55*x^4 + 30*x^3 + 19*x^2 + 46*x - 25 [2] | 25*x^4 - 71*x^3 + >> 28*x - 7 [2] >> 1/9 | 12*x^4 - 9*x^3 - 28*x^2 + 29*x - 7)) [3] | 38*x^4 + 7*x^3 + >> 16*x^2 - x - 2)) [2] >> 2/9 | 51*x^4 - 35*x^3 + 10*x^2 - 25*x + 12)) [1] | 54*x^4 + 23*x^3 - >> 9*x^2 - 17*x + 5)) [1] >> 4/9 | 3645*x^2 - 3105*x + 632 [2] | 18225*x^2 - 16605*x + 3376 [1] >> 5/9 | 18225*x^2 - 14850*x + 2899 [2] | 729*x^2 - 648*x + 130 [1] >> 7/9 | 18225*x^2 - 13500*x + 2428 [2] | 18225*x^2 - 15390*x + 3049 [1] >> 8/9 | 18225*x^2 - 12825*x + 2218 [2] | 18225*x^2 - 14985*x + 2974 [1] >> 1/10 | 25*x^4 + 24*x^3 - 10*x^2 - 21*x + 8)) [2] | 49*x^4 + 10*x^3 - >> 20*x^2 - 24*x + 9)) [1] >> 3/10 | 5000*x^2 - 4500*x + 967 [2] | 45000*x^2 - 42300*x + 8803 [1] >> 7/10 | 45000*x^2 - 34500*x + 6383 [2] | 15000*x^2 - 12900*x + 2561 [1] >> 9/10 | 5000*x^2 - 3500*x + 603 [2] | 45000*x^2 - 36900*x + 7327 [1] >> >> - Randall >> >> P.S. This will apply in 3d space, when we rotate on a plane. >> >> > -- This email has been checked for viruses by Avast antivirus software. www.avast.com