### Related

##### remainder

f(m)=remainder(m^3,m,...

Calculate

##### remainder

k: 1;

x: 4 * -(2^649) + 3*k;

a: 8*x;

Calculate

##### remainder-resultant

A:x^3+a*x+b;

B:y^2+p*y+q-x;

C:resultant(A,B,x);

Calculate

##### remainder

p(t):=t^3-t+1;

r(a):=remainder(p(x^a...

r(2);

Calculate

##### remainder-resultant

A:u^4+4*p*u+q;

B:v^3+a-u*(v^2+b*v);

C:resultant(A,B,u);

Calculate

x0: -(11^121);

a: 27*x0;

b: -(11^121);

Calculate

##### remainder

remainder(x^10,x^3+3*...

Calculate

##### remainder

remainder(x^2+2*x+1,x...

Calculate

##### remainder

p=remainder(10,3);

Calculate

##### remainder-resultant

A:u^4+p*u^2+q*u+r;

B:v^2+b-u*(c*v^2+e);

C:v^4+k*v+m;

Calculate

### remainder

Run Example
```(%i1)A:u^4+p*u^2+q*u+r;
4      2
(%o1)                         u  + p u  + q u + r
(%i2) B:u^2+a*u+b;
2
(%o2)                            u  + a u + b
(%i3) C:expand(A*B);
6      5      4      4      3        3      2        2        2
(%o3) u  + a u  + p u  + b u  + q u  + a p u  + r u  + a q u  + b p u  + a r u
+ b q u + b r
(%i4) D:u^4+k*u+m;
4
(%o4)                            u  + k u + m
(%i5) E:remainder(C,D,u);
3                              2
(%o5) (q + a p - k) u  + (r + a q + b p - m - a k) u
+ (a r + b q + k (- p - b) - a m) u + b r + m (- p - b)
(%i6) F:coeff(E,u,3);
(%o6)                             q + a p - k
(%i7) G:resultant(E,F,k);
2          2                   2
(%o7) (r + (b - a ) p - m) u  + (a r - p q - a p  - a b p - a m) u + b r - m p
- b m
(%i8) H:coeff(G,u,2);
2
(%o8)                         r + (b - a ) p - m
(%i9) J:resultant(G,H,m);
3                2       2    2
(%o9)     - p ((q + a p + 2 a b - a ) u + r + (b - a ) p + b  - a  b)
(%i10) K:expand(J);
2                  3                2    2  2    2
(%o10) - p q u - a p  u - 2 a b p u + a  p u - p r - b p  + a  p  - b  p
2
+ a  b p
(%i11) L:coeff(K,u);
2              3
(%o11)                   - p q - a p  - 2 a b p + a  p
(%i12) M:resultant(K,L,b);
3     2      2    2  2      4      6
(%o12)             - p  (4 a  r + q  - a  p  - 2 a  p - a )
(%i13) N:resultant(K,L,a);
6   3         2            2   2     4        3      3      4
(%o13) p  (r  + (- 2 p  - 3 b p - b ) r  + (p  + 2 b p  - 2 b  p - b ) r
3        2      2      3   2      5      2  4       3  3       4  2
+ (- p  - 3 b p  - 3 b  p - b ) q  + b p  + 5 b  p  + 10 b  p  + 10 b  p
5      6
+ 5 b  p + b )
(%i14) P:factor(N);
6   3      2  2          2    2  2    4          3        3        4
(%o14) p  (r  - 2 p  r  - 3 b p r  - b  r  + p  r + 2 b p  r - 2 b  p r - b  r
3  2        2  2      2    2    3  2      5      2  4       3  3       4  2
- p  q  - 3 b p  q  - 3 b  p q  - b  q  + b p  + 5 b  p  + 10 b  p  + 10 b  p
5      6
+ 5 b  p + b )
(%i15) ```
Run Example
```A:u^4+p*u^2+q*u+r;
4      2
(%o1)                         u  + p u  + q u + r
(%i2) B:v^2+a*v+b-u*(c*v^2+d*v+e);
2               2
(%o2)                 - u (c v  + d v + e) + v  + a v + b
(%i3) C:resultant(A,B,u);
4  8      3    7       3        2  2   6        2            3   5
(%o3) r (c  v  + 4 c  d v  + (4 c  e + 6 c  d ) v  + (12 c  d e + 4 c d ) v
2  2         2      4   4            2      3     3
+ (6 c  e  + 12 c d  e + d ) v  + (12 c d e  + 4 d  e) v
3      2  2   2        3      4
+ (4 c e  + 6 d  e ) v  + 4 d e  v + e )
3  8       2        3   7       2          2        2        3   6
+ q (c  v  + (3 c  d + a c ) v  + (3 c  e + 3 c d  + 3 a c  d + b c ) v
2       3          2        2     5
+ ((6 c d + 3 a c ) e + d  + 3 a c d  + 3 b c  d) v
2       2                  2         3          2   4
+ (3 c e  + (3 d  + 6 a c d + 3 b c ) e + a d  + 3 b c d ) v
2         2                   3   3
+ ((3 d + 3 a c) e  + (3 a d  + 6 b c d) e + b d ) v
3                    2        2     2       3          2         3
+ (e  + (3 a d + 3 b c) e  + 3 b d  e) v  + (a e  + 3 b d e ) v + b e )
2  8                 2   7             2                     2   2   6
+ p (c  v  + (2 c d + 2 a c ) v  + (2 c e + d  + 4 a c d + (2 b + a ) c ) v
2             2               2   5
+ ((2 d + 4 a c) e + 2 a d  + (4 b + 2 a ) c d + 2 a b c ) v
2                      2                 2   2                2  2   4
+ (e  + (4 a d + (4 b + 2 a ) c) e + (2 b + a ) d  + 4 a b c d + b  c ) v
2              2                          2      2       3
+ (2 a e  + ((4 b + 2 a ) d + 4 a b c) e + 2 a b d  + 2 b  c d) v
2   2                 2         2  2   2           2      2
+ ((2 b + a ) e  + (4 a b d + 2 b  c) e + b  d ) v  + (2 a b e  + 2 b  d e) v
2  2     8        7             2   6                3   5
+ b  e ) + v  + 4 a v  + (4 b + 6 a ) v  + (12 a b + 4 a ) v
2       2      4   4          2      3     3       3      2  2   2
+ (6 b  + 12 a  b + a ) v  + (12 a b  + 4 a  b) v  + (4 b  + 6 a  b ) v
3      4
+ 4 a b  v + b
(%i4) D:v^4+k*v+m;
4
(%o4)                            v  + k v + m
(%i5) D1:rat(remainder(C,D,v),v);
3             3        2  2              2      3
(%o5)/R/ ((- 4 c  d m + (- 4 c  e - 6 c  d ) k + 12 c d e  + 4 d  e) r
2        3            2          2        2        3
+ ((- 3 c  d - a c ) m + (- 3 c  e - 3 c d  - 3 a c  d - b c ) k
2         2                   3
+ (3 d + 3 a c) e  + (3 a d  + 6 b c d) e + b d ) q
2                  2                       2   2
+ ((- 2 c d - 2 a c ) m + (- 2 c e - d  - 4 a c d + (- 2 b - a ) c ) k
2              2                          2      2
+ 2 a e  + ((4 b + 2 a ) d + 4 a b c) e + 2 a b d  + 2 b  c d) p - 4 a m
2            2      3     3
+ (- 4 b - 6 a ) k + 12 a b  + 4 a  b) v
3        2  2       4  2          2            3           3
+ (((- 4 c  e - 6 c  d ) m + c  k  + (- 12 c  d e - 4 c d ) k + 4 c e
2  2             2          2        2        3       3  2
+ 6 d  e ) r + ((- 3 c  e - 3 c d  - 3 a c  d - b c ) m + c  k
2       3          2        2         3
+ ((- 6 c d - 3 a c ) e - d  - 3 a c d  - 3 b c  d) k + e
2        2                     2
+ (3 a d + 3 b c) e  + 3 b d  e) q + ((- 2 c e - d  - 4 a c d
2   2       2  2                             2
+ (- 2 b - a ) c ) m + c  k  + ((- 2 d - 4 a c) e - 2 a d
2               2              2   2                 2
+ (- 4 b - 2 a ) c d - 2 a b c ) k + (2 b + a ) e  + (4 a b d + 2 b  c) e
2  2                  2       2                  3         3      2  2   2
+ b  d ) p + (- 4 b - 6 a ) m + k  + (- 12 a b - 4 a ) k + 4 b  + 6 a  b ) v
4         2            3         3    2
+ (((2 c  k - 12 c  d e - 4 c d ) m + 4 c  d k
2  2         2      4           3
+ (- 6 c  e  - 12 c d  e - d ) k + 4 d e ) r
3                     2       3          2        2
+ ((2 c  k + (- 6 c d - 3 a c ) e - d  - 3 a c d  - 3 b c  d) m
2        3   2           2         2                  2         3
+ (3 c  d + a c ) k  + (- 3 c e  + (- 3 d  - 6 a c d - 3 b c ) e - a d
2         3          2           2                              2
- 3 b c d ) k + a e  + 3 b d e ) q + ((2 c  k + (- 2 d - 4 a c) e - 2 a d
2               2                    2   2
+ (- 4 b - 2 a ) c d - 2 a b c ) m + (2 c d + 2 a c ) k
2                          2                   2   2
+ (- e  + (- 4 a d + (- 4 b - 2 a ) c) e + (- 2 b - a ) d  - 4 a b c d
2  2             2      2                             3           2
- b  c ) k + 2 a b e  + 2 b  d e) p + (2 k - 12 a b - 4 a ) m + 4 a k
2       2      4           3
+ (- 6 b  - 12 a  b - a ) k + 4 a b ) v
4  2       3          2  2         2      4       4
+ (c  m  + (4 c  d k - 6 c  e  - 12 c d  e - d ) m + e ) r
3  2        2        3           2         2                  2         3
+ (c  m  + ((3 c  d + a c ) k - 3 c e  + (- 3 d  - 6 a c d - 3 b c ) e - a d
2         3        2  2                  2       2
- 3 b c d ) m + b e ) q + (c  m  + ((2 c d + 2 a c ) k - e
2                   2   2                2  2
+ (- 4 a d + (- 4 b - 2 a ) c) e + (- 2 b - a ) d  - 4 a b c d - b  c ) m
2  2       2               2       2      4       4
+ b  e ) p + m  + (4 a k - 6 b  - 12 a  b - a ) m + b
(%i6) D2:subst(a=0,D1);
3             3        2  2              2      3
(%o6) ((- 4 c  d m + (- 4 c  e - 6 c  d ) k + 12 c d e  + 4 d  e) r
2             2          2      3           2                  3
+ (- 3 c  d m + (- 3 c  e - 3 c d  - b c ) k + 3 d e  + 6 b c d e + b d ) q
2        2                   2                  3
+ (- 2 c d m + (- 2 c e - d  - 2 b c ) k + 4 b d e + 2 b  c d) p - 4 b k) v
3        2  2       4  2          2            3           3
+ (((- 4 c  e - 6 c  d ) m + c  k  + (- 12 c  d e - 4 c d ) k + 4 c e
2  2             2          2      3       3  2
+ 6 d  e ) r + ((- 3 c  e - 3 c d  - b c ) m + c  k
3        2         3          2        2
+ (- 6 c d e - d  - 3 b c  d) k + e  + 3 b c e  + 3 b d  e) q
2        2       2  2                                2
+ ((- 2 c e - d  - 2 b c ) m + c  k  + (- 2 d e - 4 b c d) k + 2 b e
2        2  2               2      3   2
+ 2 b  c e + b  d ) p - 4 b m + k  + 4 b ) v
4         2            3         3    2
+ (((2 c  k - 12 c  d e - 4 c d ) m + 4 c  d k
2  2         2      4           3
+ (- 6 c  e  - 12 c d  e - d ) k + 4 d e ) r
3                3        2           2    2
+ ((2 c  k - 6 c d e - d  - 3 b c  d) m + 3 c  d k
2         2        2             2             2
+ (- 3 c e  + (- 3 d  - 3 b c ) e - 3 b c d ) k + 3 b d e ) q
2                                 2
+ ((2 c  k - 2 d e - 4 b c d) m + 2 c d k
2                  2    2  2         2                     2
+ (- e  - 4 b c e - 2 b d  - b  c ) k + 2 b  d e) p + 2 k m - 6 b  k) v
4  2       3          2  2         2      4       4
+ (c  m  + (4 c  d k - 6 c  e  - 12 c d  e - d ) m + e ) r
3  2       2            2         2        2             2         3
+ (c  m  + (3 c  d k - 3 c e  + (- 3 d  - 3 b c ) e - 3 b c d ) m + b e ) q
2  2               2                  2    2  2       2  2       2
+ (c  m  + (2 c d k - e  - 4 b c e - 2 b d  - b  c ) m + b  e ) p + m
2      4
- 6 b  m + b
(%i7) D3:subst(d=2*d,D2);
3             3         2  2              2       3
(%o7) ((- 8 c  d m + (- 4 c  e - 24 c  d ) k + 24 c d e  + 32 d  e) r
2             2           2      3           2                     3
+ (- 6 c  d m + (- 3 c  e - 12 c d  - b c ) k + 6 d e  + 12 b c d e + 8 b d )
2        2                   2
q + (- 4 c d m + (- 2 c e - 4 d  - 2 b c ) k + 8 b d e + 4 b  c d) p - 4 b k)
3           3         2  2       4  2          2             3           3
v  + (((- 4 c  e - 24 c  d ) m + c  k  + (- 24 c  d e - 32 c d ) k + 4 c e
2  2             2           2      3       3  2
+ 24 d  e ) r + ((- 3 c  e - 12 c d  - b c ) m + c  k
3        2         3          2         2
+ (- 12 c d e - 8 d  - 6 b c  d) k + e  + 3 b c e  + 12 b d  e) q
2        2       2  2                                2
+ ((- 2 c e - 4 d  - 2 b c ) m + c  k  + (- 4 d e - 8 b c d) k + 2 b e
2          2  2               2      3   2
+ 2 b  c e + 4 b  d ) p - 4 b m + k  + 4 b ) v
4         2             3         3    2
+ (((2 c  k - 24 c  d e - 32 c d ) m + 8 c  d k
2  2         2         4           3
+ (- 6 c  e  - 48 c d  e - 16 d ) k + 8 d e ) r
3                   3        2           2    2
+ ((2 c  k - 12 c d e - 8 d  - 6 b c  d) m + 6 c  d k
2          2        2              2             2
+ (- 3 c e  + (- 12 d  - 3 b c ) e - 12 b c d ) k + 6 b d e ) q
2                                 2
+ ((2 c  k - 4 d e - 8 b c d) m + 4 c d k
2                  2    2  2         2                     2
+ (- e  - 4 b c e - 8 b d  - b  c ) k + 4 b  d e) p + 2 k m - 6 b  k) v
4  2       3          2  2         2         4       4
+ (c  m  + (8 c  d k - 6 c  e  - 48 c d  e - 16 d ) m + e ) r
3  2       2            2          2        2              2         3
+ (c  m  + (6 c  d k - 3 c e  + (- 12 d  - 3 b c ) e - 12 b c d ) m + b e ) q
2  2               2                  2    2  2       2  2       2
+ (c  m  + (4 c d k - e  - 4 b c e - 8 b d  - b  c ) m + b  e ) p + m
2      4
- 6 b  m + b
(%i8) D4:subst(c=0,D3);
3             2        3                    2                3
(%o8) (32 d  e r + (6 d e  + 8 b d ) q + (8 b d e - 4 d  k) p - 4 b k) v
2  2           3      3         2
+ (24 d  e  r + (- 8 d  k + e  + 12 b d  e) q
2                    2      2  2               2      3   2
+ (- 4 d  m - 4 d e k + 2 b e  + 4 b  d ) p - 4 b m + k  + 4 b ) v
3       4              3         2              2
+ ((8 d e  - 16 d  k) r + (- 8 d  m - 12 d  e k + 6 b d e ) q
2        2         2                     2
+ (- 4 d e m + (- e  - 8 b d ) k + 4 b  d e) p + 2 k m - 6 b  k) v
4       4            3       2               2        2       2  2       2
+ (e  - 16 d  m) r + (b e  - 12 d  e m) q + ((- e  - 8 b d ) m + b  e ) p + m
2      4
- 6 b  m + b
(%i9) E:subst(b=-d,D4);
3             2      4            2        2                3
(%o9) (32 d  e r + (6 d e  - 8 d ) q + (- 4 d  k - 8 d  e) p + 4 d k) v
2  2           3      3       3
+ (24 d  e  r + (- 8 d  k + e  - 12 d  e) q
2                    2      4               2      3   2
+ (- 4 d  m - 4 d e k - 2 d e  + 4 d ) p + 4 d m + k  - 4 d ) v
3       4              3         2          2  2
+ ((8 d e  - 16 d  k) r + (- 8 d  m - 12 d  e k - 6 d  e ) q
3    2         3                   2
+ (- 4 d e m + (8 d  - e ) k + 4 d  e) p + 2 k m - 6 d  k) v
4       4               2          3           3    2       2  2       2
+ (e  - 16 d  m) r + (- 12 d  e m - d e ) q + ((8 d  - e ) m + d  e ) p + m
2      4
- 6 d  m + d
(%i10) F:rat(coeff(E,v,3),m);
3             2      4            2        2
(%o10)/R/ 32 d  e r + (6 d e  - 8 d ) q + (- 4 d  k - 8 d  e) p + 4 d k
(%i11) G:rat(subst(m=0,F),k);
2                  3             2      4         2
(%o11)/R/ (- 4 d  p + 4 d) k + 32 d  e r + (6 d e  - 8 d ) q - 8 d  e p
(%i12) G1:resultant(coeff(F,m),coeff(G,k),a);
(%o12)/R/                              1
(%i13) G2:factor(G1);
(%o13)                                 1
(%i14) G3:rat(G2,b);
(%o14)/R/                              1
(%i15) G4:factor(resultant(resultant(subst(k=0,G),coeff(F,m),a),G3,b));
(%o15)                                 1
(%i16) H:resultant(coeff(F,m),G,a);
(%o16)/R/                              1
(%i17) J:rat(H,k);
(%o17)/R/                              1
(%i18) L:resultant(coeff(J,k),subst(k=0,J),b);
(%o18)/R/                              1
(%i19) M:rat(L,c);
(%o19)/R/                              1
(%i20) N:factor(M);
(%o20)                                 1
(%i21) Q:factor(resultant(coeff(E,v,2),P,b));
(%o21)                                 1
(%i22) ```
Run Example
```A:u^3+3*p*u+q;
3
(%o1)                           u  + 3 p u + q
(%i2) B:v^2-d^2*p-u*d*v;
2            2
(%o2)                          v  - d u v - d  p
(%i3) C:resultant(A,B,u);
6    3    3    6  3
(%o3)                        v  + d  q v  - d  p
(%i4) D:v^3-k;
3
(%o4)                               v  - k
(%i5) E:remainder(C,D,v);
3        6  3    2
(%o5)                         d  k q - d  p  + k
(%i6) F:coeff(E,v,2);
(%o6)                                  0
(%i7) G:rat(F/3/e);
(%o7)/R/                               0
(%i8) H:coeff(G,k);
(%o8)/R/                               0
(%i9) J:resultant(G,E,e);
(%o9)/R/                               1
(%i10) K:factor(J);
(%o10)                                 1
(%i11) L:coeff(K,v);
(%o11)                                 0
(%i12) ```

### Related Help

Help for Remainder