Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Divide

Function: divide (<p_1>, <p_2>, <x_1>, ..., <x_n>) computes the quotient and remainder of the polynomial <p_1> divided by the polynomial <p_2>, in a main polynomial variable, <x_n>. The other variables are as in the `ratvars` function. The result is a list whose first element is the quotient and whose second element is the remainder. Examples:

```          (%i1) divide (x + y, x - y, x);
(%o1)                       [1, 2 y]
(%i2) divide (x + y, x - y);
(%o2)                      [- 1, 2 x]```

Note that `y` is the main variable in the second example.

There are also some inexact matches for `divide`. Try `?? divide` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

f1: x^3-2*x*y;

f2: x^2*y-2*y^2+x;

Calculate

##### divide

divide(98765432,88);

Calculate

##### divide

p1:(x-4)*(x+3)-3*x+18;

divide(p1,x+3,x);

Calculate

##### divide

p1:3*x^3+9*x^2+18*x+36;

p2:x+1;

divide(p1,p2);

Calculate

poly_monomial_order:'...

s:poly_s_polynomial(x...

Calculate

##### divide-expand

n:11;

R:expand((x+y-z)^n - ...

T:expand(n*(x+y)*(z-x...

Calculate

poly_monomial_order:'...

poly_pseudo_divide (x...

Calculate

##### divide

a: 77400*x^7 + 29655*...

b:-5040*x^6 + 27906*x...

divide(a,b,x);

Calculate

##### divide-factor-last-num

num(last(divide(facto...

473995*5-2070046;

factor(299929);

Calculate

##### divide

divide(-12*x**4+20*x*...

Calculate 