Re: PolynomialMod
- To: mathgroup at smc.vnet.net
- Subject: [mg121350] Re: PolynomialMod
- From: Artur <grafix at csl.pl>
- Date: Mon, 12 Sep 2011 04:19:45 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <1427062901.24745.1315763991756.JavaMail.root@wrimail02.wolfram.com>
- Reply-to: grafix at csl.pl
Dear Daniel, I'm apologize for confusions but I was used wrong function PolynomialMod inspite PolynomialRemainder Now work perfect: f = 1 + 3 x + 5 x^2 + 5 x^3 + 5 x^4 + 3 x^5 + x^6; p = -c - b x + x^3; q = PolynomialRemainder[f, p, x] result is OK and work symbolically 1 + 5 c + 3 b c + c^2 + (3 + 5 b + 3 b^2 + 5 c + 2 b c) x + (5 + 5 b + b^2 + 3 c) x^2 Best wishes Artur W dniu 2011-09-11 19:59, Daniel Lichtblau pisze: > > ----- Original Message ----- >> From: "Artur"<grafix at csl.pl> >> To: mathgroup at smc.vnet.net >> Sent: Sunday, September 11, 2011 6:28:34 AM >> Subject: PolynomialMod >> Dear Mathematica Gurus, >> >> Who is able help me to write Mathematica procedure which will be >> improovment of recent PolynomialMod. >> >> If we do >> PolynomialMod[ 1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 3 #1^5 + #1^6, -1 >> + >> 2 #1^2 + #1^3] >> result is OK >> 1 + 6 #1 + 6 #1^2 >> >> But if we do >> PolynomialMod[1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 3 #1^5 + #1^6, -1 >> + >> (-(3/2) - (I Sqrt[23])/2) #1 + (3/2 - (I Sqrt[23])/2) #1^2 + #1^3] >> Result is wrong >> good should be >> -2 + (-(1/2) - (I Sqrt[23])/2) x + x^2 >> >> Who is able to write good one procedure e.g. PolMod to automatic >> reduction of any degree polynomials by polynomial smaller degree? >> >> Best wishes >> Artur Jasinskii > Actually a correct result should be zero. PolynomialRemainder, among other functions, can be used for this. > > In[256]:= p1 = (1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + > 3 #1^5 + #1^6)&[x] > > Out[256]= 1 + 3*x + 5*x^2 + 5*x^3 + 5*x^4 + 3*x^5 + x^6 > > In[257]:= m1 = (-1 + (-(3/2) - (I*Sqrt[23])/2)*#1 + (3/ > 2 - (I*Sqrt[23])/2)*#1^2 + #1^3& )[x] > > Out[257]= -1 + (-(3/2) - (I*Sqrt[23])/2)*x + (3/2 - (I*Sqrt[23])/2)* > x^2 + x^3 > > In[272]:= PolynomialQuotientRemainder[p1, m1, x] > > Out[272]= {-1 + (-(3/2) + (I*Sqrt[23])/2)*x + (3/2 + (I*Sqrt[23])/2)* > x^2 + x^3, 0} > > Daniel Lichtblau > Wolfram Research >